Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
Medium Priority
?
539 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 14

Accepted Solution

by:
GiftsonDJohn earned 1000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

609 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