+ Post New Thread
Page 1 of 5 12345 LastLast
Results 1 to 15 of 74
Home Access Plus+ Thread, Access to the path 'c:\inetpub\wwwroot\hap\app_data\hapconfig.xml' is denied in 7 in Projects:; Hi, I followed every step of the installation notes for IIS6, and I get this error message. At the moment ...
  1. #1

    Join Date
    Dec 2007
    Location
    Surrey, UK
    Posts
    55
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    14

    Access to the path 'c:\inetpub\wwwroot\hap\app_data\hapconfig.xml' is denied in 7

    Hi,

    I followed every step of the installation notes for IIS6, and I get this error message.
    At the moment the App_Data folder has the following permissions:

    Adminstrators: full control
    IIS_WPG: read + write
    Internet guest account: Deny write
    System: Full control
    Network services: Read + write
    Users: read & excute

    Also I can see that there is no file called hapconfig.xml in app_data.
    The zip file downloaded from the web doesn't contain this file at all.

    Regards


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

    Access to the path 'c:\inetpub\wwwroot\hap\app_data\hapconfig.xml' 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\hap\app_data\hapconfig.xml' 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 and IIS 7, and the configured application pool identity on IIS 7.5) 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\hap\app_data\hapconfig.xml' is denied.]
    System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +12895975
    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, Boolean useLongPath) +2481
    System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +229
    System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +107
    System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) +155
    System.IO.StreamWriter..ctor(String path, Boolean append) +130
    System.IO.File.CreateText(String path) +47
    HAP.Web.Configuration.hapConfig..ctor() +148
    HAP.Web.Configuration.hapConfig.get_Current() +136
    HAP.Web.Setup.Page_Load(Object sender, EventArgs e) +90
    System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp, Object o, Object t, EventArgs e) +25
    System.Web.UI.Control.LoadRecursive() +71
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

  2. #2

    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,630
    Thank Post
    39
    Thanked 528 Times in 456 Posts
    Rep Power
    118
    You need to give full control to the network service on the App_Data folder only.

  3. #3

    Join Date
    Dec 2007
    Location
    Surrey, UK
    Posts
    55
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    14
    Hello Nick,
    I now gave full control to network services on app_data folder, I still get the same error message:
    Access to the path 'c:\inetpub\wwwroot\hap\app_data\hapconfig.xml' is denied
    There is no such file called hapconfig.xml in this folder, and it is not in the zip file for hap+ 7.2.
    The documentation says:
    Right click HAP and select properties
    24. Deselect readonly and click ok. Allow it to reset every readonly attribute
    25. Add the permission:
    a. IIS_WPG and Network Service. Set them to Read & Execute permissions
    b. App_Data Folder: Set to Read & Write

    So I asume that the hap folder needs read & execute for both these users,and the app_data folder inside needs read+write for these two users.
    I have now changed it to Network services: full control for the app_data folder and still gets the same error.

    Many thanks

  4. #4

    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,630
    Thank Post
    39
    Thanked 528 Times in 456 Posts
    Rep Power
    118
    What is your application pool identity? Network Service? IIS6 or IIS7?

  5. #5

    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,630
    Thank Post
    39
    Thanked 528 Times in 456 Posts
    Rep Power
    118
    Also check to see if the folder/files are readonly, which they shouldn't be.

  6. #6

    Join Date
    Dec 2007
    Location
    Surrey, UK
    Posts
    55
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    14
    Hi,
    It is IIS6, the identity is Network Service; re doing the remove read only didn't make any change.
    Is the fact that a file called hapconfig.xml doesn't exisit in app_data folder can cause the error?

    Thanks

  7. #7

    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,630
    Thank Post
    39
    Thanked 528 Times in 456 Posts
    Rep Power
    118
    HAP+ will create the file on first run. It's def a permissions issue on the physical folder

  8. #8

    Join Date
    Dec 2007
    Location
    Surrey, UK
    Posts
    55
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    14
    Hi, I tried now giving both the IIS_WPG, and Network Services account full control to both the HAP folder and the app_data folder, but still get the same problem.

    Also could you please tell me if this setting is correct on IIS 6:
    Access to the path 'c:\inetpub\wwwroot\hap\app_data\hapconfig.xml' is denied in 7-hap.jpg

    I set to use anonymous access and no athentication following the installation manual, I remember that in version 6 it was the other way around.
    Is that way it get the permission error?

    Regards

  9. #9

    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,630
    Thank Post
    39
    Thanked 528 Times in 456 Posts
    Rep Power
    118
    That setting is not correct. It needs to be Network Service not IUSR_SERVER1.

  10. #10

    Join Date
    Dec 2007
    Location
    Surrey, UK
    Posts
    55
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    14
    Hi Nick,
    I can't change it to network service, just won't let me, please see screen shot.
    Access to the path 'c:\inetpub\wwwroot\hap\app_data\hapconfig.xml' is denied in 7-hap1.jpg
    I tried to do everything from the start following each step very carefully from your guide.
    It is still the same error message.

    Please help

    Thanks

  11. #11
    pjb
    pjb is offline

    Join Date
    Feb 2009
    Posts
    8
    Thank Post
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hi Nick, I also have been trying to get HAP up and running. Am currently stuck when trying to set up with:

    Access to the path 'C:\inetpub\wwwroot\HAP\app_data\hapconfig.xml' 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\HAP\app_data\hapconfig.xml' 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 and IIS 7, and the configured application pool identity on IIS 7.5) 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\HAP\app_data\hapconfig.xml' is denied.]
    System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +9718494
    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, Boolean useLongPath) +1142
    System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +82
    System.IO.StreamWriter.CreateFile(String path, Boolean append) +55
    System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) +121
    System.IO.StreamWriter..ctor(String path, Boolean append) +33
    System.IO.File.CreateText(String path) +37
    HAP.Web.Configuration.hapConfig..ctor() +40
    HAP.Web.Configuration.hapConfig.get_Current() +185
    HAP.Web.Login.OnPreInit(EventArgs e) +19
    System.Web.UI.Page.PerformPreInit() +31
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1073


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237

    The only bit in your release notes I could not get to work is Add the permission ISS AppPool\HAP as I could not find that user, not sure if that may be causing this issue.

    Windows Server 2008 - SP2 *64

  12. #12

    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,630
    Thank Post
    39
    Thanked 528 Times in 456 Posts
    Rep Power
    118
    IIS AppPool\HAP is only for IIS 7. You need to follow the instructions to get it to get the user. More instructions can be found on this forum if you search for it (can't remember off the top of my head). You won't find the user by searching for it, but if you follow the instructions on the documentation it will add the user

  13. #13
    pjb
    pjb is offline

    Join Date
    Feb 2009
    Posts
    8
    Thank Post
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Update: Have a check with some server settings, and noticed that within the app pool, asp.net 4.0 is now showing. Changed HAP to use that, refreshed and setup page displayed. Changed HAP back to use HAP app pool and setup page continues to load - so that error has now gone

  14. #14

    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,630
    Thank Post
    39
    Thanked 528 Times in 456 Posts
    Rep Power
    118
    But when you hit save it will come back

  15. #15

    Join Date
    Dec 2007
    Location
    Surrey, UK
    Posts
    55
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    14
    Hello Nick,

    Any advice on what can I do? I still get the access deny, can't change the user from Iuser_server1 to network services just won't let me, please see screenshot in previous post.
    As I said, I follow the instruction very carefully. I also delete everything and started from scratch following each step, but still get the same error.

    Many thanks

SHARE:
+ Post New Thread
Page 1 of 5 12345 LastLast

Similar Threads

  1. Disabling student access to the "Choose a wireless network" window in CC3
    By reggiep in forum Network and Classroom Management
    Replies: 3
    Last Post: 2nd July 2008, 03:37 PM
  2. Replies: 16
    Last Post: 29th February 2008, 11:15 PM
  3. [CLOSED] Bug/Error: Could someone with access to the wiki...
    By j17sparky in forum EduGeek.net Site Problems
    Replies: 1
    Last Post: 23rd February 2008, 12:42 PM
  4. Staff laptops and access to the C Drive.
    By Jake in forum How do you do....it?
    Replies: 21
    Last Post: 20th March 2007, 02:44 PM
  5. How do you do remote authenticated access to the intranet
    By daverage in forum Wireless Networks
    Replies: 9
    Last Post: 2nd February 2006, 01:34 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •