Re: 500 error while GetResponse()
- From: "Pooja" <Pooja@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 6 Sep 2005 04:19:03 -0700
Hi Kevin,
I'll try to explain it again:
I have developed an ASP.Net application - www.ABC.com
Now i want to develop a utility which checks whether my site is up or not.
If it is not then i need to send an SMS alert to few people to check the
status of the site.
This utility is a console app which makes a HTTPRequest to - www.ABC.com
So, the point at which i say - GetResponse() - i.e. when i'm trying to get
the response of the request i made to my site, its giving me a
System.WebException - "The remote server returned an error: (500) Internal
Server Error."
Hope i'm able to explain the problem in a better way this time.
Thanks,
Pooja.
"Kevin Spencer" wrote:
> > HttpWebResponse webresponse = (HttpWebResponse)wrGETURL.GetResponse();
> >
> > I get an error when GetResponse() is executed. The error is :
> >
> > "The remote server returned an error: (500) Internal Server Error."
>
> This question is a bit confusing. It sounds like you're saying that the line
> that executes the GetResponse method is throwing an error. However, you say
> that the error is "The remote server returned an error: (500) Internal
> Server Error." Now, as you're developing an ASP.Net application, this could
> mean one of 2 things:
>
> 1. The Response contains a 500 status code.
> 2. Your ASP.Net Page is displaying a 500 status code.
>
> The first would mean that the server that your WebRequest sent a Request to
> has a problem.
> The second would mean that your ASP.Net app has a problem.
>
> If your app is not the one having a problem, where are you seeing this
> error? An HttpWebResponse will contain the status code and other information
> about the success or failure of the Request. But if the problem is in your
> app, you need to be more specific about how you're getting this error
> information.
>
> Can you clear this issue up?
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> ..Net Developer
> Neither a follower nor a lender be.
>
> "Pooja" <Pooja@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:F44641B7-19FF-4E2B-B863-14F44FC99B53@xxxxxxxxxxxxxxxx
> > Hi All,
> >
> > I'm trying to make a web request to my site from some other ASP.Net
> > Application. Code used for that is:
> >
> > string sURL = "<my site url>";
> >
> > HttpWebRequest wrGETURL = (HttpWebRequest) WebRequest.Create(new
> > Uri(sURL));
> >
> > wrGETURL.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;
> > .NET CLR 1.1.4322)";
> >
> > wrGETURL.AllowAutoRedirect = true;
> > wrGETURL.CookieContainer = new CookieContainer();
> >
> > wrGETURL.CookieContainer.Add(new Uri(sURL), new Cookie("bhResults",
> > "bhtz=0"));
> >
> > wrGETURL.CookieContainer.Add(new Uri(sURL), new Cookie("bhPrevResults",
> > "bhtz=0"));
> >
> > HttpWebResponse webresponse = (HttpWebResponse)wrGETURL.GetResponse();
> >
> > I get an error when GetResponse() is executed. The error is :
> >
> > "The remote server returned an error: (500) Internal Server Error."
> >
> > Any ideas why i'm getting this error?
> >
> > Thnx in advance.
> > Pooja.
>
>
>
.
- Follow-Ups:
- Re: 500 error while GetResponse()
- From: Kevin Spencer
- Re: 500 error while GetResponse()
- From: michaelcoleman72@xxxxxxxxx
- Re: 500 error while GetResponse()
- From: michaelcoleman72@xxxxxxxxx
- Re: 500 error while GetResponse()
- References:
- 500 error while GetResponse()
- From: Pooja
- Re: 500 error while GetResponse()
- From: Kevin Spencer
- 500 error while GetResponse()
- Prev by Date: Partial Classes, .Net 2.0 and Custom Attributes
- Next by Date: Re: How to call 2 events inside the datagrid
- Previous by thread: Re: 500 error while GetResponse()
- Next by thread: Re: 500 error while GetResponse()
- Index(es):
Relevant Pages
|