Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error: "The request was aborted: The request was canceled"

Status
Not open for further replies.

kristof

Programmer
Jun 2, 2000
234
BE
Hi,

I got this error on a WebRequest.GetResponse(): "The request was aborted: The request was canceled"

Any idea what this can be? It's on an application that used to work ...
 
this could be any number of things. try assigning a handler to the AppDomain.UnhandeledException event and log the exception and stack trace. text file or event log are your best choice.
Code:
Application_Start(object sender, eventargs e)
{
   AppDomain.CurrentDomain.UnhandledException += LogException;
}

LogException(object sender, UnhandledExceptionEventArgs e)
{
   Exception e = (Exception)args.ExceptionObject;
   string logtext = string.Format("{0}\r\n{1}\r\n{2}",  e.GetType(), e.mesasge, e.StackTrace);
   EventLog.WriteEntry(logtext, EventLongEntryType.Error);
   File.Create("c:\log.txt", logtext);
}
File.Create might have different paremeters, but you get the idea.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top