Solved

Access to the path 'C:\Inetpub\wwwroot\MyApp\COPA2\DES\Logs\\temp.txt' is denied.  (ASP.net 2.0 on W2003-srv, NTFS)

Posted on 2009-04-15
2
529 Views
Last Modified: 2012-05-06
Hi,

I'm having the same prob as in the related q (http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DOT_NET/Q_21860308.html), but the solution suggested over there did not work (no options abt simple file sharing in File option-dialog - I assume because of server-OS).
I'm not using impersonation, so according to my understanding the ASPNET-account will be used. Well, the ASP.NET Machine account {srv}\ASPNET has all rights (except Full control & special permissions) on that file (whether it exists or not doesn't make a diff) and folder. And just be to sure, I've given the same access to IUSR_{srv}
What else might have an impact there?

I am running some stripped down test-code in my Page_Load fn (see snippet below) and it either fails on the File-Delete or File.Create with that msg.

Thanks for any insights :)

Michael  


Dim vTempFile As String = "C:\Inetpub\wwwroot\Copa2\DES\Logs\Temp.txt"

 

If File.Exists(vTempFile) Then 

   File.Delete(vTempFile)

End If 

Dim vTest As StreamWriter = File.CreateText(vTempFile)

Open in new window

0
Comment
Question by:MBaas
2 Comments
 
LVL 14

Accepted Solution

by:
GiftsonDJohn earned 250 total points
ID: 24150319
Hi,

Please add permissions for Network and Network Service account.
0
 

Author Closing Comment

by:MBaas
ID: 31570548
Hi,

YEAH! :)   Oone line msg for some, one workday for others ;(

Thanks very much!

Michael  
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now