2
votes

I am working on Win7 x64 using VS 2012 on a webapp. I have some httphandlers that work fine on localhost (during debug from VS on IIS express). The handlers are specified on Web.config like this:

<system.web>
   <httpHandlers>
      <add verb="*" path="login.ashx" type="MyWebApp.Logic.LoginHandler" />
   </httpHandlers>
</system.web>

When i publish the webapp to Azure (mydomain.azurewebsites.net/login.ashx) the handlers do not work on.

I found that i had to remove the httphandler from

<system.web> <httpHandlers>

and add it to

<system.webServer> <handlers>

But now it stopped working on the local host even if i keep in system.web and system.webServer. Any ideas please ?

1
Have you tried having the verbs in both handlers and httpHandlers? - mfras3r
In you cloud service project's properties how are you running the web server? IIS or IIS express? - Jason Haley

1 Answers

2
votes

Your localhost is using Classic mode, while Azure uses Integrated mode. See http://msdn.microsoft.com/en-us/library/46c5ddfy(v=vs.100).aspx

Just change your local IIS to use Integrated mode and everything will work the same.