By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,718 Members | 1,840 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,718 IT Pros & Developers. It's quick & easy.

Web Service timeout from Sharepoint webpart

P: n/a
I have written a web part. The webpart calls a web service toget info. I ran into problems with the webservice notresponding. We decided to have a cutoff for the time to waitfor a response from the web service. I am setting the Timeouton the webservice proxy before calling the webservice method. Iam not getting the results I expected. Below is the code andthe exception I get.

Results results = null;

MyWebService mws = new MyWebService();

// Set Timeout
mws.Timeout = 10000;

//get ws results
results = mws.getResults();
catch (Exception e)
// Throw exception to be caught in webpart control
throw new ApplicationException("Error calling MyWebService: ",e);

When Timeout is set to 10,000 miliseconds:

[WebPartPageUserException: The WebPart, Version=,Culture=neutral, PublicKeyToken=750984491ffadf33 assemblyspecified in a Register directive of this page could not befound.] A_0)
Microsoft.SharePoint.f.c() A_0) A_0) A_0)
Microsoft.SharePoint.SPWeb.a(Uri A_0, aj A_1, HttpContext A_2,Boolean A_3, Boolean A_4, Int64& A_5, SPWebPartCollection& A_6)
Microsoft.SharePoint.ApplicationRuntime.SharePoint Handler.SPProcessRequest(HttpContext context)

[ApplicationException: Exception of typeSystem.ApplicationException was thrown.]
Microsoft.SharePoint.ApplicationRuntime.SharePoint Handler.SPProcessRequest(HttpContext context)
Microsoft.SharePoint.ApplicationRuntime.SharePoint Handler.SPProcessRequest(HttpContext context)
Microsoft.SharePoint.ApplicationRuntime.SharePoint Handler.ProcessRequest(HttpContext context)
System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication+IExecutionStep.Execute() +179
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step,Boolean& completedSynchronously) +87

When Timeout is set to 20,000 miliseconds:

System.Web.HttpException (0x80004001) Request Timed Out. (what Iexpect)

When Timeout is set to 30,000 miliseconds:

Again Request Timed out and some successful webpart loads (alsowhat I expect)
From: Joe L

Posted by a user from .NET 247 (

Nov 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.