title: What causes an HTTP 405 “invalid method (HTTP verb)” error when POSTing a form (using CPSHOST.DLL) on IIS 7.5
body: <p>I'm in the process of migrating a series of classic ASP web pages from a Windows 2000 server to a Windows 2008 R2 server.  One of the pages uses CPSHOST.DLL (in the Scripts folder) to upload a file to the server.</p>
  
  <p>The page in question uses a POST method on the form, but consistently returns a "Method Not Allowed" response when the page runs.  I have changed the method from lowercase to uppercase, and I have configured the ISAPI and CGI Restrictions to allow the cpshost.dll to run.</p>
  
  <p>The page in question prompts the userid for a file format type (3 possible options are available), and a file name.  The form header is as follows:</p>
  
  <pre><code>&lt;form enctype="multipart/form-data" method="POST" action="http://dcnb/scripts/cpshost.dll?PUBLISH?http://dcnb/scripts/dcn_cnam_repost.asp?user_id=jsommer&amp;telco_code=GRGS" id=image_upload name=image_upload &gt;
  </code></pre>
  
  <p>I tried changing the follwup .asp routine, in case it was throwing the error, but it made no difference (i.e., I changed the code to call a different web page than the repost.asp page, but to no avail.</p>
  
  <p>The detailed error informaiton tells me the following:</p>
  
  <p>Module: StaticFileModule, Notification: ExecuteRequestHandler, Handler: StaticFile, and Errorcode: 0x800700001.</p>
  
  <p>The Requested URL is: </p>
  
  <pre><code>http://dcnb/scripts/cpshost.dll?PUBLISH?http://dcnb/scripts/dcn_cnam_repost.asp?user_id=jsommer&amp;telco_code=GRGS
  </code></pre>
  
  <p>The physical path is listed as c:\inetpub\wwwroot\dcn\scripts\cpshost.dll, which is correct.  The Logon Method and Logon User are both Anonymous.</p>
  
  <p>Any help with this would be greatly appreciated.  I have looked around for pure ASP solutions for uploading files (to eliminate the use of cpshost.dll), but have yet to find one that works in the IIS 7 environment.  If anyone has any suggestions there, I'm all ears.</p>
  
  <p>Thanks in advance for any help that you can provide.  I appreciate it!</p>