Anyone having trouble with their anti-virus blocking WCF ser

Posted by Community Admin on 03-Aug-2018 19:22

Anyone having trouble with their anti-virus blocking WCF services?

All Replies

Posted by Community Admin on 23-Apr-2012 00:00

I know this is not Telerik's problem, but I am hoping other people have ran into this that might be able to suggest what settings to look for.  I have a ticket into Kaspersky, but have not heard anything from them for quite some time.

I am running Kaspersky Anti-Virus 2012 and here is what happens.  I was seeing a lot of errors pop back at me when trying to save as draft or publish pages.  I was also seeing issues when trying to drop widgets onto pages.  These issues do not happen when I run sites locally so I got to thinking maybe it wasn't a browser issue and I played with my AV settings.

Turns out that disabling Kaspersky takes care of the errors.  Out of curiosity I ran SVC trace to see if I could pinpoint the error.

This is the exception that is caused with my AV running:
The number of bytes available is inconsistent with the HTTP Content-Length header.  There may have been a network error or the client may be sending invalid requests

My guess is that Kaspersky's heuristic scans are intercepting the WCF calls just long enough to blow them up.

Kaspersky has several settings to catch phising and such.  I have added entries to trusted zones, added exceptions to keep from being scanned and even tried to turn Enable Web Anti-Virus off, but it appears the only way to keep things working is to fully disable all scanning.

Is anyone else having similar problems?  I can always try to uninstall/re-install, but I would like to figure out what settings would be interfering with the web services so I can change them.

Posted by Community Admin on 30-Apr-2012 00:00

I'm also getting the same error, but disabling Kaspersky on the server doesn't seem to solve it.
Was KAV on your desktop or the server? Have you discovered anything else in the interim?

<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
<System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
<EventID>131075</EventID>
<Type>3</Type>
<SubType Name="Error">0</SubType>
<Level>2</Level>
<TimeCreated SystemTime="2012-04-27T14:06:56.0009948Z" />
<Source Name="System.ServiceModel" />
<Correlation ActivityID="00000000-0000-0000-0000-000000000000" />
<Execution ProcessName="w3wp" ProcessID="12004" ThreadID="183" />
<Channel />
<Computer>MONTREWWW36</Computer>
</System>
<ApplicationData>
<TraceData>
<DataItem>
<TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error">
<TraceIdentifier>msdn.microsoft.com/.../TraceIdentifier>
<Description>Throwing an exception.</Description>
<AppDomain>/LM/W3SVC/1/ROOT-2-129800088842981948</AppDomain>
<Exception>
<ExceptionType>System.ServiceModel.ProtocolException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>The number of bytes available is inconsistent with the HTTP Content-Length header.  There may have been a network error or the client may be sending invalid requests.</Message>
<StackTrace>
at System.ServiceModel.Channels.HttpInput.ReadBufferedMessage(Stream inputStream)
at System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(Exception&amp; requestException)
at System.ServiceModel.Channels.HttpRequestContext.CreateMessage()
at System.ServiceModel.Channels.HttpChannelListener.HttpContextReceived(HttpRequestContext context, Action callback)
at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state)
at System.ServiceModel.AspNetPartialTrustHelpers.PartialTrustInvoke(ContextCallback callback, Object state)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequestWithFlow(Object state)
at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
</StackTrace>
<ExceptionString>System.ServiceModel.ProtocolException: The number of bytes available is inconsistent with the HTTP Content-Length header.  There may have been a network error or the client may be sending invalid requests.</ExceptionString>
</Exception>
</TraceRecord>
</DataItem>
</TraceData>
</ApplicationData>
</E2ETraceEvent>

Posted by Community Admin on 30-Apr-2012 00:00

I am running a desktop client version.  Another developer here has also seen similar issues running the same version on his desktop too which makes me think it has more to do with how Kaspersky monitors the urls than any specific setting I may have on mine.

Posted by Community Admin on 30-Apr-2012 00:00

I'm using a binaryMessageEncoding with httpsTransport, is yours similar? Or is it just all WCF calls in general no matter the configuration?

Posted by Community Admin on 01-May-2012 00:00

Robert,

I do not have any custom WCF calls or configurations going on.  I have been seeing this happen using Sitefinity from a standard install.

Posted by Community Admin on 01-May-2012 00:00

Yeah, sorry, my problem isn't specific to SiteFinity, although the error is the same. Thanks for replying.

This thread is closed