ASPX page possibly timing out

S

StingRayYellow

I have some .NET 2.0 c# code that reads data from an XML file, and imports it
into CRM. The code works fine until I throw an 18MB file at it. My code
will process a large portion of the file, but then stop & display an error
message. I added the following code to my web.config, but with no success:

<system.web>
<httpRuntime
executionTimeout="3600"
maxRequestLength="102400"
/>
</system.web>


Here’s the detailed error massage. Thanks for looking at it.

Failed to read the file C:\Documents and Settings\rhess\My Documents\Visual
Studio 2005\WebSites\xlmreader\test.xml
Exception: System.Net.WebException: Unable to connect to the remote server
---> System.Net.Sockets.SocketException: Only one usage of each socket
address (protocol/network address/port) is normally permitted
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
SocketAddress socketAddress)
at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure,
Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState
state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetRequestStream()
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at CrmSdk.CrmService.RetrieveMultiple(QueryBase query) in
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\xlmreader\37b888ae\c6725455\App_WebReferences.cx6gcpn2.0.cs:line 311
at XML2CRM.XML.ReadXmlFile.FormatXml(XmlReader reader, String filename)
in c:\Documents and Settings\rhess\My Documents\Visual Studio
2005\WebSites\xlmreader\ReadXmlFile.aspx.cs:line 107
at XML2CRM.XML.ReadXmlFile.Run(String args) in c:\Documents and
Settings\rhess\My Documents\Visual Studio
2005\WebSites\xlmreader\ReadXmlFile.aspx.cs:line 43

Processing of the file C:\Documents and Settings\rhess\My Documents\Visual
Studio 2005\WebSites\xlmreader\test.xml complete.
 
S

Sundar Narasimman

Hi StingRayYellow,

You need to think of Aynchronous processing. Reading huge amount of XML data
is definitely causing the problem. You can very well implement this using
functionality Asynchronous Web Service / Asynchronous Remoting.

The following url would give you an insight into asynchronous web service
http://msdn.microsoft.com/msdnmag/issues/05/10/WickedCode/

Thanks & Regards,
Sundar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top