?
Solved

Access to the path is denied

Posted on 2006-05-23
6
Medium Priority
?
32,433 Views
Last Modified: 2012-08-14
I have installed an ASP.NET application on my laptop that is running Windows XP Professional.
When I try to open the app I get the error message below.
I have granted access to anonymous users.
The solution mentioned, "To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access." does not work for me because in XP Pro there is no Security tab on the Propertis dialog box of the folder.

How do I resolve this problem?


Error details:

 
Server Error in '/iDesk' Application.
--------------------------------------------------------------------------------

Access to the path 'c:\inetpub\wwwroot\iDesk\Log\ErrorLog2006-5-23.txt' is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path 'c:\inetpub\wwwroot\iDesk\Log\ErrorLog2006-5-23.txt' 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. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:

[UnauthorizedAccessException: Access to the path 'c:\inetpub\wwwroot\iDesk\Log\ErrorLog2006-5-23.txt' is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2014563
   System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +998
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access) +57
   iDesk.clsCommon.WriteErrToLog(String LogData) +385
   iDesk.clsCommon.ExecuteQuery(String QueryString) +344
   iDesk._Default.FillArenaComboBox() +62
   iDesk._Default.Page_Load(Object sender, EventArgs e) +64
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

 


--------------------------------------------------------------------------------
0
Comment
Question by:spaceplanner
  • 3
  • 2
6 Comments
 
LVL 12

Expert Comment

by:_Maddog_
ID: 16740923
Hi spaceplanner,

Grant Read & Write permission on the directory (c:\inetpub\wwwroot\iDesk\Log\) to the IIS_WPG group.

- Maddog
0
 

Author Comment

by:spaceplanner
ID: 16740982
Hi Maddog,
I have checked the folder and it is Read Only. I uncheck the attribute, Apply, OK. Then when I go back in it is chaecked again. How can I force Windows to accept the change?
0
 
LVL 12

Expert Comment

by:_Maddog_
ID: 16741000
spaceplanner,

Does the "Read-Only" checkbox has a greyish background?
That means it is not really read-only.

Have you tried adding permissions to the directory?
0
Independent Software Vendors: 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!

 
LVL 7

Accepted Solution

by:
Anandhi K earned 2000 total points
ID: 16741002
what is your file system? NTFS ot FAT32?.. in case it is NTFS try going to the folder options and diabling simple file sharing..or try if u are getting the security tab in the safe mode. FAT32 does not have ths option
0
 

Author Comment

by:spaceplanner
ID: 16741041
Maddog,
Not sure how to 'add permissions to the directory'

the config file has  <identity impersonate="true"/>

I have allowed anonymous access on all folders

I have shared all folders with Read Write access

what else should I do?

thanks for your help
Paul
0
 

Author Comment

by:spaceplanner
ID: 16741386
I do have NTFS file system and once I disabled the Simple file share I was able to share with everyone

thanks for all your help

Paul
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
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.…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month16 days, 15 hours left to enroll

862 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