J
Joel D. Kraft
I've been very happy with the performance and new features of my site
since we converted to ASP.NET 2.0 beta 2.
I have noticed a couple of interesting problems, though, which I am
trying to figure out. I can't confirm that they didn't exist under
1.1, but I didn't notice them at that time.
My error handling is configured as follows:
- In IIS, 404 errors are mapped to /site/error/404.aspx.
- "Verify that file exists" is ON for .aspx pages. (So this
really shoudln't be in the picture at all.)
- In web.config, custom errors are OFF
- In global.asax, I have the following code:
if (Context.Error is HttpException)
{
HttpException hex = (HttpException)Context.Error;
if (hex.GetHttpCode() == 404)
Server.Transfer("/site/error/404.aspx");
}
Other errors are just logged to the event log.
- My /site/error/404.aspx sends me email about "interesting" errors
- Other errors are simply logged.
Here are the two problems I am encountering:
First, I have a page, /vision/community.aspx. It exists. It's
there, and it works. The URL to this page was recently sent in
a mass email. When I click on the link in the email, the page
shows up fine, for every person I've asked, the page shows up fine.
BUT almost 100 requests for this page ended up being processed by
my 404 error handler. Is there something else that could cause
a page not to be available? (Some sort of locking issue?!)
I've seen this randomly before with a page here or there and
didn't think anything of it. This, however, is a big problem.
Seconly, I have some pages that really do NOT exist, that
seem to bypass the 404 altogether. I get an exception logged,
and the log shows that the http error code was 404...
System.Web.HttpException: The file '/nofile.aspx' does not exist.
at System.Web.UI.Util.CheckVirtualFileExists(String virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(String
virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean
allowBuildInPrecompile)
at
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext
context, String virtualPath, Boolean noBuild, Boolean allowCrossApp,
Boolean allowBuildInPrecompile)
at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String
requestType, String virtualPath, String path)
at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig)
at
System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
Any insight is greatly appreciated!
Joel
since we converted to ASP.NET 2.0 beta 2.
I have noticed a couple of interesting problems, though, which I am
trying to figure out. I can't confirm that they didn't exist under
1.1, but I didn't notice them at that time.
My error handling is configured as follows:
- In IIS, 404 errors are mapped to /site/error/404.aspx.
- "Verify that file exists" is ON for .aspx pages. (So this
really shoudln't be in the picture at all.)
- In web.config, custom errors are OFF
- In global.asax, I have the following code:
if (Context.Error is HttpException)
{
HttpException hex = (HttpException)Context.Error;
if (hex.GetHttpCode() == 404)
Server.Transfer("/site/error/404.aspx");
}
Other errors are just logged to the event log.
- My /site/error/404.aspx sends me email about "interesting" errors
- Other errors are simply logged.
Here are the two problems I am encountering:
First, I have a page, /vision/community.aspx. It exists. It's
there, and it works. The URL to this page was recently sent in
a mass email. When I click on the link in the email, the page
shows up fine, for every person I've asked, the page shows up fine.
BUT almost 100 requests for this page ended up being processed by
my 404 error handler. Is there something else that could cause
a page not to be available? (Some sort of locking issue?!)
I've seen this randomly before with a page here or there and
didn't think anything of it. This, however, is a big problem.
Seconly, I have some pages that really do NOT exist, that
seem to bypass the 404 altogether. I get an exception logged,
and the log shows that the http error code was 404...
System.Web.HttpException: The file '/nofile.aspx' does not exist.
at System.Web.UI.Util.CheckVirtualFileExists(String virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(String
virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean
allowBuildInPrecompile)
at
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext
context, String virtualPath, Boolean noBuild, Boolean allowCrossApp,
Boolean allowBuildInPrecompile)
at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String
requestType, String virtualPath, String path)
at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig)
at
System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
Any insight is greatly appreciated!
Joel