View Full Version : Server Error in '/' Application - Access to path is denied

2012-12-14, 05:34 PM
Console application is installed on WHS2011 system, have tried installing with "Run as Administrator" and without.

On opening the console, following the username registration (e.g. after clicking on Continue) I get the following error (I commented out the customErrors config to show this)

Server Error in '/' Application.

Access to the path 'E:\ServerFolders\LiveBuffer\' is denied.
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.UnauthorizedAccessException: Access to the path 'E:\ServerFolders\LiveBuffer\' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

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:

[UnauthorizedAccessException: Access to the path 'E:\ServerFolders\LiveBuffer\' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +9723726
System.IO.FileSystemEnumerableIterator`1.CommonIni t() +245
System.IO.FileSystemEnumerableIterator`1..ctor(Str ing path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler) +556
System.IO.DirectoryInfo.InternalGetFileSystemInfos (String searchPattern, SearchOption searchOption) +64
System.IO.DirectoryInfo.GetFileSystemInfos() +14
NextPvrWebConsole.Controllers.Api.SystemController .Size(DirectoryInfo Dir) +52
NextPvrWebConsole.Controllers.Api.SystemController .GetDriveStatistics() +281
NextPvrWebConsole.Controllers.DashboardController. Index() +239
lambda_method(Closure , ControllerBase , Object[] ) +62
System.Web.Mvc.ActionMethodDispatcher.Execute(Cont rollerBase controller, Object[] parameters) +17
System.Web.Mvc.ReflectedActionDescriptor.Execute(C ontrollerContext controllerContext, IDictionary`2 parameters) +188
System.Web.Mvc.ControllerActionInvoker.InvokeActio nMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
System.Web.Mvc.Async.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() +28
System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
System.Web.Mvc.Async.AsyncControllerActionInvoker. EndInvokeActionMethod(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +59
System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +240
System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
System.Web.Mvc.Async.AsyncControllerActionInvoker. EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +31
System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +23
System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +128
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
System.Web.Mvc.Async.AsyncControllerActionInvoker. EndInvokeAction(IAsyncResult asyncResult) +26
System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
System.Web.Mvc.Controller.EndExecuteCore(IAsyncRes ult asyncResult) +41
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +28
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAs yncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +28
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsync Result asyncResult) +30
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHan dler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute() +278
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +163

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

I've tried this with a userid/pwd created only for the console admin (i.e. doesn't exist as a windows user a/c) and also using the details from a real windows user with the necessary access to r/w to the folder listed above.

Re-opening the console and entering credentials simply repeats the error.



2012-12-14, 08:27 PM
the error is pretty obvious there

Access to the path 'E:\ServerFolders\LiveBuffer\' is denied.
the user the web console process is running under (not the user you created in the webconsole, the actual windows user), most likely "Network Service" doesnt have permissions to that folder.

You can either
- Right click on that folder, goto permissions and add the "Network Service" user
- Right click on that folder, goto permissions and add the "Everyone" user

that should fix that problem.

2012-12-14, 08:44 PM
Yep that's fixed it. I just wasn't sure what user to add to the permissions. The console now loads and looks very nice. I'll see how I get on.

Many thanks


2012-12-14, 09:50 PM
cool glad you got it working.

i may make the installer add the permissions to the current directories in the future. but you may also run into that error if you add a directory in the console that it doesnt have access to. may just need to write up a help document for that scenario, i dont expect it to be very common.