-
Feb 24th, 2006, 11:45 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] System.UnauthorizedAccessException
Ok, here's the thing, i have an ASP.NET page that sometimes needs to read other files, images and text files, worked fine on my development pc.. but now i have moved it over to windows server 2003, i get this security error
Exception Details: System.UnauthorizedAccessException: Access to the path "D:\Inetpub\wwwroot\useragree.txt" is denied.
but ASPNET and NETWORK SERVICE and the IUSR account all have read permission to the folder, and that's all i need to do, is read.. not write. This could also be part of my debugging issue im having though (the old, unable to debug, access denied) error, all the old threads i looked up didnt solve my particular problem.
EDIT NOTE: I just tried setting "Everyone" to read access.. still doesnt work, this has to be a .NET problem then right?
Any Ideas?
Last edited by Phill64; Feb 25th, 2006 at 12:25 AM.
-
Feb 25th, 2006, 08:19 AM
#2
PowerPoster
Re: System.UnauthorizedAccessException
look in the event logs to see what user account it is using.
Also make sure that the integrated Windows Authentication check box is ticked in the IIS website properties.
it's not a .NET issue - its the security in which Windows is denying as it has no access right to give
-
Mar 1st, 2006, 10:54 PM
#3
Thread Starter
Frenzied Member
Re: System.UnauthorizedAccessException
which log files? where would they be?
there is no mention of it in the IIS logs. Windows Auth is ticked.
-
Mar 2nd, 2006, 12:24 AM
#4
Thread Starter
Frenzied Member
Re: System.UnauthorizedAccessException
Figured it out, found out user account using security namespace.. and it wasNETWORK SERVICE which had permission.. thing was, when opening a filestream, even though u open a file in "open" mode, if u dont use the next overload where accessmode is specified, it still opens it in read&write mode, so i used the overload to make it readonly, now it works!
thanks for the replies
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|