Will "the Mighty" Strohl

.Net Error: The specified path, file name, or both are too long.

Here is an error that kind of irritates me only because Microsoft should have thought this one through.  However, we find ourselves thinking or saying that more often then we'd like, huh?

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.

This error doesn't necessarily refer to your URL as most of us would immediately think.  It can and often does refer to the physical file path of the application, its providers, or its controls.  For instance, on a default installation of Microsoft Visual Web Developer Express Edition (that's a mouhtful, huh?), the default location for web sites is a path similar to below:

C:\Documents and Settings\[username]\My Documents\Visual Studio 2005\WebSites\[websitename]

However, if we choose to instead create and run our web sites from the root of the drive, this error would likely go away:


I hope this helps! 

blog comments powered by Disqus