Pages

Thursday, December 2, 2010

Asp.Net Permissions

We are using System.IO.FileSystemInfo to read the contents of a share on a server in an ASP.Net page.

When the page opens it gives this error:
Access not possible, error: System.UnauthorizedAccessException: Access to the path '//server/f/intranet/' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileSystemInfo.get_CreationTimeUtc() at System.IO.FileSystemInfo.get_CreationTime() at ASP.listdir_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer)


The ASP.net "user" needs to be given access to the network share.  If you are running Windows 2003 this is the "NETWORK SERVICE", if you are running Windows 2000 it is "ASPNET". You may need to create a new user specifically for this and set up asp.net identity impersonation.

****AS IS**** ; Please apply at your own risk. 

No comments:

Post a Comment