Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

No result from running .svc
Guest
#1 Posted : Thursday, September 26, 2013 7:17:00 PM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

Hosting a .svc is running and I'm able to see it running by attaching to it in VS.
However it returns no results and the console shows the following:

???????????????????????? [*WARNING*]: ????????????????????????
10:10:13.8629 AM SendResponseFromMemory() failed to call outputStream.Write() due to "System.Net.ProtocolViolationException: Bytes to be written to the stream exceed the Content-Length bytes size specified.
at System.Net.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at UltiDev.WebServer.Core.AspNetRequest.SendResponseFromMemory(Byte[] data, Int32 length)".

Is there some more info I can send to help you debug?

Thanks.
Ultidev Team
#2 Posted : Thursday, September 26, 2013 8:37:53 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi,

The most likely case here is that it is what error is reporting: service violated http protocol by setting Content-Length response header value, and then writing greater (or lesser) number of bytes to the response output. Often this has something to do with Response.BufferOutput setting, chunking and/or maybe with response compression.

When weird thing happen on the http wire, it's always a good idea to run Fiddler tool - it's easy to use and extremely helpful when dealing with HTTP problems.

FYI: If you login to the forum, we'll send you email notifications when we post our replies.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Guest
#3 Posted : Thursday, September 26, 2013 10:59:23 PM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

Thanks for your fast reply.

I will look into this error,

I just wanted to note that is works fine hosted in iis.
Guest
#4 Posted : Thursday, September 26, 2013 11:14:35 PM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

Fiddler shows:

HTTP/1.1 504 Fiddler - Receive Failure
Date: Fri, 27 Sep 2013 04:10:27 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Timestamp: 14:10:27.631

[Fiddler] ReadResponse() failed: The server did not return a response for this request.Server returned 0 bytes.
Guest
#5 Posted : Friday, September 27, 2013 1:22:53 AM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

Turns out this is failing for the html display page of the MEX endpoint of the .svc
I don't need to load this page.

Some calls to the service are working and one call is failing where it uses Enterprise Library caching:


An exception of type 'System.Runtime.Serialization.SerializationException' occurred in System.dll but was not handled in user code

Additional information: Type 'System.Diagnostics.TraceEventCache' in assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.

Is there more info I can give you to debug this?
Ultidev Team
#6 Posted : Friday, September 27, 2013 12:55:42 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi!

If you could please post Fiddler's session for the failed request, that would help us determine whether UWS acts accordingly and whether we need to change something. The best we can do is to return some version of 500 response, if we don't already do that (hence our request for the Fiddler trace). However, UWS won't be able to fix this problem on behalf of the application because in this case UWS is just an intermediary between the web application and http.sys driver, which in the actual source of the exception. The best way to deal with the problem is to ensure that there is no discrepancy between Content-Length header value and the size of the actual content written to the response stream.

Please let us know if you think this needs to be fixed on our side.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Guest
#7 Posted : Monday, January 8, 2018 9:17:53 PM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

Message was deleted by a Moderator.
Guest
#8 Posted : Friday, March 30, 2018 8:54:26 PM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

Message was deleted by a Moderator.
Rss Feed  Atom Feed
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.