We help IT Professionals succeed at work.

HTTP Error 405 - HTTP verbs and IIS 7

9,360 Views
Last Modified: 2012-06-21
Hello,

I recently moved a website from an IIS 6 to an IIS 7 machine. Ever since then, our .asp email forms (very simple) are not working. When clicking the 'submit' button - the user is taken to:

405 - HTTP verb used to access this page is not allowed.
The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.

Doing some research I have come across multiple articles referring to allowing HTTP verbs, configuring dynamic content, etc...but most of the time the how-to's contain steps for options I am not seeing. I have the .net framework installed on the server. I have tried swtiching "POST" to "GET", Get gives me a 404 error instead. Any ideas? I am (obviously) new to IIS 7.
Comment
Watch Question

Commented:
One thing I found is that on IIS7, ASP.NET pages are allowed by default, but not ASP. Go to IIS manager, expand the machine, then go to Web Services Extension and make sure ASP is enabled.

Author

Commented:
I came across an article saying that exact thing, but I do not have a "Web Services Extension" option anywhere. The article said to confirm that the .NET framework was installed, which I confirmed and did a repair install.

Commented:
Try going into Add/Remove Programs and then Windows Components. If I remember, somewhere under IIS/Web Server there is a checkbox for ASP.

Commented:
OK... that checkbox is under
 
Add/Remove Windows Components
-Application Server
--Internet Information Services (IIS)
---World Wide Web Service

Author

Commented:
Dont even see that (Application Server or World Wide Web service)

Dont know if this matters or not, but the OS is Windows Web Server 2008. I'm guessing it does not have all the same features as the regular edition.

Commented:
Ahhh, woops, I should have caught the IIS7 reference. Sorry. I was thinking 2003.

Go back to "Install Windows Features" where you installed IIS7 from,
drill down into the [+] list for Application Development under the Web
Server node, and select ASP.

Commented:
Sorry, almost forgot the next part... Now, go into the IIS Manager and create a new Application Pool. Name it whatever, but choose No Managed Code in the first drop down and for Pipeline, choose Classic and start App Pool immediately. Assign your site with the Classic ASP pages to this Pool.

Author

Commented:
Ok - I added ASP and assigned the site to the new App pool. Now when I click submit, the page processes for a little bit, then I get:

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

Commented:
Well, that's better... I think :) It indicates that the page is trying to run.

Can you turn off Friendly HTTP Error messages in your browser? That may help reveal the true error message. You should also see something in your event viewer as well as the IIS log file for that site.

Author

Commented:
2008-07-09 16:50:24 192.168.118.3 GET /court_reporting_turnin.html - 80 - 192.168.1.22 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.9)+Gecko/2008052906+Firefox/3.0 304 0 0 171

2008-07-09 16:50:50 192.168.118.3 POST /court_reporting_turnin.asp |65|80040213|The_transport_failed_to_connect_to_the_server.__ 80 - 192.168.1.22 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.9)+Gecko/2008052906+Firefox/3.0 500 0 0 20155

Author

Commented:
and by the way - these scripts worked fine on the previous server, and have not been altered in any way during the move

Commented:
  • Do you have SMTP installed on the 2008 box?
  • Are you using CDO.NewMail instead of CDONTS? (I would assume a different error though if this were the case).
  • Do you have SMTP configuration specified in your e-mail code and if so, have you verified that they are correct?
  • If your mail script connects to the local server, are you using 127.0.0.1 or are you using the normal IP address of the server? Is the windows firewall (or any other enabled)? If you have a firewall and you are using the normal IP, check to make sure that the firewall will allow port 25 through from the local host. I've found firewalls to sometimes be twitchy about this.
If you've checked all of this and it seems OK and it still doesn't work, I'd go the specified configuration route. Here's some sample code for configuring the Email object:

Dim CDO : Set CDO = Server.CreateObject("CDO.Message")
Dim urn : urn = "http://schemas.microsoft.com/cdo/configuration/"
With CDO.Configuration.Fields
  .Item(urn & "sendusing") = 2
  .Item(urn & "smtpserver") = "your.mailserver.com"
  .Item(urn & "smtpserverport") = 25
  .Item(urn & "smtpconnectiontimeout") = 60
  .Item(urn & "smtpauthenticate") = 1 '0 for no SMTP Authentication
  .Item(urn & "sendusername") = "smtp_account@mailserver.com"
  .Item(urn & "sendpassword") = "password"
  .Update
End With

Open in new window

Author

Commented:
Progress!

I had the SMTP installed before but now I dont see it. I downloaded a free SMTP program to test it and the script worked. Do you remember where the SMTP feature is?
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Got it! You are a saint!

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.