Skip to content
This repository has been archived by the owner on Nov 6, 2018. It is now read-only.

Long path or filename throws unhandled exception #201

Closed
Tratcher opened this issue Jun 9, 2016 · 0 comments
Closed

Long path or filename throws unhandled exception #201

Tratcher opened this issue Jun 9, 2016 · 0 comments
Assignees

Comments

@Tratcher
Copy link
Member

Tratcher commented Jun 9, 2016

From @cweb on June 9, 2016 23:16

A long request path will throw an unhandled exception.

An unhandled exception has occurred: The specified path, file name, or both are too long. The fully quali
fied file name must be less than 260 characters, and the directory name must be less than 248 characters.
System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must
be less than 260 characters, and the directory name must be less than 248 characters.
   at System.IO.PathHelper.GetFullPathName()
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.GetFullPathInternal(String path)
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider.GetFullPath(String path)
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider.GetFileInfo(String subpath)
   at Microsoft.AspNetCore.StaticFiles.StaticFileContext.LookupFileInfo() in C:\Users\casaba\Documents\StaticFiles\src\M
icrosoft.AspNetCore.StaticFiles\StaticFileContext.cs:line 141
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context) in C:\Users\casaba\Documents\Sta
ticFiles\src\Microsoft.AspNetCore.StaticFiles\StaticFileMiddleware.cs:line 86
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>d__6.MoveNext()

Copied from original issue: aspnet/StaticFiles#138

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants