Asp.net 应用程序_BeginRequest未执行
我正在处理几天来的一个问题。我们有一个Silverlight应用程序,主页上几乎没有链接。默认情况下,加载页面时,会加载默认链接(系统)的内容。现在的问题是很少有链接,当我导航到这些链接时,我得到页面不可用错误,但当我刷新/重新加载时,它工作正常 在调查中,我注意到应用程序_BeginRequest没有启动。我在IIS中使用集成管道模式(我无法将其更改为经典)。在web.config中,runAllManagedModulesForAllRequests为true 下面是应用程序_BeginRequest块的部分代码Asp.net 应用程序_BeginRequest未执行,asp.net,silverlight,iis,httprequest,Asp.net,Silverlight,Iis,Httprequest,我正在处理几天来的一个问题。我们有一个Silverlight应用程序,主页上几乎没有链接。默认情况下,加载页面时,会加载默认链接(系统)的内容。现在的问题是很少有链接,当我导航到这些链接时,我得到页面不可用错误,但当我刷新/重新加载时,它工作正常 在调查中,我注意到应用程序_BeginRequest没有启动。我在IIS中使用集成管道模式(我无法将其更改为经典)。在web.config中,runAllManagedModulesForAllRequests为true 下面是应用程序_BeginRe
HttpContextBase httpContext = this.Request.RequestContext.HttpContext;
string requestUri = this.Request.AppRelativeCurrentExecutionFilePath.ToUpperInvariant();
if (requestUri.Equals("~/", StringComparison.OrdinalIgnoreCase)) {
if (this.Request.QueryString[ConfigurationConstants.queryparam] == null) {
this.Response.RedirectPermanent("~/System", true);
}
else {
HttpCookie cookie = new HttpCookie(ConfigurationConstants.Param, this.Request.QueryString[ConfigurationConstants.queryparam]);
this.Response.SetCookie(cookie);
this.Response.RedirectPermanent("~/System", true);
}
return;
}
// special case: skip processing of requests for specific files
if (string.IsNullOrWhiteSpace(this.Request.CurrentExecutionFilePathExtension)) {
if (!string.IsNullOrWhiteSpace(pageId)) {
this.Context.RewritePath("~/Module.aspx", pageId, this.Request.Url.Query);
return;
}
return;
}
它是不是一个特定的http请求类型(POST?PUT?)BeginRequest没有启动?它是一个GET请求。。。我注意到另外一个行为,如果在加载默认页面后,我立即点击其他链接,我得到该页面不可用错误,但如果我等待15-20秒,然后点击其他链接,页面正在加载。