.html没有在全局中访问application_beginrequest - IIS 7.5 - C#3.5 [英] .html not hitting application_beginrequest in global - IIS 7.5 - C# 3.5

查看:241
本文介绍了.html没有在全局中访问application_beginrequest - IIS 7.5 - C#3.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用.aspx扩展名重新编写了url,现在我将它们更改为.html,它适用于.aspx,但不适用于html。在当地都工作但在网站上它不工作。



我尝试过:



i have re-written url with .aspx extension now i have changed them to .html, it is working fine for .aspx but not for html. on local both are working but on website it is not working.

What I have tried:

I have added a function in Application_BeginRequest which is writing incoming url requests to a file. Every time when a .aspx page visited on website it is writing  it's url to that file but not writing it when a .html page is being called or entered. So basically .html page not hitting Application_BeginRequest<pre>

,请帮助

推荐答案

猜猜看,你'缺少 runAllManagedModulesForAllRequests 设置:

At a guess, you're missing the runAllManagedModulesForAllRequests setting:
<system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
</system.webServer>



ii s - 获取.net来处理IIS7中的所有请求 - 堆栈溢出 [ ^ ]

IIS 7/8中带有runAllManagedModulesForAllRequests的注意事项 - Rick Strahl的Web日志 [ ^ ]


这篇关于.html没有在全局中访问application_beginrequest - IIS 7.5 - C#3.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆