473,785 Members | 2,744 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

3 New Member
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.Crea te("http://www.ebizautos.c om/search-cars/acura-cl-2.2-1997.html");
WebResponse wrs = wr.GetResponse( );
Stream strm = wrs.GetResponse Stream();

StreamReader SR = new StreamReader(st rm);
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 4887
kenobewan
4,871 Recognized Expert Specialist
What is the exception?
Sep 6 '07 #2
Plater
7,872 Recognized Expert Expert
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
Barnali85
3 New Member
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.c om/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
Barnali85
3 New Member
Hi,
First of all, thanks for a quick reply...!!!

Url is "http://www.ebizautos.c om/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
8480
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
10016
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 the following error when attempting to create or open the Web project located at the following URL: 'http://localhost/WebApplication1'. 'HTTP/1.1 500 Internal Server Error'."
4
6211
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 pass the data to the web service. I already modified both web.config files and changed maxRequestLength to 60000(kb). When I debug the upload process, it seems the Web application can get the 50M file and read the data without problem, but when the...
1
3092
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 with: Response.Write(Request.Form); Client side code: ASCIIEncoding encoding = new ASCIIEncoding(); string XmlString = "<TEST"; Stream requestStream = null;
0
13844
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 changed the url of the HttpWebRequest), it only returned (500) errors unless we also moved the client application over to the same machine, whereupon it resumed working. After messing with the IIS settings and various things in the the C# application,...
4
19974
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: (500) Internal Server Error." I have been searchign the web and followed all the options which worked
4
16029
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 = "\""; // Set the uri to send the request to
1
8210
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 other (or other consumers) via SOAP, I want to generate SOAP-messages in XML manually and send it via POST-method to the hosting server. But whenever I try to use HttpWebRequest-Class to get a response from a webservice, I get an "Internal Server...
3
5956
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 immediately a IIS 500 Error (Internal Server Error). It is a good thing in production environnement. For debuging purposes, I want temporary to be able to see PHP warnings and errors embedded on the html page.
0
9643
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10319
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10087
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7496
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5380
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.