标签:
IT/科技扩展名 |
方法如下,引用自MSDN:
1.可执行文件:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
同时去掉确认文件存在前的勾
2.如果你的实际文件名是以.mspx结尾的,添加
<compilation>
<httpHandlers>
</httpHandlers>
3.
如果你的实际文件名是以.aspx结尾的,在global.asax里(或者用urlrewrite):
<%@ Application%>
<script language=C# runat="server">
protected void Application_BeginRequest(Object sender, EventArgs
E)
{
Context.Items[REWRITE_KEY] = true;
url = url.Replace(MSPX_EXT,ASPX_EXT);
Context.RewritePath(url);
}
protected void Application_PreRequestHandlerExecute
{
if (Context.Items[REWRITE_KEY] != null)
Context.RewritePath(Context.Request.RawUrl);
}
</script>