【发布时间】:2012-05-24 10:02:56
【问题描述】:
部署后我无法在 azure 中使用 htpphandlers,在本地机器上可以。
在 web.config 中我声明如下
<system.web>
<httpHandlers>
<add verb="*" path="*.cspx" type="WebRole1.Handle,WebRole1"/>
</httpHandlers>
在我的 handler.cs 文件中我写如下。
namespace WebRole1
{ 公共类句柄:IHttpHandler { #region IHttpHandler 成员
bool IHttpHandler.IsReusable
{
get { return true; }
}
void IHttpHandler.ProcessRequest(HttpContext context)
{
context.Server.Transfer("Test.aspx", true);
}
#endregion
}
}
在我的本地机器上工作正常。但是在部署到windows azure之后 500 内部服务器错误。
【问题讨论】:
标签: azure ihttphandler azure-web-roles