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
527 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
Comment Utility
Hi,

Please add permissions for Network and Network Service account.
0
 

Author Closing Comment

by:MBaas
Comment Utility
Hi,

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

Thanks very much!

Michael  
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

771 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

10 Experts available now in Live!

Get 1:1 Help Now