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
535 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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

695 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