这是httpHandlers程序如何:
using System;
using System.Web;
using System.Collections.Generic;
using System.Text;
using System.Web.SessionState;namespace ClassLibrary1
{
public class Class1 : IHttpHandler, IRequiresSessionState
{
public bool IsReusable
{
get { return false; }
}
public void ProcessRequest(HttpContext context)
{
context.Server.Execute("/login.html");
}
}
}
我在web.config里设置如下:
<httpHandlers>
<add verb="*" path="*.html" type="ClassLibrary1.Class1"></add>
</httpHandlers>
只要这里的path="*"或是*.html就会出错,执行子请求时出错,总之只要这里的扩展名等于我要重写的地址的扩展名就出这个“执行子请求时出错”错识,其它的都正常。我只要是想给html页面地址重新定向一下,其它的页面不处理的。
那位大哥试试,看看是什么问题,小弟查这个错误用了两天时间了还没有查出来。
using System;
using System.Web;
using System.Collections.Generic;
using System.Text;
using System.Web.SessionState;namespace ClassLibrary1
{
public class Class1 : IHttpHandler, IRequiresSessionState
{
public bool IsReusable
{
get { return false; }
}
public void ProcessRequest(HttpContext context)
{
context.Server.Execute("/login.html");
}
}
}
我在web.config里设置如下:
<httpHandlers>
<add verb="*" path="*.html" type="ClassLibrary1.Class1"></add>
</httpHandlers>
只要这里的path="*"或是*.html就会出错,执行子请求时出错,总之只要这里的扩展名等于我要重写的地址的扩展名就出这个“执行子请求时出错”错识,其它的都正常。我只要是想给html页面地址重新定向一下,其它的页面不处理的。
那位大哥试试,看看是什么问题,小弟查这个错误用了两天时间了还没有查出来。
解决方案 »
- gridview 导出 excel 问题
- 网站错误日志记录了一个很诡异的问题!!!!!各位牛人来看看这是为什么!!标题一定要长!!!!
- 在本地测试图片上传,数据库写入这样的路径,是否是错误的?
- dropdownlist接收值得问题
- 关于DataTable的问题
- 紧急求助,关于.net在2003上运行出错误的问题
- Javascript解释执行的时候,对于函数声明与使用的先后顺序的规则是什么
- 哪里有用ASP.NET编写的网上调查和论坛的原代码?
- 如何深入学习.net?
- 一个简单的bbs的数据库设计是怎样的?
- 请问那位朋友有买了黄忠成的《深入剖析ASP.NET组件设计》一书?
- 一个在页面上显示进度的东西
重定向页面,应该使用context.Response.Redirect()或者context.Server.Transfer()