Reputation:
I am not able to work with htpphandlers in azure after deploy, it is ok with in the local machine.
In web.config I declared as follows
<system.web>
<httpHandlers>
<add verb="*" path="*.cspx" type="WebRole1.Handle,WebRole1"/>
</httpHandlers>
In my handler.cs file i written as follows.
namespace WebRole1
{ public class Handle : IHttpHandler { #region IHttpHandler Members
bool IHttpHandler.IsReusable
{
get { return true; }
}
void IHttpHandler.ProcessRequest(HttpContext context)
{
context.Server.Transfer("Test.aspx", true);
}
#endregion
}
}
In my local machine it is working fine. But after deploy to windows azure getting 500 internal server error.
Upvotes: 0
Views: 850
Reputation: 20556
I think your problem is related with having custom handlers in system.web instead of system.webserver.
Move your custom HTTP Handler to System.webserver as below:
<system.webserver>
<httpHandlers>
<add verb="*" path="*.cspx" type="WebRole1.Handle,WebRole1"/>
</httpHandlers>
<system.webserver>
Upvotes: 1