我用HttpModule实现BS程序权限的控制,另外我用AjaxPro方案实现了Ajax,在Webconfig里,如果我把HttpModuler的注册加上,我的AjaxPro的HttpHandler就不能正常运转了。 这是AjaxPro里的httpHandlers注册
<httpHandlers>
<add verb= "POST,GET " path= "ajaxpro/*.ashx " type= "AjaxPro.AjaxHandlerFactory, AjaxPro "/>
</httpHandlers> 这是我的HttpModule
<httpModules>
<add name= "PaintBusiness.Presentation " type= "PaintBusiness.Presentation.AppModule,PaintBusiness " />
</httpModules> 如果在Webconfig中都加上,httpHandler就会出错,Ajax就不能正常运行,去掉HttpModule在WebConfig中的注册,httpHandler就正常了。 请教各位达人,如果使他们共存,多谢,在线等,解决立马给分。
<httpHandlers>
<add verb= "POST,GET " path= "ajaxpro/*.ashx " type= "AjaxPro.AjaxHandlerFactory, AjaxPro "/>
</httpHandlers> 这是我的HttpModule
<httpModules>
<add name= "PaintBusiness.Presentation " type= "PaintBusiness.Presentation.AppModule,PaintBusiness " />
</httpModules> 如果在Webconfig中都加上,httpHandler就会出错,Ajax就不能正常运行,去掉HttpModule在WebConfig中的注册,httpHandler就正常了。 请教各位达人,如果使他们共存,多谢,在线等,解决立马给分。
解决方案 »
- System.Web.UI.UserControl”不包含“UserName”的定义
- C#创建SQL server 2000 的数据库
- 这样Cookie安全吗?
- |M| 网上取图片的时候提示:System.ArgumentException: 路径中具有非法字符
- 同一网站下,保存路径(cook.Path)对应不同的目录的cookie,如何在网站的根目录下访问?
- 怎样能自定义datagrid的样式~! 怎样能灵活的改变 排列方式~?!!
- 老问题:ASP.NET调试不了 出错信息为:试图运行项目时出错:无法在Web服务器上启动调试。灾难性故障是否希望以后对此项目禁用ASP.NET页调
- DataGrid分页的问题!谢谢
- 关于.net中的[PareChildren(true)]有何用?
- 100分求一个进制算法
- ASP.NET(c#) 连接Oracle数据库
- 大家知道Discuz论坛吧?BBS用户的密码是什么加密算法呢?我想把论坛用户跟自己网站用户同步
http://www.cnblogs.com/xnxylf/archive/2008/12/04/1347676.html
http://www.cnblogs.com/cuihongyu3503319/archive/2008/12/08/1350624.html
void context_BeginRequest(object sender, EventArgs e)
{
HttpApplication app = sender as HttpApplication;
HttpRequest request = app.Context.Request; //Only deal with aspx page
if (!request.CurrentExecutionFilePath.EndsWith(".aspx", StringComparison.OrdinalIgnoreCase))
return; //Deal your things
}
http://www.codinghorror.com/blog/archives/001167.html