all groups > iis security > november 2004 >
You're in the

iis security

group:

Permissions Problem



Permissions Problem Wayne Wengert
11/5/2004 3:37:11 PM
iis security: I am trying to test a new ASP.NET application on my local instance of MSDE.
I created a virtual directory named "db" with a sub-directory of
"processed". My web page opens an XML file in the "db" directory, does some
processing and then I want to move the file to the "processed"
sub-directory. When I execute the Move I get the following error:

'****************************************************
Exception Details: System.UnauthorizedAccessException: Access to the path
"C:\Inetpub\wwwroot\db\processed\SC313WorldPrelims.xml" 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) 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 write 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:


Line 50: End If
Line 51: Response.Write("Executing File.Move command!<br>")
Line 52: File.Move(strFilename, fntarget)
Line 53: '*****
Line 54: Else
'*****************************************************

The instructions don't seem to apply to my system (Win XP Pro SP1)? The
options are different and I don't see any "ASP.NET" account? I suspect I am
min-interpreting something here?

Thanks for any help.

Wayne


Re: Permissions Problem Wayne Wengert
11/6/2004 5:13:03 AM
Thanks Ken. I would never have figured that out!

Wayne

[quoted text, click to view]

Re: Permissions Problem Ken Schaefer
11/6/2004 6:56:17 PM
If your computer is in a workgroup (not a domain), you will need to turn off
"Simple File Sharing" in order to access the NTFS security settings tab in
Explorer.

In Explorer, goto Tools -> Folder Options -> View, and uncheck "Use Simple
Fire Sharing (Recommended)"

Now, right-click on a folder or file, and choose Properties. Now you should
see a security tab.

Cheers
Ken

[quoted text, click to view]

AddThis Social Bookmark Button