I have IIS8 on Windows Server 2012 on one server, and Windows file server on Windows Server 2008 R2 on another server.
I am trying to read/write from ASP.NET MVC 5 application running on IIS8 to a unc virtual directory pointing to a file share on the file server.
I got it working by setting up two admin accounts with same username and password on both servers, and running the app pool as that admin. This is the only way for me to write to it. I can read fine even if I don't run the app pool as that admin, and just leave it default as ApplicationPoolIdentity.
I've tried giving full control permissions to everyone on the shared folder on the share permission as well as ntfs permission, but the app still won't write to the virtual directory without running the app as the admin.
I think there must be a better, more official, and secure way of doing what I'm doing, but what I'm doing is the only solution I've been able to find so far searching on the internet.
Are there any IIS experts here who have successfully read/write to unc virtual directory in a better way?