473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Comprehensive Permissions Rules for ASP.NET 2.0/IIS 6

Hi.

I am really confused about the NTFS permissions that I must set for my
ASP.NET 2.0 IIS application to work properly. I have looked at KB:815153 and
that helps a *little* bit, but I need more. The following are my specific
questions. If someone could answer them for me, I'd REALLY appreciate it!

1. I do not necessarily pre-compile my site to DLLs. I want it to build
automatically if it needs to. In KB:815153, it talks about the permissions I
have to provide to 2 users ("IUSR_<Machine name>" and "NetworkService"). So
that's fine, but what permissions to I have to provice to what users or
groups for what directories if I want the site to auto-compile, etc.?

2. If I want an ASPX file to be able to write to a given directory, what
permissions do I have to give to which users or groups so that ASPX files
will be able to perform writes?

Thanks.

Alex
Aug 14 '06 #1
3 1599
re:
what permissions to I have to provide to what users
Here's the complete list of ACLs needed for ASP.NET 2.0 :

http://msdn2.microsoft.com/en-us/library/kwzs111e.aspx

Make sure you apply them all.

Re which user should you give the permissions to, run this script
and give whichever account is returned by it NTFS permissions
to the directories listed in the above link :

identity.aspx:
-------------
<%@ Page Language="VB" %>
<%@ Import NameSpace = System.Security.Principal %>
<script runat="server">
Sub Page_Load()
Dim tmp As String = WindowsIdentity.GetCurrent.Name()
Label1.Text = tmp
End Sub
</script>
<html>
<head>
<title>Who is ASP.NET running as ?</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
--------

If you still have doubts after doing that, please post again.
Let us know how you do.

re:
2. If I want an ASPX file to be able to write to a given directory, what
permissions do I have to give to which users or groups so that ASPX files
will be able to perform writes?
Read/Write for the directories in which you want to write data.
Again, give those permissions to the account returned by the script above.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Alex Maghen" <Al********@newsgroup.nospamwrote in message
news:D3**********************************@microsof t.com...
Hi.

I am really confused about the NTFS permissions that I must set for my
ASP.NET 2.0 IIS application to work properly. I have looked at KB:815153 and
that helps a *little* bit, but I need more. The following are my specific
questions. If someone could answer them for me, I'd REALLY appreciate it!

1. I do not necessarily pre-compile my site to DLLs. I want it to build
automatically if it needs to. In KB:815153, it talks about the permissions I
have to provide to 2 users ("IUSR_<Machine name>" and "NetworkService"). So
that's fine, but what permissions to I have to provice to what users or
groups for what directories if I want the site to auto-compile, etc.?

2. If I want an ASPX file to be able to write to a given directory, what
permissions do I have to give to which users or groups so that ASPX files
will be able to perform writes?

Thanks.

Alex

Aug 14 '06 #2
Juan -

Thanks for your help. This was a very helpful article. I *do* have a
question though:

The Windows Identity that comes up for me is "NT AUTHORITY\NETWORK SERVICE".
Is this what it should be? I guess I'm just confused about what user this
*should* be. I don't know who "Network Service" is and I didn't ebven know
that a username could have a space in it.

Thanks!

Alex


"Juan T. Llibre" wrote:
re:
what permissions to I have to provide to what users

Here's the complete list of ACLs needed for ASP.NET 2.0 :

http://msdn2.microsoft.com/en-us/library/kwzs111e.aspx

Make sure you apply them all.

Re which user should you give the permissions to, run this script
and give whichever account is returned by it NTFS permissions
to the directories listed in the above link :

identity.aspx:
-------------
<%@ Page Language="VB" %>
<%@ Import NameSpace = System.Security.Principal %>
<script runat="server">
Sub Page_Load()
Dim tmp As String = WindowsIdentity.GetCurrent.Name()
Label1.Text = tmp
End Sub
</script>
<html>
<head>
<title>Who is ASP.NET running as ?</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
--------

If you still have doubts after doing that, please post again.
Let us know how you do.

re:
2. If I want an ASPX file to be able to write to a given directory, what
permissions do I have to give to which users or groups so that ASPX files
will be able to perform writes?

Read/Write for the directories in which you want to write data.
Again, give those permissions to the account returned by the script above.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Alex Maghen" <Al********@newsgroup.nospamwrote in message
news:D3**********************************@microsof t.com...
Hi.

I am really confused about the NTFS permissions that I must set for my
ASP.NET 2.0 IIS application to work properly. I have looked at KB:815153 and
that helps a *little* bit, but I need more. The following are my specific
questions. If someone could answer them for me, I'd REALLY appreciate it!

1. I do not necessarily pre-compile my site to DLLs. I want it to build
automatically if it needs to. In KB:815153, it talks about the permissions I
have to provide to 2 users ("IUSR_<Machine name>" and "NetworkService"). So
that's fine, but what permissions to I have to provice to what users or
groups for what directories if I want the site to auto-compile, etc.?

2. If I want an ASPX file to be able to write to a given directory, what
permissions do I have to give to which users or groups so that ASPX files
will be able to perform writes?

Thanks.

Alex


Aug 14 '06 #3
Hi Alex,

On a Web server running Windows Server 2003 and IIS 6.0, the ASP.NET
process runs in the application pool for the Web application. The
application pool defines the identity that ASP.NET runs under (by default,
the NETWORK SERVICE account). On earlier versions of IIS, (in Windows 2000
and Windows XP Professional), ASP.NET runs in the ASP.NET worker process
(Aspnet_wp.exe). The identity that ASP.NET runs under is defined by the
identity of the Aspnet_wp.exe process (by default, the ASPNET account).

#Configuring ASP.NET Process Identity
http://msdn2.microsoft.com/en-US/library/dwc1xthy.aspx

For user name policies, user names can contain special characters,
including spaces, periods, dashes, and underscores.

#Microsoft Windows NT Server: Creating User and Group Accounts
http://www.microsoft.com/technet/arc...t/05wntpca.msp
x?mfr=true

Hope this helps. Please feel free to post here if anything is unclear.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: OllimaX | last post by:
Hi! My trouble might be simple, but I'm quite new to php, and, perhaps I'm even more simple. It's that I had to chmod 777 two folders to get my scripts do what I wanted them to do, and I don't...
2
by: William Gill | last post by:
I know a major problem I am having is that I am finding lots of Tkinter information in 'fragments' of various , sometimes conflicting vintages. For example the python reference I was using didn't...
6
by: !!! Klutzo !!! | last post by:
I give permissions for ASPNET on a top level subdirectory. A windows program copies a file into the subdirectory, however, my web service cannot access the file because it does not have...
30
by: somebody | last post by:
I'm posting a new message regarding this subject, since the one posted previously is getting rather large. I just received the June 2005 issue of Dr. Dobb's Journal, and it contains an article...
16
by: Lyle Fairfield | last post by:
There is an MS-SQL table named Bugs_Comments_and_Suggestions. There is a form named Bugs_Comments_and_Suggestions. To allow John Doe to use this form, we GRANT him LOGIN and ACCESS permissions...
7
by: middletree | last post by:
I have a classic ASP app that's on the company Intranet. I'm in the early planning stages of re-doing it in ASP.NET, using VB 2003. One feature I would like to implement would have the code do...
5
by: PaulR | last post by:
Hi, I have used the Table Function SYSPROC.SNAPSHOT_APPL_INFO in a Trigger body, and am having problems granting suitable permissions to allow it to run for mere mortal users. I have tried...
6
by: Fred W. | last post by:
When my application starts I need to check folder permissions to ensure they have "Full Control" before I let them proceed on. How can I check this permission. Thank you, Fred
30
by: Adam Baker | last post by:
Hello, I'm writing a site where a handful of people will be able to edit the content using PHP scripts (FCKeditor). The content is stored as individual files in a directory. I'd like to validate...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.