405 - ‘Method not Allowed’ adding service hosted in IIS7

6,218

<%windir%>Microsoft.NET/Framework/v3.0/Windows Communication Foundation/ServiceModelReg.exe -i

...then

<%windir%>Microsoft.NET/Framework/v2.0.50727/aspnet_regiis -i -enable

This mapped the proper isapi dll's to the *svc extension, among other things.

Bless Microsoft...

Share:
6,218

Related videos on Youtube

eskerber
Author by

eskerber

Updated on September 17, 2022

Comments

  • eskerber
    eskerber almost 2 years

    I can't seem to get around this problem of adding a web service reference when the web service is hosted in IIS 7.

    I can add it just fine if I am running the VS2008 development server, but when I switch it over to IIS I get a 405 error. It seems to be a permission issue, but what?

    I've tried adding permissions to 'Everyone' in the folder the service lies within, and adding a script mapping of *.svn to aspnet_isapi.dll.

    Anybody know what I might be missing?

    Thanks!

    EDIT: Added a bounty of everything I have. It seems as though putting this question on SO gets the 'This should be on...' birds out, even though Server Fault is where questions go to die.

    • eskerber
      eskerber over 14 years
      I see that server fault is where questions go to die...
    • FlavorScape
      FlavorScape almost 12 years
      yeah server fault eats butt turds.
  • jmservera
    jmservera over 14 years
    +1 (well 2 really). I was just getting exactly this problem from within Visual Studio on Windows 7
  • Michael Todd
    Michael Todd about 14 years
    I know this question is specifically for IIS 7 but in case anyone running IIS 6 stumbles upon this question, the above does not work; however, ensuring that .svc is mapped to aspnet_isapi.dll (and don't forget to use the Framework64 dll if you're running a 64-bit server) fixes this issue. (A thousand thanks to eskerber for leading me in the right direction.)