GET of smidge'd scripts/css 失败并出现 500 错误 - InternalCreateDirectory 抛出
GET of smidge'd scripts/css fails with 500 error - InternalCreateDirectory throws
Smidge 3.0.0
我正在按照 https://github.com/Shazwazza/Smidge 中的说明进行操作。但是还没有能够为我工作。我在获取捆绑包 js/css 文件时收到 500 错误。在 Chrome 调试器中进行一些挖掘后,我发现该错误似乎与 Smidge 无法创建缓存文件夹有关。这是堆栈 - 我通过像这样导航到 bundle JS 文件来复制它:
获取http://localhost:8241/sb/app-scripts.js.v3
结果:
UnauthorizedAccessException: 访问路径 'C:\Users\USERNAME\source\repos\PROJECTNAME\App_Data\Smidge\Cache\MACHINENAME' 被拒绝。
System.IO.__Error.WinIOError(int errorCode, string maybeFullPath)
System.IO.Directory.InternalCreateDirectory(string fullPath, string path, object dirSecurityObj, bool checkHost)
System.IO.Directory.InternalCreateDirectory助手(字符串路径,bool checkHost)
Smidge.FileSystemHelper.GetCacheFilePath(IWebFile file, bool fileWatchEnabled, string extension, ICacheBuster cacheBuster, out Lazy fileInfo)
Smidge.FileProcessors.PreProcessManager+d__7.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
Smidge.FileProcessors.PreProcessManager+d__6.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
Smidge.FileProcessors.PreProcessManager+d__5.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
Smidge.Controllers.SmidgeController+d__7.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
lambda_method(闭包,对象)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker+d__12.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker+d__10.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext 上下文)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker+d__14.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+d__22.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext 上下文)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+d__17.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+d__15.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
Microsoft.AspNetCore.Builder.RouterMiddleware+d__4.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
Microsoft.AspNetCore.Builder.RouterMiddleware+d__4.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware+d__6.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+d__7.MoveNext()
IIS 运行 在另一个帐户上,它没有写入您的配置文件文件夹的权限。更改应用程序,使其不必访问配置文件文件夹或需要特定权限的文件夹。
Smidge 3.0.0
我正在按照 https://github.com/Shazwazza/Smidge 中的说明进行操作。但是还没有能够为我工作。我在获取捆绑包 js/css 文件时收到 500 错误。在 Chrome 调试器中进行一些挖掘后,我发现该错误似乎与 Smidge 无法创建缓存文件夹有关。这是堆栈 - 我通过像这样导航到 bundle JS 文件来复制它:
获取http://localhost:8241/sb/app-scripts.js.v3
结果:
UnauthorizedAccessException: 访问路径 'C:\Users\USERNAME\source\repos\PROJECTNAME\App_Data\Smidge\Cache\MACHINENAME' 被拒绝。 System.IO.__Error.WinIOError(int errorCode, string maybeFullPath) System.IO.Directory.InternalCreateDirectory(string fullPath, string path, object dirSecurityObj, bool checkHost) System.IO.Directory.InternalCreateDirectory助手(字符串路径,bool checkHost) Smidge.FileSystemHelper.GetCacheFilePath(IWebFile file, bool fileWatchEnabled, string extension, ICacheBuster cacheBuster, out Lazy fileInfo) Smidge.FileProcessors.PreProcessManager+d__7.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务) Smidge.FileProcessors.PreProcessManager+d__6.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务) Smidge.FileProcessors.PreProcessManager+d__5.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务) Smidge.Controllers.SmidgeController+d__7.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务) lambda_method(闭包,对象) Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker+d__12.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务) Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker+d__10.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext 上下文) Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker+d__14.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务) Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+d__22.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext 上下文) Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+d__17.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务) Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+d__15.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务) Microsoft.AspNetCore.Builder.RouterMiddleware+d__4.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务) Microsoft.AspNetCore.Builder.RouterMiddleware+d__4.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务) Microsoft.AspNetCore.Authentication.AuthenticationMiddleware+d__6.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+d__7.MoveNext()
IIS 运行 在另一个帐户上,它没有写入您的配置文件文件夹的权限。更改应用程序,使其不必访问配置文件文件夹或需要特定权限的文件夹。