Problem with Exception Mgt. App Block on W2k Server

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Problem with Exception Mgt. App Block on W2k Server

    I'm about at wit's end getting the exception block to operate at all
    on our Win 2000 server. All is well on my local workstation, but the
    block will not register correctly to operate on the server. Here is
    what we have done:

    * Xcopied the dll's into our app's bin directory on the server.
    * Ran the install util with a bat file located in the bin directory.
    the BAT file contains:
    ===========================
    REM *** Batch File to register the ExceptionManagement appblock dll to
    allow
    REM *** writing to the event log
    c:\winnt\microsoft.net\framework\v1.1.4322\install util.exe
    microsoft.applicationblocks.exceptionmanagement.dl l
    REM Register complete.
    pause
    =================================

    the BAT file returns comforting sounding words, and the actual install
    log that gets created also looks "comforting":

    ==========================================
    Installing assembly
    'd:\sites\problem-management\wwwroot\cca\bin\microsoft.applicationbl ocks.exceptionmanagement.dll'.
    Affected parameters are:
    assemblypath =
    d:\sites\problem-management\wwwroot\cca\bin\microsoft.applicationbl ocks.exceptionmanagement.dll
    logfile =
    d:\sites\problem-management\wwwroot\cca\bin\microsoft.applicationbl ocks.exceptionmanagement.InstallLog
    Creating EventLog source ExceptionManagerInternalException in log
    Application...
    Creating EventLog source ExceptionManagerPublishedException in log
    Application...
    Committing assembly
    'd:\sites\problem-management\wwwroot\cca\bin\microsoft.applicationbl ocks.exceptionmanagement.dll'.
    Affected parameters are:
    assemblypath =
    d:\sites\problem-management\wwwroot\cca\bin\microsoft.applicationbl ocks.exceptionmanagement.dll
    logfile =
    d:\sites\problem-management\wwwroot\cca\bin\microsoft.applicationbl ocks.exceptionmanagement.InstallLog
    ==============================

    BUT, when anything tries to throw an exception, we get the "dreaded":
    =======================
    "The event source ExceptionManagerInternalException does not exist and
    cannot be created with the current permissions
    ======================

    WHAT is going on here? I have seen this error reported frequently, but
    in most cases running the installutil seems to clear it up. Here, we
    ran installutil, with apparent success to judge from the log, but we
    still can't log an exception. I'm sure it is a permissions thing
    somewhere, but where? As noted, this is a Win2000 sp3.

    Jim Ross
    MS MVP [ASP.NET][VC/MFC emeritus]

    To send email, change 'lotsofspamthroughhere' to 'msn' but please ask all questions in the newsgroups, not via private mail
    Jim Ross [MVP] Guest

  2. Similar Questions and Discussions

    1. The server threw an exception. (Exception
      I am getting The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)) When i try to open any file using Adobe ...
    2. I've a problem..0x80010105 the server has threw an exception...
      Hi! Have you found the solution of the problem? I've got the same thing, when I am trying to get a string from an MFC object I've created. ...
    3. Exception manegement application block can't write to Windows server 2003
      Hi, I have posted a similar question to ASP.Net newsgroup but I found the "EMAB, Impersonation and Event log" question here and decided to ask my...
    4. Advice on implementing Exception Management Block
      Hi There I am busy evaluating using the Exception Management Block in my web app. I have divided my solution into 3 projects. 1) WebApp 2)...
    5. weird stack trace message from exception thrown in catch block
      If I modify my code a bit to set a variable if an exception is caught, then throw the new exception outside of the try/catch block, it seems to...
  3. #2

    Default RE: Problem with Exception Mgt. App Block on W2k Server

    Hi Jim,

    If you use a more powerful account, for example, the System account, will
    the error still occur?

    Luke
    Microsoft Online Support

    Get Secure! [url]www.microsoft.com/security[/url]
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    MSFT Guest

  4. #3

    Default Re: Problem with Exception Mgt. App Block on W2k Server

    I don't know. Could you tell me how I might try that? I'm afraid that
    is an area of .NET that is foreign territory to me.

    Note that the block _appears_ to be correctly registered. Even the
    correct Registry entries exist.

    [email]lukezhan@online.microsoft.com[/email] (MSFT) wrote:
    >If you use a more powerful account, for example, the System account, will
    >the error still occur?
    Jim Ross
    MS MVP [ASP.NET][VC/MFC emeritus]

    To send email, change 'lotsofspamthroughhere' to 'msn' but please ask all questions in the newsgroups, not via private mail
    Jim Ross [MVP] Guest

  5. #4

    Default Re: Problem with Exception Mgt. App Block on W2k Server

    Hi Jim,

    You can configure the process identity in the <processModel> section of the
    Machine.config file in the Config subdirectory of the installation root
    directory. The userName and the password attributes control the identity of
    the process. The default values for these attributes are as follows:


    <processModel userName="machine" password="AutoGenerate" />


    The machine and the AutoGenerate values instruct ASP.NET to use the
    built-in ASPNET account and to use a cryptographically strong, random
    password that is stored in the Local Security Authority (LSA) for that
    account.

    If you want to use a process that has more access rights, you can set the
    userName attribute to System, which causes the ASP.NET worker process to
    run with the same identity as the Inetinfo.exe process. The Inetinfo.exe
    process runs by default as the System identity. When you configure the
    ASP.NET worker process to use the System identity, the ASP.NET worker
    process can access almost all of the resources on the local computer. On
    computers that are running Windows 2000 or Windows XP, the System account
    also has network credentials and can access network resources as the
    machine account.


    For more information about <processModel> Element:

    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/ht[/url]
    ml/gngrfprocessmodelsection.asp

    Luke
    Microsoft Online Support

    Get Secure! [url]www.microsoft.com/security[/url]
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    MSFT Guest

  6. #5

    Default Re: Problem with Exception Mgt. App Block on W2k Server

    Yes, I _could_ take that approach, but since my original post I'be
    been reading up on these issues, and according to an MS Press book on
    building secure ASP.NET apps, the preferred approach for this specific
    sort of issue is to grant the ASPNET account the needed access. The
    idea being--just as much access as is needed and not a bit more.
    Sounds reasonable.

    What is so maddening is that I HAVE granted it Registry access to the
    needed keys. I can look at it in RegEdt32, and there it is, ASPNET has
    the exact access the books says it needs, but as soon as I try to log
    an exception, it gets "Registry access denied". It seems reasonable to
    assume, at this point, that the domain security policies are somehow
    overriding what I'm trying to do.

    [email]lukezhan@online.microsoft.com[/email] (MSFT) wrote:
    >You can configure the process identity in the <processModel> section of the
    >Machine.config file in the Config subdirectory of the installation root
    >directory. The userName and the password attributes control the identity of
    >the process. The default values for these attributes are as follows:
    >
    Jim Ross
    MS MVP [ASP.NET][VC/MFC emeritus]

    To send email, change 'lotsofspamthroughhere' to 'msn' but please ask all questions in the newsgroups, not via private mail
    Jim Ross [MVP] Guest

  7. #6

    Default Problem with Exception Mgt. App Block on W2k Server

    I think the reason your batch file doesn't work is
    because you have to use the VS.NET command prompt to run
    the installutil not just a regular command prompt. The
    VS.NET command line set up environment variables that are
    needed. I know there is a way to do it with a regular
    command prompt but you have to setup the environment
    variables that the VS.NET command prompt would do for you.

    Best Regards,

    Joe Audette
    >-----Original Message-----
    >I'm about at wit's end getting the exception block to
    operate at all
    >on our Win 2000 server. All is well on my local
    workstation, but the
    >block will not register correctly to operate on the
    server. Here is
    >what we have done:
    >
    >* Xcopied the dll's into our app's bin directory on the
    server.
    >* Ran the install util with a bat file located in the
    bin directory.
    >the BAT file contains:
    >===========================
    >REM *** Batch File to register the ExceptionManagement
    appblock dll to
    >allow
    >REM *** writing to the event log
    >c:\winnt\microsoft.net\framework\v1.1.4322
    \installutil.exe
    >microsoft.applicationblocks.exceptionmanagement.d ll
    >REM Register complete.
    >pause
    >=================================
    >
    >the BAT file returns comforting sounding words, and the
    actual install
    >log that gets created also looks "comforting":
    >
    >==========================================
    >Installing assembly
    >'d:\sites\problem-
    management\wwwroot\cca\bin\microsoft.applicationbl ocks.exc
    eptionmanagement.dll'.
    >Affected parameters are:
    > assemblypath =
    >d:\sites\problem-
    management\wwwroot\cca\bin\microsoft.applicationbl ocks.exc
    eptionmanagement.dll
    > logfile =
    >d:\sites\problem-
    management\wwwroot\cca\bin\microsoft.applicationbl ocks.exc
    eptionmanagement.InstallLog
    >Creating EventLog source
    ExceptionManagerInternalException in log
    >Application...
    >Creating EventLog source
    ExceptionManagerPublishedException in log
    >Application...
    >Committing assembly
    >'d:\sites\problem-
    management\wwwroot\cca\bin\microsoft.applicationbl ocks.exc
    eptionmanagement.dll'.
    >Affected parameters are:
    > assemblypath =
    >d:\sites\problem-
    management\wwwroot\cca\bin\microsoft.applicationbl ocks.exc
    eptionmanagement.dll
    > logfile =
    >d:\sites\problem-
    management\wwwroot\cca\bin\microsoft.applicationbl ocks.exc
    eptionmanagement.InstallLog
    >==============================
    >
    >BUT, when anything tries to throw an exception, we get
    the "dreaded":
    >=======================
    >"The event source ExceptionManagerInternalException does
    not exist and
    >cannot be created with the current permissions
    >======================
    >
    >WHAT is going on here? I have seen this error reported
    frequently, but
    >in most cases running the installutil seems to clear it
    up. Here, we
    >ran installutil, with apparent success to judge from the
    log, but we
    >still can't log an exception. I'm sure it is a
    permissions thing
    >somewhere, but where? As noted, this is a Win2000 sp3.
    >
    >Jim Ross
    >MS MVP [ASP.NET][VC/MFC emeritus]
    >
    >To send email, change 'lotsofspamthroughhere' to 'msn'
    but please ask all questions in the newsgroups, not via
    private mail
    >.
    >
    Joe Audette Guest

  8. #7

    Default Re: Problem with Exception Mgt. App Block on W2k Server

    Hi Jim,

    There may be some other registry entries on which we need permission. To
    make sure this, you may use a tool "regmon" to trace the access to
    registry. It will log all access to registry. When the error occur, you can
    check its log to see if there is any permission denied error on the
    registry. For more information on this tool, you can browse to:

    [url]www.systeminternals.com[/url]

    Luke
    Microsoft Online Support

    Get Secure! [url]www.microsoft.com/security[/url]
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    MSFT Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139