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

Notification

Icon
Error

The formatter threw an exception while trying to deserialize the message
sfavaro
#1 Posted : Wednesday, April 13, 2016 7:36:26 AM(UTC)
Groups: Member
Joined: 4/13/2016(UTC)
Posts: 8
Location: Italy

Hi all,

I'm trying to host a WCF service using basic authentication with custom validation.

I've managed to run the basic authentication (even if I need a custom HttpModule on server side),
but now I'm getting an "error deserializing the message" when the client is sending some big requests to the server.

This is happening because the request is somehow "cut".
I tried to increase all possible buffers but with no luck.

I attach a sample service and client application.

Any help would be really appreciated.
Thanks!
File Attachment(s):
TestService_160413.zip (7kb) downloaded 136 time(s).
TestServiceClient_160413.zip (21kb) downloaded 138 time(s).
Ultidev Team
#2 Posted : Thursday, April 14, 2016 8:46:35 AM(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,

Could you please confirm that you have this problem when running the service under UWS, but not under IIS/IISExpress? If so, does this problem manifest when you run it under UWS service or UWS interactive host or both?

Please attach screenshots and/or Fiddler trace outputs to your reply to provide us with more context in order for us to help you troubleshoot this issue.

Best regards,
UltiDev Team.

Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
sfavaro
#3 Posted : Friday, April 15, 2016 2:55:11 AM(UTC)
Groups: Member
Joined: 4/13/2016(UTC)
Posts: 8
Location: Italy

Hi,

yes, I can confirm that it works under IIS v10

Attached you can find the Fiddler output.
(I hope there's everything you need, I've never used this tool before)

Thanks!
File Attachment(s):
TestService.zip (3kb) downloaded 139 time(s).
Ultidev Team
#4 Posted : Friday, April 15, 2016 8:28:20 AM(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,

This forum is probably not the best place to get help on IIS or general programming issues. This forum is dedicated to support of UltiDev software products only. If Google search does not return any helpful results, please post the question at http://stackoverflow.com/ - by far the best place to get help on programming topics.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
sfavaro
#5 Posted : Friday, April 15, 2016 9:16:01 AM(UTC)
Groups: Member
Joined: 4/13/2016(UTC)
Posts: 8
Location: Italy

Sorry, but I don't understand, it WORKS with IIS...

I have the problem ONLY when trying to host it with UWS service.
Ultidev Team
#6 Posted : Sunday, April 17, 2016 3:36:41 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,

Sorry for misunderstanding your previous post.

We have looked at the Fiddler trace you've sent. The problem may be in the request coming with the "Expect: 100-continue" header. Handling of this header depends on the web server implementation. Try disabling it. You might re-play Fiddler request without the header and see if that helps. If it does, System.Net.ServicePointManager class has a static property named Expect100Continue. Setting it to false will stop the “Expect: 100-Continue” header from being sent.

Please let us know if this suggestion has helped.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
sfavaro
#7 Posted : Monday, April 18, 2016 3:22:34 AM(UTC)
Groups: Member
Joined: 4/13/2016(UTC)
Posts: 8
Location: Italy

Hi,

unfortunately I still have the same problem.

Attached there's the latest Fiddler output.

If you have some time, in the first post there are attached the service and client I'm using for the test.
File Attachment(s):
TestService_NoExpect100.zip (3kb) downloaded 135 time(s).
Ultidev Team
#8 Posted : Monday, April 18, 2016 8:40:27 AM(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,

Nothing looks wrong in the request/response trace you've sent int. We are not sure why you are experiencing this problem.
Can you run the app in IIS and collect Fiddler trace for that session? Maybe that could provide some clues as to why this is not working.

The exception complains about XML tags not being closed due to an unexpected end of file. Does this work in UWS with smaller XML payload?

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
sfavaro
#9 Posted : Wednesday, April 20, 2016 4:50:10 AM(UTC)
Groups: Member
Joined: 4/13/2016(UTC)
Posts: 8
Location: Italy

Hi,

yes, it works using a smaller XML.

Attached you can find the output from IIS vs UWS and UWS with a smaller XML.
File Attachment(s):
TestService_IIS_vs_UWS.zip (5kb) downloaded 143 time(s).
TestService_UWS_Small_XML.zip (3kb) downloaded 153 time(s).
Ultidev Team
#10 Posted : Wednesday, April 20, 2016 4:18:29 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,

We will need to figure out why the request body gets truncated at around 2^17 (131,072), making 131,069 byte request sail through and 131,285 byte request getting truncated.

Could you please also run the application under UWS Interactive (as on screenshot) and capture a single request trace? UWS Interactive outputs quite a bit of diagnostic information for each processed request, and then attach the trace text to your reply, please.

Best regards,
UltiDev Team.
Ultidev Team attached the following image(s):
Ultidev Team attached the following image(s): UWS Interactive screenshot.png
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
sfavaro
#11 Posted : Thursday, April 21, 2016 2:04:19 AM(UTC)
Groups: Member
Joined: 4/13/2016(UTC)
Posts: 8
Location: Italy

Hi,

here is the trace of a BAD request (big XML):

08:32:18.0819 @@@@ LT [00000000-0000-0000-8F0D-0080060000EA] for /Test.svc/net: Got context from this.listener.EndGetContext(ar);
08:32:18.0819 @@@@ LT [00000000-0000-0000-8F0D-0080060000EA] for /Test.svc/net: Entered HandleRequest(requestContext);
08:32:18.0824 Received POST request of size 131221 for: "/Test.svc/net".
08:32:18.0824 @@@@ LT [00000000-0000-0000-8F0D-0080060000EA] for /Test.svc/net: Entered ApplicationRequestDispatched.ProcessRequest(), about to construct AspNetRequest object.
08:32:18.0824 @@@@ LT [00000000-0000-0000-8F0D-0080060000EA] for /Test.svc/net: Entered AspNetRequest() constructor.
08:32:18.0829 @@@@ LT [00000000-0000-0000-8F0D-0080060000EA] for /Test.svc/net: ProcessRequest: AspNetRequest object instantiated.
08:32:18.0829 Handling request for "/Test.svc" mapped to "D:\Temp\TestService\TestService\Test.svc".
08:32:18.0834 @@@@ LT [00000000-0000-0000-8F0D-0080060000EA] for /Test.svc/net: ProcessRequest: Before HttpRuntime.ProcessRequest().
08:32:18.1190 SendResponseFromMemory(): Starting serving "/Test.svc" as uncompressed (or compressed by application) text/xml; charset=utf-8. HTTP result 500. Data length: 755
08:32:18.1200 Written 755 bytes (before compression, if any) in responding to "http://localhost:49822/Test.svc/net".
08:32:18.1210 @@@@ LT [00000000-0000-0000-8F0D-0080060000EA] for /Test.svc/net: Entered AspNetRequest.EndOfRequest(). this.responseClosed = False
08:32:18.1240 @@@@ LT [00000000-0000-0000-8F0D-0080060000EA] for /Test.svc/net: Entered AspNetRequest.GoOutOfBusiness().
08:32:18.1250 @@@@ LT [00000000-0000-0000-8F0D-0080060000EA] for /Test.svc/net: Starting AspNetRequest.GoOutOfBusiness() cleanup.
08:32:18.1250 @@@@ LT [00000000-0000-0000-8F0D-0080060000EA] for /Test.svc/net: Leaving AspNetRequest.GoOutOfBusiness().
08:32:18.1260 @@@@ LT [00000000-0000-0000-8F0D-0080060000EA] for /Test.svc/net: ProcessRequest: HttpRuntime.ProcessRequest() completed successfully.
08:32:18.1270 @@@@ LT [00000000-0000-0000-8F0D-0080060000EA] for /Test.svc/net: ProcessRequest: Leaving ApplicationRequestDispatched.ProcessRequest().
08:32:18.1270 @@@@ LT [00000000-0000-0000-8F0D-0080060000EA] for /Test.svc/net: Leaving HandleRequest(requestContext);
08:32:18.1280 @@@@ LT [00000000-0000-0000-8F0D-0080060000EA] for /Test.svc/net: Leaving AcceptRequest();


This is the trace of a GOOD request (small XML):

09:00:25.1915 @@@@ LT [00000000-0000-0000-8603-0080060000F3] for /Test.svc/net: Got context from this.listener.EndGetContext(ar);
09:00:25.1915 @@@@ LT [00000000-0000-0000-8603-0080060000F3] for /Test.svc/net: Entered HandleRequest(requestContext);
09:00:25.1915 Received POST request of size 375 for: "/Test.svc/net".
09:00:25.1915 @@@@ LT [00000000-0000-0000-8603-0080060000F3] for /Test.svc/net: Entered ApplicationRequestDispatched.ProcessRequest(), about to construct AspNetRequest object.
09:00:25.1915 @@@@ LT [00000000-0000-0000-8603-0080060000F3] for /Test.svc/net: Entered AspNetRequest() constructor.
09:00:25.1915 @@@@ LT [00000000-0000-0000-8603-0080060000F3] for /Test.svc/net: ProcessRequest: AspNetRequest object instantiated.
09:00:25.1915 Handling request for "/Test.svc" mapped to "D:\Temp\TestService\TestService\Test.svc".
09:00:25.1915 @@@@ LT [00000000-0000-0000-8603-0080060000F3] for /Test.svc/net: ProcessRequest: Before HttpRuntime.ProcessRequest().
09:00:25.2025 SendResponseFromMemory(): Starting serving "/Test.svc" as uncompressed (or compressed by application) text/xml; charset=utf-8. HTTP result 200. Data length: 423
09:00:25.2035 Written 423 bytes (before compression, if any) in responding to "http://localhost:49822/Test.svc/net".
09:00:25.2045 @@@@ LT [00000000-0000-0000-8603-0080060000F3] for /Test.svc/net: Entered AspNetRequest.EndOfRequest(). this.responseClosed = False
09:00:25.2045 @@@@ LT [00000000-0000-0000-8603-0080060000F3] for /Test.svc/net: Entered AspNetRequest.GoOutOfBusiness().
09:00:25.2055 @@@@ LT [00000000-0000-0000-8603-0080060000F3] for /Test.svc/net: Starting AspNetRequest.GoOutOfBusiness() cleanup.
09:00:25.2055 @@@@ LT [00000000-0000-0000-8603-0080060000F3] for /Test.svc/net: Leaving AspNetRequest.GoOutOfBusiness().
09:00:25.2055 @@@@ LT [00000000-0000-0000-8603-0080060000F3] for /Test.svc/net: ProcessRequest: HttpRuntime.ProcessRequest() completed successfully.
09:00:25.2065 @@@@ LT [00000000-0000-0000-8603-0080060000F3] for /Test.svc/net: ProcessRequest: Leaving ApplicationRequestDispatched.ProcessRequest().
09:00:25.2065 @@@@ LT [00000000-0000-0000-8603-0080060000F3] for /Test.svc/net: Leaving HandleRequest(requestContext);
09:00:25.2075 @@@@ LT [00000000-0000-0000-8603-0080060000F3] for /Test.svc/net: Leaving AcceptRequest();
Ultidev Team
#12 Posted : Friday, April 22, 2016 8:24:49 AM(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,

We'll try to reproduce this problem in the next couple of days and will report our findings.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
sfavaro
#13 Posted : Wednesday, May 4, 2016 4:08:55 AM(UTC)
Groups: Member
Joined: 4/13/2016(UTC)
Posts: 8
Location: Italy

Hi, did you find anything?

Thanks!
Ultidev Team
#14 Posted : Wednesday, May 4, 2016 2:02:25 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)
We are going to get to it shortly. We'll provide update in a few days.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
sfavaro
#15 Posted : Friday, May 27, 2016 2:39:43 AM(UTC)
Groups: Member
Joined: 4/13/2016(UTC)
Posts: 8
Location: Italy

Hi, any news?
Guest
#16 Posted : Saturday, May 28, 2016 4:53:57 AM(UTC)
Groups:

Message was deleted by a Moderator.
Rss Feed  Atom Feed
Users browsing this topic
Guest (4)
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.