How to tell IIS7 to allow POST to a text file (to solve 405)?

A quick workaround, depending on how limited your access is to apps that require admin access, is to rename to a properly configured filetype. You can, for example, provide static content as an aspx file.

Replace "file.txt" with "file.aspx" and you're done (if aspx is allowed to handle POST, which it should be by default).


I believe that IIS supports POSTs on most extension types. Are you using IIS7 or 7.5? I just tested with a .txt file in IIS7.5 and it handles a POST just fine.

I would check in your applicationHost.config (c:\windows\system32\inetsrv), search for the section and check your StaticFile handler, or if you already have a handler for your extension type. The same may be set in your web.config file. Confirm that the verbs property allows for POST.


I am running IIS7 and had to go to the folder I wanted to post inside the IIS Manager to and then go over to "Request Filtering" and you can add "verbs" like post, get..

This will remove the 405 error..