• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 542
  • Last Modified:

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

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
MBaas
Asked:
MBaas
1 Solution
 
GiftsonDJohnCommented:
Hi,

Please add permissions for Network and Network Service account.
0
 
MBaasAuthor Commented:
Hi,

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

Thanks very much!

Michael  
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now