ASP.NET [HttpException (0x80004005): cannot use master .. to exit top directory.]
I assume you did something like this:
Response.Redirect("../SomePage.aspx");
When using relative paths, you can only navigate to pages that are in the same virtual directory as the page on which the request is being made. What you have done is called this from the page located at the top of the virtual Directory Tree. Thus, you have several options:
- Correct your url so it doesn't point to a higher level. ie: remove
../
- Use the complete URL. those.:
http://www.example.com/SomePage.aspx
- Use IIS to set up the virtual directory at a higher level.
For option 3:
- Open IIS Manager.
- Go to the directory where the page is located and right click / properties.
- On the "Virtual Directory" tab, select "Delete."
- Close the dialog and right click / properties in the directory you want to be root.
- In the "Virtual Directory" tab, select "Add"
source to share
Most likely, googlebot or some other bots are killing your site.
http://www.kowitz.net/archive/2006/12/11/asp.net-2.0-mozilla-browser-detection-hole.aspx
http://todotnet.com/post/2006/07/01/Get-GoogleBot-to-crash-your-NET-20-site.aspx
the solution is to add the .browser files to your site's app_browser folder.
source to share
Apologies as this is very old, but I had this problem for several days in an MVC3 application. I kept going into my _Layout.cshtml file and removing any link to css or javascript files (I used JQuery in this app) to find the dreaded .. / link. I couldn't find it. Then I tried to work around my problem by simply dropping the redirect to the application root. It didn't work either. The stack trace on YellowScreenOfDeath gave me a hint:
[HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.]
System.Web.Util.UrlPath.ReduceVirtualPath(String path) +11496719
System.Web.Util.UrlPath.Reduce(String path) +171
System.Web.Configuration.**AuthenticationConfig**.GetCompleteLoginUrl(HttpContext context, String loginUrl) +218
System.Web.Security.FormsAuthenticationModule.OnEnter(Object source, EventArgs eventArgs) +156
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +270
Bottom line, I had this in my web.config with "../" Removing this or changing the hotfix link fixed my problem.
<authentication mode="Forms">
<forms loginUrl="../home.aspx" timeout="2880" />
</authentication>
source to share