Ask a Question related to ASP.NET Security, Design and Development.
-
CW #1
Folder access by ASP.Net application
I have an ASP.NET application that needs to read/write from to the IIS
application directory and its subdirectories. The application is configured
to use form authentication and thus it has the following entries in
web.config:
<authentication mode="Forms">
<forms name="CommerceAuth" loginUrl="login.aspx"
protection="All" path="/" />
</authentication>
<authorization><deny users="?" /><allow users ="*"
/></authorization>
Now the application runs OK on my dev box. The ASP.Net application is able
to create file in IIS application folder and its subdirectory. However, once
uploaded to my web host, the code that generates file on the web server IIS
folder throws exception that essentially states that access to the directory
is denied.
Now my suspicion is that it has something to do with security permission
granted to accounts used by IIS and ASP.Net. If I understand the IIS/ASP.Net
architecture correctly, all anonymous requests are run in the context of
IUSR* (where * is the machine name). It is then handed off to either ASPNET
account (if IIS 5.x) or the configured worker pool account for ASP.Net
process on IIS6 (if configured or default back to ASPNET account). Thus, if
ASPNET account (or the worker pool account) has the necessary privilege to
write to the particular IIS folder, then the application should be able to
create a file in that folder. Otherwise, access would be denied.
Can someone confirm or clarify if my understanding is correct?
Thanks
CW Guest
-
Can I allow access to one file within a folder, but notthe whole folder
I want to allow access for users to edit only specific file within a folder. Can I do this Also, since I am just starting to use this on a new... -
Application Pools folder is missing
OS is Windows 2003 Server IIS is version 6 In IIS when I look under the <machine_name>(local computer), I do not have the Application Pools... -
Web Application folder path
Anyone know how to get a path to your web application's folder at design time? I've tried using MapPathSecure in the OnInit call, but no luck. -
What issue will HIT me hard when I convert an Access 2002 MDE application to Web Application?
Hi All, Current Access 2002 MDE application: - has no tier - has neither business object nor any kind of object (Except MS Form object and... -
Application folder not seeing namespace of the main application
hi I have a website (localhost namespace : "whatever") that has a secure application folder ( called secure with a namespace : "Secure") I... -
Raghavendra T V #2
Re: Folder access by ASP.Net application
Hi CW,
I would suggest you to check the security settings for the root folder
under which you are creating the folders and files from your
code.
You should have the ASPNET user added to the group and should have write
permissions.
Hope this helps you.
Thanks
Raghavendra
"CW" <CW@nospam.com> wrote in message
news:OBBotWpkEHA.536@TK2MSFTNGP11.phx.gbl...configured> I have an ASP.NET application that needs to read/write from to the IIS
> application directory and its subdirectories. The application isonce> to use form authentication and thus it has the following entries in
> web.config:
> <authentication mode="Forms">
> <forms name="CommerceAuth" loginUrl="login.aspx"
> protection="All" path="/" />
> </authentication>
> <authorization><deny users="?" /><allow users ="*"
> /></authorization>
>
> Now the application runs OK on my dev box. The ASP.Net application is able
> to create file in IIS application folder and its subdirectory. However,IIS> uploaded to my web host, the code that generates file on the web serverdirectory> folder throws exception that essentially states that access to theIIS/ASP.Net> is denied.
>
> Now my suspicion is that it has something to do with security permission
> granted to accounts used by IIS and ASP.Net. If I understand theASPNET> architecture correctly, all anonymous requests are run in the context of
> IUSR* (where * is the machine name). It is then handed off to eitherif> account (if IIS 5.x) or the configured worker pool account for ASP.Net
> process on IIS6 (if configured or default back to ASPNET account). Thus,to> ASPNET account (or the worker pool account) has the necessary privilege> write to the particular IIS folder, then the application should be able to
> create a file in that folder. Otherwise, access would be denied.
>
> Can someone confirm or clarify if my understanding is correct?
>
> Thanks
>
>
Raghavendra T V Guest
-
[MSFT] #3
RE: Folder access by ASP.Net application
You understanding is right. When working with Form authentication, ASP.NET
application will use the account "ASPNET" (IIS 5) or "Network service" (IIS
6.0 ) to access the resource like file system or database. It seems the
account on your web server didn't have enough permission to create files on
the particular folder. You may contact the server's administrator for this.
Luke
[MSFT] Guest



Reply With Quote

