+ Post New Thread
Results 1 to 14 of 14
Home Access Plus+ Thread, Unhandled Security Exception in v8.7 (IIS 7.5) in Projects:; I am trying to upgrade from HAP+ v8.4 to v8.7. I have an existing 8.4 that is working. I've tried ...
  1. #1

    Join Date
    Jan 2013
    Posts
    3
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Unhandled Security Exception in v8.7 (IIS 7.5)

    I am trying to upgrade from HAP+ v8.4 to v8.7. I have an existing 8.4 that is working. I've tried both a migration (using the old hapconfig.xml file from the 8.4) as well as a clean install and end up with this error once the setup process is complete:

    Server Error in '/HAP' Application.


    Security Exception
    Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.


    Exception Details: System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.


    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:


    [SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.]
    System.Diagnostics.EventLog.FindSourceRegistration (String source, String machineName, Boolean readOnly, Boolean wantToCreate) +714
    System.Diagnostics.EventLog.SourceExists(String source, String machineName, Boolean wantToCreate) +460
    System.Diagnostics.EventLog.SourceExists(String source) +22
    HAP.Web.Global.Application_Start(Object sender, EventArgs e) +93




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

    I have already tried increasing the trust level in web.config, and I have edited permission in the registry to grant "NETWORK SERVICE" read access to HKLM\System\CurrentControlSet\services\eventlog\Se curity

    This system is Windows Server 2008 R2 Enterprise SP1 with all updates. Nothing else runs on this box; it was set up specifically for testing out HAP+.

    AFAIK, it looks like there's a security violation, but the error here is actually only telling me that it can't tell me any more than that (thus, "unhandled" exception).

  2. #2
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,469
    Thank Post
    37
    Thanked 483 Times in 415 Posts
    Rep Power
    109
    Try adding permissions to the application event log

  3. #3
    mrbios's Avatar
    Join Date
    Jun 2007
    Location
    Stroud, Gloucestershire
    Posts
    2,419
    Thank Post
    343
    Thanked 250 Times in 206 Posts
    Rep Power
    97
    Getting the same error myself going from 8.4 > 8.7, feel stupid saying it but i don't understand your fix instructions :x

  4. #4
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,469
    Thank Post
    37
    Thanked 483 Times in 415 Posts
    Rep Power
    109
    I think this is something to do with the new way errors are logged. If you go into the registry HKLM\System\CurrentControlSet\services\eventlog\, and delete anything to do with Home Access Plus+

    HAP+ uses the administrator's account to create a event log source in the application event log, so you need to ensure that the administrator's account in HAP+ is an admin on the server as well

  5. #5
    gybe78's Avatar
    Join Date
    May 2008
    Location
    Aylesbury
    Posts
    142
    Thank Post
    24
    Thanked 29 Times in 19 Posts
    Rep Power
    17
    Quote Originally Posted by nickbro View Post
    I think this is something to do with the new way errors are logged. If you go into the registry HKLM\System\CurrentControlSet\services\eventlog\, and delete anything to do with Home Access Plus+

    HAP+ uses the administrator's account to create a event log source in the application event log, so you need to ensure that the administrator's account in HAP+ is an admin on the server as well
    Same problem here. HAP user has Administrator permissions on the server hosting HAP+ but still get the error posted above.

  6. #6

    Join Date
    Nov 2011
    Location
    Southampton
    Posts
    23
    Thank Post
    4
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Going to add myself to this list. Will try the fix above now though.

  7. #7
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,469
    Thank Post
    37
    Thanked 483 Times in 415 Posts
    Rep Power
    109
    Try restarting the server as well

  8. #8
    Freedom's Avatar
    Join Date
    Feb 2007
    Location
    England - Midlands
    Posts
    42
    Thank Post
    6
    Thanked 5 Times in 4 Posts
    Rep Power
    15
    I am having the same problem and I don't have anything under that reg key to do with HAP - I have tried restarting the service but will reboot the server now too ...

    EDIT: Have restarted the server but I still get the same error. Any other ideas?
    Last edited by Freedom; 16th January 2013 at 03:20 PM. Reason: Update on Reboot

  9. #9
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,469
    Thank Post
    37
    Thanked 483 Times in 415 Posts
    Rep Power
    109
    What are you running the HAP+ Application pool as? IIS AppPool\HAP?

    You may need to:

    To give IIS AppPool\HAP User read permission on the EventLog/Security key follow instructions from 'System.Security.SecurityException: Requested registry access is not allowed.' when writing to event log
    Code:
    Select Start - Run, then enter: regedt32
    Navigate/expand to the following key:   HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security
    Right click on this entry and select Permissions
    Add the IIS AppPool\HAP User
    Give it Read permission

  10. 2 Thanks to nickbro:

    AdamS (16th January 2013), MrBrow (17th January 2013)

  11. #10

    Join Date
    Jan 2013
    Posts
    3
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Thanks Nick!

    I had found other forum posts which indicated that the "NETWORK SERVICE" user accounted for the IIS application pools. I didn't need to make any changes to the registry entries, or add permissions to the Application log; adding the "IIS AppPool\HAP" account with read permission to the "security" key in the registry fixed it.

  12. #11
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,469
    Thank Post
    37
    Thanked 483 Times in 415 Posts
    Rep Power
    109
    Good to hear. HAP+ uses it's own application pool to avoid cross contamination and to reduce the surface area of a possible attack, it's best practice in IIS7 to use separate app pools and customize the folder permissions to reduce the surface area

  13. #12

    Join Date
    Nov 2011
    Location
    Southampton
    Posts
    23
    Thank Post
    4
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    A-ha!

    Okay, the fix above worked so thanks guys. I did then have the issue of Access to the path 'c:\inetpub\wwwroot\hap\app_data\hapconfig.xml' is denied for some reason and I upgraded in the usual way. Added the HAP pool back in for the App_data folder and it's happy again.

    Great work as always!
    Last edited by MrBrow; 17th January 2013 at 12:40 PM.

  14. #13

    Join Date
    Sep 2012
    Posts
    55
    Thank Post
    9
    Thanked 4 Times in 2 Posts
    Rep Power
    4
    Adding IIS AppPool\HAP into the permission list for the 'Security' folder within REGEDIT didn't work for me. Now receiving a new error in the form of:

    Exception Details: System Runtime.InteropServices.COMException: Unknown error (0x80005000)

    Any ideas?

  15. #14
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,469
    Thank Post
    37
    Thanked 483 Times in 415 Posts
    Rep Power
    109
    A COM Exception error is an error with AD, you'll need to restart the server which should clear the COM error.

    AH, it's UAC

    IIS 7 ADSI Error: System.Runtime.InteropServices.COMException (0x80005000): Unknown error (0x80005000) - Http Client Protocol Issues (and other fun stuff I support) - Site Home - MSDN Blogs

SHARE:
+ Post New Thread

Similar Threads

  1. Convert Home access plus site to secure site in IIS 7?
    By reggiep in forum Home Access Plus+
    Replies: 1
    Last Post: 28th April 2011, 01:23 PM
  2. Security settings in IE6
    By woody in forum Windows
    Replies: 3
    Last Post: 17th January 2007, 01:26 PM
  3. Security Vulnerabilty in Centrino wireless laptops
    By ITWombat in forum Wireless Networks
    Replies: 10
    Last Post: 21st August 2006, 08:23 AM
  4. Security Groups in 2003
    By SpuffMonkey in forum Windows
    Replies: 1
    Last Post: 19th July 2006, 11:18 PM
  5. Replies: 2
    Last Post: 12th January 2006, 09:32 AM

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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