Search code examples
asp.net-coreiis-8dnx

Running ASP.NET 5 on IIS from UNC (network share)


I am testing ASP.NET 5 (dnx-coreclr-win-x64.1.0.0-rc1-update1) with a very simple site that shows a landing page for 3 seconds and then redirects the user. It works locally and it works when deployed to IIS 8 (Windows 2012 R2) but only if the published folders (approot, logs, and wwwroot) are on local drives.

If I try to run the web application from a UNC share I get the following exception in the stdout.log

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at Microsoft.AspNet.Server.Kestrel.Networking.Libuv.NativeMethods.uv_loop_init(UvLoopHandle handle)
   at Microsoft.AspNet.Server.Kestrel.Networking.Libuv.loop_init(UvLoopHandle handle)
   at Microsoft.AspNet.Server.Kestrel.KestrelThread.ThreadStart(Object parameter)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

All the servers involved are members of the same AD domain. The app pool is running under a non-privileged AD user account that has read/write permissions to the share and underlying folders.

We use UNC shares with between load balanced web servers. This allows us to deploy changes once with all the servers getting changes at the same time. Have been doing this for years without issue but open to newer (supported, recommended) solutions for DNX.


Solution

  • This looks like a bug. I've opened an issue on github and we're going to investigate it.

    You can follow it here: https://github.com/aspnet/KestrelHttpServer/issues/671