473,395 Members | 1,986 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

The remote server returned an error: (500) Internal Server Error

Hi all,

I am getting "The remote server returned an error: (500) Internal Server Error" exception. I have written the following code in VS.NET2005 using C# :

WebRequest wr = WebRequest.Create("http://www.ebizautos.com/search-cars/acura-cl-2.2-1997.html");
WebResponse wrs = wr.GetResponse();
Stream strm = wrs.GetResponseStream();

StreamReader SR = new StreamReader(strm);
string str = SR.ReadLine();
string input = "";
while (str != null)
{
input = input + str;
str = SR.ReadLine();
}
It is giving the exception on WebResponse wrs = wr.GetResponse(); statement.
This url is working fine otherwise on the browsers.


Can anybody please help me out to resolve this problem....

Thanks in advance!
Barnali
Sep 6 '07 #1
4 4870
kenobewan
4,871 Expert 4TB
What is the exception?
Sep 6 '07 #2
Plater
7,872 Expert 4TB
A 500 error occurs when the SERVER is having trouble.
It either really does have a problem, or you're sending some kind of malformed/incomplete request that it is not capable of finishing it's task and is bombing out.

Check with the company's website that you're trying to talk to to find out if they're working?
Sep 6 '07 #3
Hi,
First of all, thanks for a quick reply....!!!

Exception is "The remote server returned an error: (500) Internal Server Error"

This error comes specifically while navigating to "http://www.ebizautos.com/search-cars/acura-cl-2.2-1997.html" programatically using WebRequest and WebResponse. All other urls are working fine except this one. I am unable to find out the reason behind this.

Thnks,
Barnali

What is the exception?
Sep 7 '07 #4
Hi,
First of all, thanks for a quick reply...!!!

Url is "http://www.ebizautos.com/search-cars/acura-cl-2.2-1997.html".

Actually I am navigating to the webpages through WebRequest and WebResponse classes. All other urls are navingating properly except this one.

This url is working fine otherwise. Even I have tried to navigate to this url using the "WebBrowser" cotrol in Windows Application in .NET. The "webrowser" control navigates to this url successfully. But when I am try to do this using WebRequest and WebResponse, It is raising that exception.


Thanks,
Barnali

A 500 error occurs when the SERVER is having trouble.
It either really does have a problem, or you're sending some kind of malformed/incomplete request that it is not capable of finishing it's task and is bombing out.

Check with the company's website that you're trying to talk to to find out if they're working?
Sep 7 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Ben | last post by:
hi when I try to excecute an ASP (either JS or VB) script to say, access a database record, I get an Internal Server Error HTTP 500.100 Why? and HOW CAN I FIX THIS? Thanks
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
4
by: jf li | last post by:
I have a Asp.net web application and a Asp.net Web service application. The Web application is using HtmlInputFile to get a 50M size of file selected by end user, read the data of this file and...
1
by: Danny | last post by:
I am posting xml to a server and get the above error returned. The client code is listed below, it works until say a "<" character is put in XmlData. On the server page I try to pick up the XmlData...
0
by: Steve | last post by:
I recently implemented a webservice that was called by a c# application. It all ran fine when they were both on the same server, however when we moved the webservice to another machine (and...
4
by: kuladeep.mohan | last post by:
Hi I am trying to consume a web service from asp.net web page through HTTP POST method and I am getting the following error message "System.Net.WebException: The remote server returned an error:...
4
by: Haxan | last post by:
Hi, Im testing a web service from my windows app in C#. I create a soap body and pass to the HttpWebRequest and then get the response as below. private void TestService() { string quotes =...
1
by: Tito Meinrath | last post by:
Hi, I'm really going mad about this! Currently I'm designing a student course on web services. Because I want them to understand what's really going on when web services correspond with each...
3
by: guillaume.braux | last post by:
Hello, I am running WS2008 + IIS7 + FASTCGI + ZendCore. I have not modified the default ZendCore php.ini configuration file. Actualy, any kind of PHP error, warning or notice gives me...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.