The remote server returned an error: (405)

Posted by Deysomnath under ASP.NET on 3/12/2008 | Views : 7440 | Status : [Member] | Replies : 2
the remote server returned an error: (405)
Is any one have a idea why I am getting the above error.




Responses

Posted by: Vuyiswamb on: 3/2/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
The problem might be caused by lack of one setting on the IIS(Internet Information Services). ¡°Scripts and executables¡± should be selected in IIS on $erweb_asp. This can be found this way:

1. On the web server select Control Panel and then select Administrative Tools.

2. Select Internet Information Services.

3. Expand server name, expand Web Sites, expand Default Web Site.

4. Right-Click $erweb_asp and select Properties

5. In Virtual Directory tab the ¡°Execute Permissions¡± should be changed from ¡°Scripts only¡± to ¡°Scripts and Executables¡±.

6. No restart of IIS is needed.


This may resolve your problem. If it doesn¡¯t work or there is anything not clear, feel free to post here.


Thank you for posting at Dotnetfunda
[Administrator]

Deysomnath, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 3/2/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
When attempting to POST to a web page in Internet Information Services (IIS) 5.1 under Windows 2000 (Win2k) or Windows XP, you may receive the following error:

The page cannot be displayed The page you are looking for cannot be displayed because the page address is incorrect.

--------------------------------------------------------------------------------

Please try the following: If you typed the page address in the Address bar, check that it is entered correctly. Open the 127.0.0.1 home page and then look for links to the information you want. HTTP 405 - Resource not allowedInternet Information Services

--------------------------------------------------------------------------------

Technical Information (for support personnel) More information:Microsoft Support

Fig - (1) HTTP 405

Cause

The file type is not registered in the IIS script map settings (e.g. .html or .htm). IIS 5.1 only allows HTTP requests of type to GET to unmapped files. HTTP requests of type POST, HEAD, and all others are responded to with a 405 resource not allowed error.

As a security note, you should always remove unused script mappings. This is the default behavior of IIS 6, which will only serve named extensions and refuse all others.

Solution

Add a script map for the extension. A script map associates a particular file type with a given script module. The web server runs the module on the given file and sends the output to the browser, instead of sending the file directly to the browser.

Go to "Control Panel"-"Administrative Tools"-"Internet Information Services".
Expand the tree to "COMPUTERNAME"-"Web Sites"-"Default Web Site".
Right-click on "Default Web Site" and select "Properties". (Alternately, select "Default Web Site" and press Alt+Enter.)
Select the "Home Directory" tab.
Click the "Configuration" button.
From the "Mappings" tab, select the "Add" button.
Click the "Browse..." button, choose "Dynamic Link Libraries *.dll" from the "Files of Type" dropdown, and select c:\WINDOWS\System32\inetsrv\asp.dll.
Type ".html" (without quotes) in the "Extension" box.
Select the "Limit to:" radio button, and type in "GET, POST" (without quotes) in the box next to it.
Click the "OK" button and close all the dialogs. (If the "OK" button is greyed out, then make sure all the entries are correct and try clicking in the file name box.)
You must adjust the above instructions to your particular OS, web site configuration, and file type. You can associate the file type with a different script engine besides asp.dll, which is the ASP 3.0 script engine. There is no need to give IWAM_COMPUTERNAME permission to the file, only IUSR_COMPUTERNAME needs NTFS read and execute permission.



Thank you for posting at Dotnetfunda
[Administrator]

Deysomnath, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response