473,405 Members | 2,310 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,405 software developers and data experts.

Access To The Path ... Is Denied

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?

Jul 20 '06 #1
7 19705
Hello,

You have given full access rights to IUSR_[name] but the user account
denied access is nt authority\network service according to FileMon.

I believe this is your problem.
--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info
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?
Jul 20 '06 #2
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?
Jul 20 '06 #3
IIS has been installed before the .NET framework, I believe. In any
case, I did re-install it again but the problem is still the same. As
mentioned I have given full access rights to the file and containing
folder to the user defined in the directory security dialog. Therefore,
it seems to me that the web service and/or the program that the
webservice executes run under a different user account. Could that be?
If so how do I find out what user account?

Thanks

Ca**********@gmail.com wrote:
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?
Jul 20 '06 #4
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?

Jul 20 '06 #5
The recomended guidelines is you need to authenticate the Web Service
request and set the Web Service to NTLM (Integrated Security) turn off
anonymous and set <indentity impersonate="true"/in web.config.

Doing the above, the call will execute under the user of the authenticated
user.

Look at the Credentials property of the Web Service proxy if you are not
sure how to authenticate web service calls.

Regards
Simon.

<hu*******@yahoo.comwrote in message
news:11*********************@s13g2000cwa.googlegro ups.com...
>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?

Jul 20 '06 #6
IUSR_MACHINENAME will only be used if anon access is turned on and
impersonate is turned on otherwise ASPNET user account will be used (unless
of course NTLM is used in the context of my previous post).

General rule of thumb is to never change user permissions.

Regards
Simon.

<hu*******@yahoo.comwrote in message
news:11*********************@s13g2000cwa.googlegro ups.com...
>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?

Jul 20 '06 #7
Thanks for the input. If I turn on integrated security the user will
have to log in before using the webservice. At least that is from my
limited experience. I do not want that the user has to login, though.
So how can I do this. Note that I have the following

1) in web.config <authentication mode="Windows"/>
2) in web.config <identity impersonate="true"/>
3) in IIS "Enable anonymous access" unchecked
4) in IIS "Integrated Windows authentication" enabled.

BTW, what is 1) and 4) the same and it just can be configured at
different places?

Thanks
Simon Hart wrote:
The recomended guidelines is you need to authenticate the Web Service
request and set the Web Service to NTLM (Integrated Security) turn off
anonymous and set <indentity impersonate="true"/in web.config.

Doing the above, the call will execute under the user of the authenticated
user.

Look at the Credentials property of the Web Service proxy if you are not
sure how to authenticate web service calls.

Regards
Simon.

<hu*******@yahoo.comwrote in message
news:11*********************@s13g2000cwa.googlegro ups.com...
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?
Jul 21 '06 #8

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

Similar topics

1
by: Theerachet Pratoommanee | last post by:
This is error message I've got. Any suggestion would be appreciated. Server Error in '/WebDirectory' Application. ----------------------------------------------------------------------------...
4
by: Fabian von Romberg | last post by:
Hi, I have installed Sql Reporting Services on 2 machines, one is WIN 2000 PRO and the other one is WIN 2000 ADV. SERVER. When I try to access a report using the webbrowser, I get the following...
0
by: Goran | last post by:
Hi I have created a very simple ASP.Net application that only consists of a CrystalReports Viewer, that has been connected to a .rpt file. When the page is loaded in the browser, the following...
3
by: Shailesh Humbad | last post by:
I figured out what was causing the "Access is Denied" error when calling functions from referenced DLLs in my service. I've tried to be very detailed, so bear with me. It turns out that...
1
by: Duffman | last post by:
Hi, I have what seems to be a common problem, but the solutions I've found don't seem to work. I would like to use a web service to create a file at a UNC location in a shared file. Currently...
3
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
2
by: stephen | last post by:
Hi, I am getting an Error "Access to the path...... is denied" Error. I have an web app and I am creating a log file to write the error info. If I have the absolute path...
1
by: cpajoe2001 | last post by:
I am having an issue and after searching around online for a day and half now and finding others with the same problem but yet no solution to my issue I am looking for help. What i have is ServerA...
8
by: Jeremy Ames | last post by:
I am trying to move an application from my system to a new test system. I really should have tried an easier program first, but I didn't really have a chance. My application was originally written in...
0
by: p.thorn.ru | last post by:
Hello, I am running db2 express-c 9.5 under linux (fedora 7), and my error log frequently shows messages like these: 2008-01-08-18.30.01.952964+180 I651334G1048 LEVEL: Error (OS) PID ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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.