Going to ?debug=requestinfo
shows what the issue is:
StartUpErrors: [
{
ErrorCode: "PathTooLongException",
Message: "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.",
StackTrace: "[Object: 11/25/2015 10:13:58 PM]: [REQUEST: ] 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.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync) at System.IO.FileInfo.OpenRead() at ServiceStack.VirtualPath.FileSystemVirtualFile.OpenRead() at ServiceStack.VirtualPath.AbstractVirtualFileBase.OpenText() at ServiceStack.VirtualPath.AbstractVirtualFileBase.ReadAllText() at ServiceStack.Formats.MarkdownFormat.<FindMarkdownPages>d__7.MoveNext() at ServiceStack.Formats.MarkdownFormat.RegisterMarkdownPages(String dirPath) at ServiceStack.Formats.MarkdownFormat.Register(IAppHost appHost) at ServiceStack.ServiceStackHost.LoadPluginsInternal(IPlugin[] plugins)",
Errors: [ ]
},
It’s due to the VFS change mentioned in the release notes of removing /
prefix from routes. Basically Config.ScanSkipPaths
are used to ignore directories like /node_modules/
. But it was no longer skipping them due to the /
prefix and trying to navigate into node_modules throws an exception when path is greater than 260 chars.
This is already fixed in v4.0.49 on MyGet but you can fix it in v4.0.48 by removing the /
prefix from Config.ScanSkipPaths
, e.g:
SetConfig(new HostConfig { ... });
for (int i = 0; i < Config.ScanSkipPaths.Count; i++)
{
Config.ScanSkipPaths[i] = Config.ScanSkipPaths[i].TrimStart('/');
}
Or by re-adding them manually to HostConfig, e.g:
SetConfig(new HostConfig {
ScanSkipPaths = {
"node_modules/","bin/","obj/","bower_components/", "wwwroot/", "wwwroot_build/"
}
});