Paul Diston

Hi,

I am having a problem with posting a large XML string (>30Kb) over an SSL (HTTPS) connection. Posting the same large amount of XML works successfully over a non-SSL (HTTP) connection.
From performing a number of tests I can successfully post a string of XML that is 30728 bytes but can not post 31858 bytes.
The smaller XML string gets posted within 5 seconds however the larger XML string does not post within 45 seconds and as a result I get a connection time-out exception, if I increase the timeout for the web service to 3 minutes (180000) then I get the following exception :-
WebException - "Unable to read data from the transport connection."

The stack trace of this exception is below :-
"at System.Net.HttpWebRequest.finishGetResponse()\r\nat System.Net.HttpWebRequest.GetResponse()\r\nat System.Web.Services.Protocols.WebClientProtocol.GetWebResponse()\r\nat System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse()\r\nat System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke()\r\nat System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke()\r\nat SSLMessageSetPoster.testingX.EPod2020MessageWebService.Post()\r\nat SSLMessageSetPoster.Form1.button1_Click()\r\nat System.Windows.Forms.Control.OnClick()\r\nat System.Windows.Forms.Button.OnClick()\r\nat System.Windows.Forms.ButtonBase.WnProc()\r\nat System.Windows.Forms.Control._InternalWnProc()\r\nat Microsoft.AGL.Forms.EVL.EnterMainLoop()\r\nat System.Windows.Forms.Application.Run()\r\nat SSLMessageSetPoster.Program.Main()\r\n" string

I am not sure what the underlying problem is, maybe there is a restriction on the amount of data that be sent from the handheld to the server over an SSL connection.

If any one can shed some light on to this problem then I would be very grateful.

Thanks for reading and thanks in advance for any help provided.

Paul Diston

PS. As a reference the following post on Google Groups contains details of a very similar problem but without a solution.

http://groups.google.co.uk/group/microsoft.public.dotnet.framework.compactframework/browse_thread/thread/27f9c99e2e4d9303/82871a55b96226ef lnk=st&q=ssl+timeout+device&rnum=2&hl=en#82871a55b96226ef


Re: .NET Compact Framework Posting large XML strings timeout when over SSL

Zero Dai - MSFT

Move to .NET Framework Networking and Communication forum. Thanks!




Re: .NET Compact Framework Posting large XML strings timeout when over SSL

Paul Diston

Hi,

We have now got to the bottom of this problem. We have not been running the service packs for CF 2.0 and SP2 has been installed we can now upload the larger >32Kb XML strings to the server. We are still experiencing a possible problem with even larger XML strings of around >150Kb.

As a reference the following outlines the fix that is included in the SPs to fix the above problem.

http://support.microsoft.com/default.aspx/kb/921591

NOTE: A client stops responding (hangs) when you call the HttpWebRequest method over Secure Sockets Layer (SSL). This problem occurs when the payload is larger than 32 KB and the SendChunked property returns false.

Thanks

Paul Diston





Re: .NET Compact Framework Posting large XML strings timeout when over SSL

JonCole - MSFT

If this problem is happening in the Compact Framework, then this question needs to be in another forum. I am moving this thread...




Re: .NET Compact Framework Posting large XML strings timeout when over SSL

Anthony Wong - MSFT

Hi Paul,

You are correct that the issue should have been addressed in CF V2 SP1. As for the issue you see with strings > 150Kb, can you attach a stack trace Also, it would be great if you could send the link of the web service to anthony.wong@microsoft.com so I can attempt to reproduce the issue on my side.

Cheers,

Anthony Wong [MSFT]