IIS Server Security - Permissions Problem

This is Interesting: Free IT Magazines  
Home > Archive > IIS Server Security > November 2004 > Permissions Problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Permissions Problem
Wayne Wengert

2004-11-05, 5:50 pm

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\SC313Wor
ldPrelims.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



Ken Schaefer

2004-11-06, 2:46 am

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

"Wayne Wengert" <wayneDONTWANTSPAM@wengert.com> wrote in message
news:%23wYp$f4wEHA.1564@TK2MSFTNGP09.phx.gbl...
>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\SC313Wor
ldPrelims.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
>
>
>



Wayne Wengert

2004-11-06, 7:46 am

Thanks Ken. I would never have figured that out!

Wayne

"Ken Schaefer" <kenREMOVE@THISadopenstatic.com> wrote in message
news:u0QJbY9wEHA.3668@tk2msftngp13.phx.gbl...
> 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
>
> "Wayne Wengert" <wayneDONTWANTSPAM@wengert.com> wrote in message
> news:%23wYp$f4wEHA.1564@TK2MSFTNGP09.phx.gbl...
MSDE.[vbcol=seagreen]
path[vbcol=seagreen]
Explorer,[vbcol=seagreen]
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com