A solution more specific to this problem would be to run :
aspnet_regiis -GA <account name>
In this case :
aspnet_regiis -GA "nt authority\network service"
That command will assign *all* ASP..NET 2.0 permissions needed to the account.
If you have doubts about which account ASP.NET is running as,
save this script as "identity.aspx", run it, and run the aspnet_regiis -ga
command using whatever account name is returned by the script.
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>WindowsIdentity.GetCurrent.Name()</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
---------
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/
===================================
<Ca**********@gmail.comwrote in message
news:11*********************@75g2000cwc.googlegrou ps.com...
Run aspnet_regiis -i to reinstall asp.net.
Among the other things that the tool does is to give the correct
permissions to the correct users on the correct files and directories.
You can avoid this problem in the future by installing IIS before
installing the .net framework. Otherwise, you'll need to run
aspnet_regiis -i
Andy
hu*******@yahoo.com wrote:
>I have a website that uses a web service that is located on the same
machine. This webservice calls a program which in return modifies a
file in c:\documents and Settings\All Users\Application Data\...'.
Unfortunately, whenever the webservice is executed I get the following
error message:
Access to the path 'C:\Documents and Settings\All Users\Application
Data\...' is denied.
Permissions for the default website (where the website and web service
reside) include [name]\Administrators and Internet Guest Account
([name]\IUSR_[name]) among others.
In directory security I have Enable anonymous access checked using User
Name = [name]\IUSR_[name] and the password I set up for that account.
Everything else (Integrated Windows authentication, etc) is unchecked.
For the file and the directory it resides in I have given full access
rights to IUSR_[name].
File Monitor (sysinternals.com) shows process = w3wp.exe,
Request=IRP_MJ_CREATE, Result = Access denied, Other = nt
authority\network service
OS is win2k3.
What am I missing here?