Path Too Long Exception being thrown before HTTPHandler gets request
- From: Seth <a@xxxxx>
- Date: Tue, 20 Sep 2005 15:17:40 -0500
Ok, here is my setup. I have a fully functioning HTTP Handler implemented. The handler is supposed to handle every single request that comes in to a particular virtual directory. Thus, in IIS, I have a mapping of .* to the aspnet_isapi.dll. And my web.config has an entry thusly:
<add verb="*" path="*" type="HandlerClass, HandlerAssembly" />
And this is working just fine thus far. The handler gets all the requests and works like a champ. The requests coming in usually have the format like:
http://localhost/Handler/4737651658416573246119
And since we are capturing everything irregardless of the filenames or extensions or whatever, that finds its way to the handler.
And now my problem. We hit a snag today during testing where apparently, the string of numbers after http://localhost/Handler/ was too long. We are getting this exception:
-----------------------------------------------------------------------
The path is too long after being fully qualified. Make sure path is less than 260 characters.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.PathTooLongException: The path is too long after being fully qualified. Make sure path is less than 260 characters.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[PathTooLongException: The path is too long after being fully qualified. Make sure path is less than 260 characters.]
System.IO.Path.nGetFullPathHelper(String path, Char[] invalidPathChars, Char[] whitespaceChars, Char directorySeparator, Char altDirectorySeparator, Char volumeSeparator, Boolean fullCheck, String& newPath) +0
System.IO.Path.GetFullPathInternal(String path) +165
System.IO.Path.GetFullPath(String path) +19
System.Web.HttpApplication.CheckSuspiciousPhysicalPath(String physicalPath) +19
System.Web.Configuration.HttpConfigurationSystem.ComposeConfig(String reqPath, IHttpMapPath configmap) +175
System.Web.HttpContext.GetCompleteConfigRecord(String reqpath, IHttpMapPath configmap) +434
System.Web.HttpContext.GetCompleteConfig() +49
System.Web.HttpContext.GetConfig(String name) +195
System.Web.CustomErrors.GetSettings(HttpContext context, Boolean canThrow) +20
System.Web.HttpResponse.ReportRuntimeError(Exception e, Boolean canThrow) +39
System.Web.HttpRuntime.FinishRequest(HttpWorkerRequest wr, HttpContext context, Exception e) +486
---------------------------------------------------------------------
And I know for a fact that I am not throwing this exception. I have the 1st line of my ProcessRequest function breakpointed, and I am not hitting my breakpoint when this exception is thrown. Somewhere in the bowels of ASP.net, it is being thrown. If I shorten the string of numbers in the URL, it works. But that isn't a viable solution.
Finally, my question. Is there anyway to force ASP.net to ignore the length of the URL?
.
- Prev by Date: Re: a kind of digital signature for a record in a table ....
- Next by Date: Re: HELP..! ASP.NET 2.0 MasterPage and menu Question..
- Previous by thread: Re: Expression does not produce a value: Session error?
- Next by thread: Re: HELP..! ASP.NET 2.0 MasterPage and menu Question..
- Index(es):
Relevant Pages
|