user1912383
user1912383

Reputation: 369

HttpHandler on Azure

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 ?

Upvotes: 2

Views: 2666

Answers (1)

Tormod Hystad
Tormod Hystad

Reputation: 2405

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.

Upvotes: 2

Related Questions