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.
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.