473,757 Members | 2,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why "(500) Internal Server Error" throwed?

Hi,

When I am using the fowllowing code to open page
http://spaces.msn.com/members/mailcall/
....
try{
string url = http://spaces.msn.com/members/mailcall/;
HttpWebRequest httpReq = null;
HttpWebResponse httpResp = null;
httpReq = (HttpWebRequest )WebRequest.Cre ate(url);
httpResp = (HttpWebRespons e) httpReq.GetResp onse();
}
catch(WebExcept ion ex)
{
....
}
....
I always got an WebException which says "The remote server returned an
error: (500) Internal Server Error". But actually if you open that page in
IE, it can be opened without any problem. How can I open this page in my
program and get the html source?

Any help would appreciate!

Andy
Feb 22 '06 #1
2 7257
When I go to that address, IE redirects me to
http://spaces.msn.com/mailcall/. Have you tried connecting to that address
rather than the one you have been?

"Andy Chen" <pp****@hotmail .com> wrote in message
news:ei******** ******@TK2MSFTN GP14.phx.gbl...
Hi,

When I am using the fowllowing code to open page
http://spaces.msn.com/members/mailcall/
...
try{
string url = http://spaces.msn.com/members/mailcall/;
HttpWebRequest httpReq = null;
HttpWebResponse httpResp = null;
httpReq = (HttpWebRequest )WebRequest.Cre ate(url);
httpResp = (HttpWebRespons e) httpReq.GetResp onse();
}
catch(WebExcept ion ex)
{
...
}
...
I always got an WebException which says "The remote server returned an
error: (500) Internal Server Error". But actually if you open that page in
IE, it can be opened without any problem. How can I open this page in my
program and get the html source?

Any help would appreciate!

Andy

Feb 22 '06 #2
Thus wrote Andy,
Hi,

When I am using the fowllowing code to open page
http://spaces.msn.com/members/mailcall/
...
try{
string url = http://spaces.msn.com/members/mailcall/;
HttpWebRequest httpReq = null;
HttpWebResponse httpResp = null;
httpReq = (HttpWebRequest )WebRequest.Cre ate(url);
httpResp = (HttpWebRespons e) httpReq.GetResp onse();
}
catch(WebExcept ion ex)
{
...
}
...
I always got an WebException which says "The remote server returned an
error: (500) Internal Server Error". But actually if you open that
page in
IE, it can be opened without any problem. How can I open this page in
my
program and get the html source?
Any help would appreciate!


You don't send any HTTP header on which spaces.msn.com may rely on, like
User-Agent or Accept-Language. Try to send the same HTTP headers like a browser
(e.g. IE6) does. You can use tools like Fiddler to capture the HTTP traffic.

Cheers,
--
Joerg Jooss
ne********@joer gjooss.de
Feb 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3018
by: Sam | last post by:
Guys facing a strange problem any clue would really rescue me.. i am using a ASP application with following things Server : Intel Xeon (TM) CPU 2GHz, 2GB RAM, 136GB HDD OS : Windows 2000 Advanced server. IIS5.0 Database: Oracle (Using ADODB to connect to the Database) App server running on the same machine (COM+)
4
3324
by: David Sworder | last post by:
Consider the following line of code (it's not important what it does): resp.DocItem=Relations.SelectDocItems_BySearchString(req.SearchPhrase); It turns out that this line is in error. The property 'DocItem' should be 'DocItems.' The problem is that instead of notifying me of where the problem has occurred, the compiler just crashes with an "internal error" (see bottom of this message). Now if I were to write: ...
1
4540
by: gerr | last post by:
Visual studio 2003 "HTTP/1.1 500 Internal Server Error" when trying to create a new Asp.net site with Visual Studio 2003 on localServer/IIS 5.1. Anyone have any new solutions or urls to point me to for this problem short of reinstalling the local developer XP OS/IIS 5.1 ? I have tried everything else listed in various threads. I think my mistake was thinking the installation for v/st 2003 was going to upgrade my V/Studio.net 2001, ( I...
1
2865
by: gerr | last post by:
Visual studio 2003 "HTTP/1.1 500 Internal Server Error" when trying to create a new Asp.net site with Visual Studio 2003 on localServer XP Pro/IIS 5.1. Everything worked fine prior to installing V/Studio 2003. Was running V/Studio classic 6/Asp parallel with V/Studio 2002/aspx. Anyone have any new solutions or urls' to point me to for this problem short of reinstalling the local developer setup consisting of Win XP OS/IIS 5.1 along with FP...
1
1206
by: phranque | last post by:
I am trying to create a webservice on VS.NET 2003 and I get this error. What gives?
2
4123
by: Sosa | last post by:
Greetings, I have XP Pro and installed IIS 5.1. I tried to create a web service through VS.Net 2003 Pro. When I click the Open button, I get the above subject line error message. I've looked online for answers, but to no avail. Any suggestions from anyone who has had this experience? Now I'm a beginner in this art. I'm trying to learn how to implement WSs for a small distributed application. Nothing critical. Most Thankful. . . Al
1
8205
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...
23
24567
by: ticfranca | last post by:
Hi, I'm getting this error in the code below: sub Pega_recorde { $database = 'bundinha'; $host = 'localhost'; $usuario = 'myhumoradm'; $senha = 'my8xr2d2'; $dbh=DBI->connect("DBI:mysql:database=$database;host=$host","$usuario","$senha") or die "Can't open DB: $!";
1
7055
by: bruce | last post by:
i'm getting the following error: mechanize._response.httperror_seek_wrapper: HTTP Error 500: i'm running python 5.1 and mechanize 0.1.7b I have no idea as to what I have to change/modify/include to handle this issue. The link that I'm testing is at the bottom of the page. When I insert the link into the browser, I actually get an err page.. so, I suspect that there is a handler that I should be able to modify/use to handle this
0
9904
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9884
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,...
0
9735
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8736
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5168
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...
0
5324
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3828
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3395
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2697
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.