Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / September 2006

Tip: Looking for answers? Try searching our database.

ASPX page possibly timing out

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
StingRayYellow - 28 Sep 2006 20:53 GMT
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.
Sundar Narasimman - 29 Sep 2006 08:16 GMT
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

> 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
[quoted text clipped - 37 lines]
> Processing of the file C:\Documents and Settings\rhess\My Documents\Visual
> Studio 2005\WebSites\xlmreader\test.xml complete.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.