Re: HttpWeb Request from Class Library fails to 500



Hello SevDer,

Hi I have a class library that needs to download the HTML in a
specific page
of ours with provided querystring.
When I open this URL with any browser, it loads fine. When I do
WebRequest
from Web Project it is again fine.
However whenever I do this request from this class library, it fails.
I put every kind of user permission to the actual folder, and through
inetmgr. Right now everyone has full control.
But still I got the problem.
Code is as follows:
**********************************************************************
************
HttpWebRequest myRequest =
(HttpWebRequest)WebRequest.Create(theFullUrl);
myRequest .UserAgent = "Fareportal .NET Request 1.1";
HttpWebResponse myResponse = (HttpWebResponse)myRequest
.GetResponse();
IIS Log is as follows:
**********************************************************************
************
2006-01-05 21:14:39 W3SVC1 AHMET-IPC 192.168.0.163 GET
/sevket3/Default.aspx
tabid=1076&guid=cd709879-6680-4cf7-bb98-2bb85b003f7d 80 -
192.168.0.163
HTTP/1.1 Fareportal+.NET+Request+1.1 - 192.168.0.163 500 0 0
Exception is as follows:
**********************************************************************
************
System.Net.WebException: The remote server returned an error: (500)
Internal
Server Error.
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult
asyncResult)
at System.Net.HttpWebRequest.GetResponse()

It's a server-side error -- your ASP.NET app breaks. You should debug that page.


Cheers, --
Joerg Jooss
news-reply@xxxxxxxxxxxxx



.



Relevant Pages

  • Help please,
    ... [This followup was posted to microsoft.public.dotnet.framework and a copy was sent to the cited author.] ... I am getting a server error when I try to create a Web Project from ... Existing projects are OK as well as new pojects created from Web Matrix ...
    (microsoft.public.dotnet.framework)
  • Problem Copying Web Project
    ... Unable to create Web project 'MyWeb'. ... Server error: The server extensions ...
    (microsoft.public.dotnet.framework.aspnet)
  • Web Project Publishing Error
    ... I have a web project which fails when publishing the project to production ... Server error: A page with ... I get an error message like above for every file in the images directory. ...
    (microsoft.public.vsnet.general)
  • Unable to create web project
    ... Unable to create web project 'virtualdirectory/webproject'. ... Server error: ... unable to process request. ... Subwebs have been created since you last accessed ...
    (microsoft.public.vstudio.development)