Click to See Complete Forum and Search --> : Wich user is used to access network resources from code?
pokemonSoldier
12-06-2007, 05:33 PM
I try to read from directory from the code and get the error message
that the access is denied.
How do I know for wich user to add permissions?
Can I specify the user to use to read from the directory?
thanks...
ciker
12-06-2007, 08:53 PM
I don't understand your meaning clearly.
<%@ Page Language="C#" AutoEventWireup="true" odeFile="Default.aspx.cs" Inherits="_Default" Debug="true" %>
Perhaps these codes will be helpfull.:)
pokemonSoldier
12-07-2007, 09:05 AM
i use Directory.GetDirectories("path")
and get the error "Access Denied"
how do I know for wich user the access is denied
ciker
12-07-2007, 11:54 AM
I think the account that you are running IIS and asp.net on production server
don't have access permission to the network path.
Please view this:http://www.thescripts.com/forum/thread417987.html
Ciker,From China.
Thanks.
lmf232s
12-11-2007, 10:28 PM
You need to give permissions to the ASPNET account.
Right click on the directory and select properties
Select the security tab
Add the ASPNET User and give him the proper permissions.
If your using Windows Server 2003 I believe the account is Network services by default but you can change this in IIS. (I believe Network serverices is the account name)