我有“解决”,但它是一种“哈克”(我只测试它在本地以及)...
1.创建下面的类:
public class PassThroughAspxHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
var pageInstance = PageParser.GetCompiledPageInstance(context.Request.AppRelativeCurrentExecutionFilePath,
context.Request.PhysicalApplicationPath + context.Request.Path,
context);
pageInstance.ProcessRequest(context);
}
public bool IsReusable
{
get { return false; }
}
}
2项添加到下方的web配置: (这部分是IIS7集成的应用程序池,它会略有不同,如果你使用的是经典的应用程序池):
<system.webServer>
<handlers>
<add verb="*" path="*.aspx"
name="PassThroughAspxHandler"
type="YourNameSpaceHere.PassThroughAspxHandler"/>
</handlers>
</system.webServer>
您是否收到任何错误? – shanish
什么样的错误?没有错误。 –
你真的在运行IIS6还是在经典模式? – MikeSmithDev