473,561 Members | 3,672 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access to the path is denied - trying to write a file

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\wwwr oot\RunReportAS P\images

C:\Inetpub\wwwr oot\RunReportAS P is the directory of my virtual directory for
my app. In it's properties I did check "Write" as a permission.

What else do I need to do?

--
thanks - dave
Dec 15 '05 #1
3 7945
Hi Dave,

Welcome to ASPNET newsgroup.
Regarding on the "Access to the path denied..." error, it is a normal
exception when there is unsufficient permission of the current ASP.NET
process identity... What's your ASP.NET application's current IIS process
identity setting and the web.config security setting?

If you're using teh default process identity(Networ k Service) and dosn't
using Impersonate in web.config, then the network service account dosn't
have write/modify permissions to the IIS's default site's directory(or sub
dirs) by default... And this permission is the NTFS file permission (not
the IIS's virtual directory permission...). So you can using file explore
to grant NTFS write/modify permission to the ASPNET process identity
(network service) or the IIS_WPG group and test again....

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: Access to the path is denied - trying to write a file
| thread-index: AcYBtprsF9LS7iE 6QPyNBpbaVvNjDQ ==
| X-WBNR-Posting-Host: 199.45.247.98
| From: "=?Utf-8?B?RGF2aWQgVGh pZWxlbg==?=" <th*****@nospam .nospam>
| Subject: Access to the path is denied - trying to write a file
| Date: Thu, 15 Dec 2005 12:32:02 -0800
| Lines: 13
| Message-ID: <E8************ *************** *******@microso ft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGXA03.phx .gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3651 85
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| 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\wwwr oot\RunReportAS P\images
|
| C:\Inetpub\wwwr oot\RunReportAS P is the directory of my virtual directory
for
| my app. In it's properties I did check "Write" as a permission.
|
| What else do I need to do?
|
| --
| thanks - dave
|

Dec 16 '05 #2
Hi;

I brought up My Computer, went to the images subdirectory, brought up
sharing & security, selected the Security tab and gave full control to
IIS_WPG(JASMINE \IISWPG).

Now instead of the error my web pages comes up but it then brings up the
dialog asking me to enter a username & password. When I click cancel it then
shows me the image as the little box with the red x in it.

So I think that for some reason it won't let me at that directory. The
images directory is a sub directory of the asp, but is not a subdirectory of
any of my websites. Do I need to create a website that maps ton my asp app?

If you want to see, go to
http://www.windwardreports.com/RunRe...eportForm.aspx and select html
as the format.

--
thanks - dave
"Steven Cheng[MSFT]" wrote:
Hi Dave,

Welcome to ASPNET newsgroup.
Regarding on the "Access to the path denied..." error, it is a normal
exception when there is unsufficient permission of the current ASP.NET
process identity... What's your ASP.NET application's current IIS process
identity setting and the web.config security setting?

If you're using teh default process identity(Networ k Service) and dosn't
using Impersonate in web.config, then the network service account dosn't
have write/modify permissions to the IIS's default site's directory(or sub
dirs) by default... And this permission is the NTFS file permission (not
the IIS's virtual directory permission...). So you can using file explore
to grant NTFS write/modify permission to the ASPNET process identity
(network service) or the IIS_WPG group and test again....

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: Access to the path is denied - trying to write a file
| thread-index: AcYBtprsF9LS7iE 6QPyNBpbaVvNjDQ ==
| X-WBNR-Posting-Host: 199.45.247.98
| From: "=?Utf-8?B?RGF2aWQgVGh pZWxlbg==?=" <th*****@nospam .nospam>
| Subject: Access to the path is denied - trying to write a file
| Date: Thu, 15 Dec 2005 12:32:02 -0800
| Lines: 13
| Message-ID: <E8************ *************** *******@microso ft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGXA03.phx .gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3651 85
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| 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\wwwr oot\RunReportAS P\images
|
| C:\Inetpub\wwwr oot\RunReportAS P is the directory of my virtual directory
for
| my app. In it's properties I did check "Write" as a permission.
|
| What else do I need to do?
|
| --
| thanks - dave
|

Dec 16 '05 #3
Thanks for your quick response Dave,

Well, I've visisted that link and saw the problem when choose html/css
report. I think it still something incorrect with the IIS's virtual
directory security setting(since it's the static image file that is cause
the problem) Is that image folder's IIS secuirty set as "allow
anomymous"? You can view virutal directory's security setting (not NTFS
permission) through IIS manager 's "Directory Security" tab ......

Also, there is no need to create a standalone site for a certain web
application.... We can just deploy asp.net application in a virtual
directory under website....

And here is some technet reference about deploying asp.net web application
in IIS6

http://www.microsoft.com/technet/pro.../Library/IIS/6
4ac3577-7746-4fbd-a5e6-e50bdecf7a24.ms px

In addition, you can also try posting in IIS group if you have any specific
question about IIS virutal dir setting....

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: Access to the path is denied - trying to write a file
| thread-index: AcYB+1ZrDdNPQxI aR16lrB57xeB/oQ==
| X-WBNR-Posting-Host: 199.45.247.98
| From: "=?Utf-8?B?RGF2aWQgVGh pZWxlbg==?=" <th*****@nospam .nospam>
| References: <E8************ *************** *******@microso ft.com>
<rc************ **@TK2MSFTNGXA0 2.phx.gbl>
| Subject: RE: Access to the path is denied - trying to write a file
| Date: Thu, 15 Dec 2005 20:44:02 -0800
| Lines: 93
| Message-ID: <69************ *************** *******@microso ft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| Path:
TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGXA01.phx .gbl!TK2MSFTNGX A
03.phx.gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3652 57
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Hi;
|
| I brought up My Computer, went to the images subdirectory, brought up
| sharing & security, selected the Security tab and gave full control to
| IIS_WPG(JASMINE \IISWPG).
|
| Now instead of the error my web pages comes up but it then brings up the
| dialog asking me to enter a username & password. When I click cancel it
then
| shows me the image as the little box with the red x in it.
|
| So I think that for some reason it won't let me at that directory. The
| images directory is a sub directory of the asp, but is not a subdirectory
of
| any of my websites. Do I need to create a website that maps ton my asp
app?
|
| If you want to see, go to
| http://www.windwardreports.com/RunRe...eportForm.aspx and select
html
| as the format.
|
| --
| thanks - dave
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Dave,
| >
| > Welcome to ASPNET newsgroup.
| > Regarding on the "Access to the path denied..." error, it is a normal
| > exception when there is unsufficient permission of the current ASP.NET
| > process identity... What's your ASP.NET application's current IIS
process
| > identity setting and the web.config security setting?
| >
| > If you're using teh default process identity(Networ k Service) and
dosn't
| > using Impersonate in web.config, then the network service account
dosn't
| > have write/modify permissions to the IIS's default site's directory(or
sub
| > dirs) by default... And this permission is the NTFS file permission
(not
| > the IIS's virtual directory permission...). So you can using file
explore
| > to grant NTFS write/modify permission to the ASPNET process identity
| > (network service) or the IIS_WPG group and test again....
| >
| > Hope helps. Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| > --------------------
| > | Thread-Topic: Access to the path is denied - trying to write a file
| > | thread-index: AcYBtprsF9LS7iE 6QPyNBpbaVvNjDQ ==
| > | X-WBNR-Posting-Host: 199.45.247.98
| > | From: "=?Utf-8?B?RGF2aWQgVGh pZWxlbg==?=" <th*****@nospam .nospam>
| > | Subject: Access to the path is denied - trying to write a file
| > | Date: Thu, 15 Dec 2005 12:32:02 -0800
| > | Lines: 13
| > | Message-ID: <E8************ *************** *******@microso ft.com>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGXA03.phx .gbl
| > | Xref: TK2MSFTNGXA02.p hx.gbl
| > microsoft.publi c.dotnet.framew ork.aspnet:3651 85
| > | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
| > |
| > | 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\wwwr oot\RunReportAS P\images
| > |
| > | C:\Inetpub\wwwr oot\RunReportAS P is the directory of my virtual
directory
| > for
| > | my app. In it's properties I did check "Write" as a permission.
| > |
| > | What else do I need to do?
| > |
| > | --
| > | thanks - dave
| > |
| >
| >
|

Dec 16 '05 #4

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

Similar topics

1
7023
by: Winterminute | last post by:
If I try to make any changes to the ASP.NET Portal Starter kit it fails with an access denied error. This was working when I left last week and is failing today. I don't remember changing anything, but I guess something had to be changed. I have checked NTFS permissions and the ASPNET account has full control on the parent directory of...
5
2137
by: tshad | last post by:
I am trying to access my log files and am running into a permissions problem. I am doing the following: ****************************************************************** private void PopulateSiteBox() { drpSiteBox.Items.Clear(); string FILE_PATH = @"\\" +txtMachine.Text +
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...
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
8960
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...
7
7600
by: sforsasi | last post by:
Hi, I'm trying a simple code to upload a file to the server. When I click to Upload I get the following error message: Error: Access to the path xxx is denied The folder in which I'm trying to upload the file has all access. I've included NETWORK SERVICE - with full control and ASPNET - with full control to the folder.
1
6103
by: jalupinu | last post by:
My OS is Winxp SP2 and the software I am having trouble with is Maximizer 9.5 Enterprise. It has a Web Portal feature that i am trying to use and followed the instructions to set it up however I keep getting the following message: Server Error in '/MaximizerEmployee' Application....
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...
6
4577
by: =?Utf-8?B?UGF1bA==?= | last post by:
I am getting an "Access to the path "xxxx" is denied error. I believe is because the file that I am writing to programatically is being read/written to by another end user. These files have the same file name and must have the same file name. I am essentially overwrite an existing file that is being used by another user. My question: Is...
0
7570
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
7859
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8088
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...
1
7618
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7930
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
6210
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
5187
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
3600
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2068
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.