Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hello,

I receive an exception while trying to use the following code.
System.Uri uri = new Uri("http://My-SERVER/powershell?serializationLevel=Full");

Here is the error mesaage
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.


Can anyone help me on this?

Regards
Sebastian
Posted
Updated 15-May-12 20:42pm
v4
Comments
Richard MacCutchan 15-May-12 9:03am    
It looks like your webserver cannot find the page you asked for. Are you sure powershell is the correct spelling?
Sebastian T Xavier 15-May-12 9:12am    
yes, its correct.

This problem occurs because the handler mapping for the requested resource points to a .dll file that cannot process the request.

To resolve this problem:
Edit the handler mapping for the requested resource to point to the .dll file that can process the request. To do this, follow these steps:

1. Click Start, click Run, type inetmgr.exe, and then click OK.
2. In IIS Manager, expand server name, expand Web sites, and then click the Web site that you want to modify.
3. In Features view, double-click Handler Mappings.
4. Right-click the script mapping that you want to edit, and then click Edit.
5. In the Edit Script Map dialog box, type the appropriate executable file in the Executable box, and then click OK.


See details here: Microsoft Support: Error message when you visit a Web site that is hosted on IIS 7.0: "HTTP Error 500.0 – Internal Server Error"[^]
 
Share this answer
 
Comments
Sebastian T Xavier 16-May-12 0:43am    
Hello Sandeep, Thanks for your elaborate reply.
Can I have more explanation on step 4 & 5
a..> What script-mapping I should use. This URI is for power-shell.
b..> What will be the correct executable file for this?

Regards
Sebastian
Sandeep Mewara 16-May-12 11:33am    
It would be difficult for me to tell about it Sebastian. Not much of an idea about what you ask.
Hy,

The Web server is generating internal error log which can give you more details of what went wrong


It is not a client-side issue.This error can only be fix to the Web server software. Web server site operator to locate and analyse the logs which should give further information about the error.

Here i can explain the 500 HTTP error in the HTTP Cycle:

1.Get an IP address from the IP name of the site. This provide domain name servers (DNSs).

2.Using that IP address , It opens an IP socket connection

3.Write an HTTP data stream through that socket.

4.Receive an HTTP data stream back from the Web server in response. This data stream contains status codes like 500 whose values are determined by the HTTP protocol. Parse this data stream for status codes and other useful information.

Thanks,
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900