473,569 Members | 2,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\Applicati on Data\...'.
Unfortunately, whenever the webservice is executed I get the following
error message:

Access to the path 'C:\Documents and Settings\All Users\Applicati on
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.c om) shows process = w3wp.exe,
Request=IRP_MJ_ CREATE, Result = Access denied, Other = nt
authority\netwo rk service

OS is win2k3.

What am I missing here?

Jul 20 '06 #1
7 19725
Hello,

You have given full access rights to IUSR_[name] but the user account
denied access is nt authority\netwo rk 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\Applicati on Data\...'.
Unfortunatel y, whenever the webservice is executed I get the following
error message:

Access to the path 'C:\Documents and Settings\All Users\Applicati on
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.c om) shows process = w3wp.exe,
Request=IRP_MJ _CREATE, Result = Access denied, Other = nt
authority\netw ork 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\Applicati on Data\...'.
Unfortunately, whenever the webservice is executed I get the following
error message:

Access to the path 'C:\Documents and Settings\All Users\Applicati on
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.c om) shows process = w3wp.exe,
Request=IRP_MJ_ CREATE, Result = Access denied, Other = nt
authority\netwo rk 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**********@gm ail.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\Applicati on Data\...'.
Unfortunately, whenever the webservice is executed I get the following
error message:

Access to the path 'C:\Documents and Settings\All Users\Applicati on
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.c om) shows process = w3wp.exe,
Request=IRP_MJ_ CREATE, Result = Access denied, Other = nt
authority\netwo rk 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\netwo rk 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.Nam e()
Label1.Text = tmp
End Sub
</script>
<html>
<head>
<title>WindowsI dentity.GetCurr ent.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**********@g mail.comwrote in message
news:11******** *************@7 5g2000cwc.googl egroups.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\Applicati on Data\...'.
Unfortunatel y, whenever the webservice is executed I get the following
error message:

Access to the path 'C:\Documents and Settings\All Users\Applicati on
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.c om) shows process = w3wp.exe,
Request=IRP_MJ _CREATE, Result = Access denied, Other = nt
authority\netw ork 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="tr ue"/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*******@yaho o.comwrote in message
news:11******** *************@s 13g2000cwa.goog legroups.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\Applicati on Data\...'.
Unfortunately, whenever the webservice is executed I get the following
error message:

Access to the path 'C:\Documents and Settings\All Users\Applicati on
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.c om) shows process = w3wp.exe,
Request=IRP_MJ_ CREATE, Result = Access denied, Other = nt
authority\netwo rk service

OS is win2k3.

What am I missing here?

Jul 20 '06 #6
IUSR_MACHINENAM E 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*******@yaho o.comwrote in message
news:11******** *************@s 13g2000cwa.goog legroups.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\Applicati on Data\...'.
Unfortunately, whenever the webservice is executed I get the following
error message:

Access to the path 'C:\Documents and Settings\All Users\Applicati on
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.c om) shows process = w3wp.exe,
Request=IRP_MJ_ CREATE, Result = Access denied, Other = nt
authority\netwo rk 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 <authenticati on mode="Windows"/>
2) in web.config <identity impersonate="tr ue"/>
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="tr ue"/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*******@yaho o.comwrote in message
news:11******** *************@s 13g2000cwa.goog legroups.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\Applicati on Data\...'.
Unfortunately, whenever the webservice is executed I get the following
error message:

Access to the path 'C:\Documents and Settings\All Users\Applicati on
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.c om) shows process = w3wp.exe,
Request=IRP_MJ_ CREATE, Result = Access denied, Other = nt
authority\netwo rk 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
3718
by: Theerachet Pratoommanee | last post by:
This is error message I've got. Any suggestion would be appreciated. Server Error in '/WebDirectory' Application. ---------------------------------------------------------------------------- ---- Access to the path "CreateFolder" is denied.
4
3894
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 error, this happens only if try access the report on the SERVER, it I try on my local machine, it works just fine. Any help will be much appreciated....
0
1486
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 message is shown: ************ Message ************** Access to the path "C:\Program\Microsoft Visual Studio .NET\Crystal...
3
7983
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 libraries I made myself were not having this problem, but it only happened with a zip library I downloaded and copied into my program's directory. When...
1
8113
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 I'm just running it locally and saving the file locally using my machines UNC path. I have given user ASPNET full control over the folder I want...
3
7946
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 C:\Inetpub\wwwroot\RunReportASP is the directory of my virtual directory for my app. In it's properties I did check "Write" as a permission. What else...
2
2049
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 "C:\Inetpub\wwwroot\Samples\Test\bin" and write the file there, then it works but if i try another method say "Machinename\path" e.g: \\Stephen\Samples\Test\bin then it...
1
8961
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 which is a webserver running Win2k3 with IIS6, my domain account is a local administrator on this machine. The web app I am running is trying to...
8
6038
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 ASP.NET 1.1, but was migrated to 2.0 during development. The reason this is an issue is because the application is using the...
0
3455
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 : 2639 TID : 45063056 PROC : db2fmp ( INSTANCE: db2inst1 NODE : 000 FUNCTION: DB2 Common, OSSe, ossGetDiskInfo,...
0
7694
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8118
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7964
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6278
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2107
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.