Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > File System Access

Reply
Thread Tools

File System Access

 
 
MichaelR
Guest
Posts: n/a
 
      12-14-2004
I have an ASP.NET application running on the 1.1 Framework on 2 servers just
fine. However, on one server (Windows Server 2003) I'm having a problem.

This particular line of code throws an exception when run through the Visual
Studio 2003 debugger:

objFileStream = New
FileStream(objHttpContext.Server.MapPath("/virdir1/subdir/mrConfig.dat"),
FileMode.Open)
The exception text is:

Access to the path "C:\Inetpub\wwwroot\virdir1\subdir\mrConfig.da t" is
denied."

I've checked file system security on the directory and on the file itself.
The user NETWORK SERVICE has full control over both. What else do I need to
do to enable access?



Thanks.


 
Reply With Quote
 
 
 
 
Scott Allen
Guest
Posts: n/a
 
      12-14-2004
You might want to troubleshoot by enabling some auditing on the
file/directory:

http://www.pluralsight.com/keith/boo...ileaccess.html

Peek in the Security log with Event Viewer just to double check the
identity of the incoming user. With impersonation and all the other
identity tricks in ASP.NET the answer can sometimes be suprising.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Tue, 14 Dec 2004 14:16:02 -0500, "MichaelR"
<(E-Mail Removed)> wrote:

>I have an ASP.NET application running on the 1.1 Framework on 2 servers just
>fine. However, on one server (Windows Server 2003) I'm having a problem.
>
>This particular line of code throws an exception when run through the Visual
>Studio 2003 debugger:
>
>objFileStream = New
>FileStream(objHttpContext.Server.MapPath("/virdir1/subdir/mrConfig.dat"),
>FileMode.Open)
>The exception text is:
>
>Access to the path "C:\Inetpub\wwwroot\virdir1\subdir\mrConfig.da t" is
>denied."
>
>I've checked file system security on the directory and on the file itself.
>The user NETWORK SERVICE has full control over both. What else do I need to
>do to enable access?
>
>
>
>Thanks.
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Denied System.Data/System.Transaction Rick ASP .Net 1 09-10-2007 12:31 PM
Very annoying error: Access to the path is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity Jay ASP .Net 2 08-20-2007 07:38 PM
403 Forbidden: You were denied access because: Access denied by access control list Southern Kiwi NZ Computing 6 03-19-2006 05:19 AM
System.Security.SecurityException: Error de solicitud de permiso de tipo System.Net.WebPermission, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. Luis Esteban Valencia ASP .Net 0 07-14-2005 01:43 PM
How do I let people access the internet via an access point but not allow them access to my network yar Wireless Networking 4 09-21-2004 03:48 AM



Advertisments