为什么使用ihttpModule之后.
原本好好的网站图片都不能正常显示了.
查看图片路径是正确的啊.
为什么不能正常显示啊.高手指教指教啊.
代码为:
public class demo:IHttpModule
{
public void Init(HttpApplication http)
{
http.BeginRequest+=new EventHandler(http_BeginRequest);
http.EndRequest+=new EventHandler(http_EndRequest);
}
public void http_BeginRequest(object sender,EventArgs e)
{
HttpApplication application = (HttpApplication)sender;
HttpContext context = application.Context;
context.Response.Write(@"<h1><font color=red>
HelloWorldModule: Beginning of Request
</font></h1><hr>"); }
public void http_EndRequest(object sender,EventArgs e)
{
HttpApplication application = (HttpApplication)sender;
HttpContext context = application.Context;
context.Response.Write(@"<hr><h1><font color=red>
HelloWorldModule: End of Request</font></h1>"); }
public void Dispose()
{
}
}
web.config
:
<httpModules>
<add name="BLL.demo" type="BLL.demo"/>
</httpModules>
原本好好的网站图片都不能正常显示了.
查看图片路径是正确的啊.
为什么不能正常显示啊.高手指教指教啊.
代码为:
public class demo:IHttpModule
{
public void Init(HttpApplication http)
{
http.BeginRequest+=new EventHandler(http_BeginRequest);
http.EndRequest+=new EventHandler(http_EndRequest);
}
public void http_BeginRequest(object sender,EventArgs e)
{
HttpApplication application = (HttpApplication)sender;
HttpContext context = application.Context;
context.Response.Write(@"<h1><font color=red>
HelloWorldModule: Beginning of Request
</font></h1><hr>"); }
public void http_EndRequest(object sender,EventArgs e)
{
HttpApplication application = (HttpApplication)sender;
HttpContext context = application.Context;
context.Response.Write(@"<hr><h1><font color=red>
HelloWorldModule: End of Request</font></h1>"); }
public void Dispose()
{
}
}
web.config
:
<httpModules>
<add name="BLL.demo" type="BLL.demo"/>
</httpModules>
解决方案 »
- 怎么在session自动清除前获取客户端Ip
- 怎么样写(删除选中的邮件)代码!
- 绑定网卡(mac地址)
- 服务器上多个站点,改其中一个web.config影响到其它站点的Session也重启?
- asp.net如何便利页面上所有文本框?
- 最近项目中遇到的一些问题
- visual studio 2005和dreamweaver的转化问题
- 想入门,请大家指点方向
- 如何在后台(c#)判断计算结果x是否为整数!!
- 谁知道论坛的代码怎么写?《asp.net,c#》
- 提示:类型“ImageButton”的控件“DataGrid1_ctl19_ctl01”必须放在具有 runat=server 的窗体标记内。
- 嵌套在gridview中checkbox怎样让用户只能单选,就像radiobutton一样,一次只能选择一个!!!急!在线等!
/image/XXX.jpg