public void ProcessRequest(HttpContext context)
{
string path=HttpContext.Current.Request.Path;
object user=new object();
bool hasPrivilege= SecurityCheck.CheckPrivilege(user,path,formAtcion);
if (hasPrivilege)
{
//继续执行
path=context.Request.Path;
string realPath=context.Request.Path;
HttpContext.Current.Server.Execute(path);
}else{
//跳到错语页面
HttpContext.Current.Server.Transfer("~/Page/Error.aspx");
}
}
出错的时候报错为:Exception Details: System.Web.HttpException: Error executing child request for “/Com.Uds.PMU.Web/Default.aspx.”即执行子请求时出错,用Server.execute()也同样出错
那位兄弟解决过类似问题,帮一下忙。
{
string path=HttpContext.Current.Request.Path;
object user=new object();
bool hasPrivilege= SecurityCheck.CheckPrivilege(user,path,formAtcion);
if (hasPrivilege)
{
//继续执行
path=context.Request.Path;
string realPath=context.Request.Path;
HttpContext.Current.Server.Execute(path);
}else{
//跳到错语页面
HttpContext.Current.Server.Transfer("~/Page/Error.aspx");
}
}
出错的时候报错为:Exception Details: System.Web.HttpException: Error executing child request for “/Com.Uds.PMU.Web/Default.aspx.”即执行子请求时出错,用Server.execute()也同样出错
那位兄弟解决过类似问题,帮一下忙。
解决方案 »
- List<>、DataSet和DataTable绑定到GridView1.DataSource有什么区别
- 关于FCK编辑器加载的问题
- Gridview中的某一列显示成中文
- ~~~100分求一问题--截取字符串方法, 马上兑现,分不够再加~~~
- 请一下在vs2005中的树型控件不支持getChildren()吗?
- 请问论坛首页的树节点展开时动态读入子节点的效果是怎么实现的呢?
- 如何触发点击TreeView的父结点事件
- 问,如下语句为什么出错?
- CS0234: 类型或命名空间名称“SQL”在类或命名空间“System.Data”中不存在(是否缺少程序集引用?)
- 请问如何得到引发提交的对象?
- 求一简单SQL语句
- 100分望高手笑纳(求一简单的存储过程)
IHttpHandle本来就是截断正常的请求来由你自己处理,应该不会在允许真正的地址来处理请求了
是想做一个权限总控,而且IHttpModule可以实现,但我感到奇怪的是:怎么在IhttpHandle中会用不了
Server.transfer()和server.Execute()
Context.Application["online"] = Online;
Context.Application.UnLock();看上面这个,是不是用Context?
IHttpModule != IHttpHandle
要是两者作用一样,干吗还要2个呢,你说呢,呵呵
这个错误,我发现也有好多人碰到这样的问题。
public bool IsReusable {
get {
return true;
}
}
是起什么作用的?