Professional Web Applications Themes

Exception manegement application block can't write to Windows server 2003 - ASP.NET Security

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 question again. I saw the solution proposed in [url]http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q329291[/url] but I'm not trying to create any new Eventy Source (just the one created by EMAB that was created by me vis installutil). So my problem seems to be about writing. Here is a description: I have an ASP.Net application written with VS.Net 2002 (Net FWK 1.0). This Web Application uses Exception Management Application Block to log Events to Windows Event Log. We registered the ...

  1. #1

    Default 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 question
    again.
    I saw the solution proposed in
    [url]http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q329291[/url]
    but I'm not trying to create any new Eventy Source (just the one created by
    EMAB that was created by me vis installutil).
    So my problem seems to be about writing. Here is a description:

    I have an ASP.Net application written with VS.Net 2002 (Net FWK 1.0). This
    Web Application uses Exception Management Application Block to log Events to
    Windows Event Log. We registered the Exception Management Application Block
    using installutil.
    Our Application uses impersonation and used to work fine on Windows 2000
    Server.

    Now we installed it on a Windows Server 2003 and when an exception is
    raised, we get an "Access is denied" error when the application tries to log
    the Exception to Event Log.

    At the bottom you'll find the Stack Trace.

    Any idea will be welcome

    LucasC

    Win32Exception (0x80004005): Access is denied]

    [InvalidOperationException: Cannot open log for source {0}. You may not have
    write access.]
    System.Diagnostics.EventLog.OpenForWrite() +366
    System.Diagnostics.EventLog.WriteEvent(Int32 eventID, Int16 category,
    EventLogEntryType type, String[] strings, Byte[] rawData) +280
    System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
    type, Int32 eventID, Int16 category, Byte[] rawData) +463
    System.Diagnostics.EventLog.WriteEntry(String source, String message,
    EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) +68
    System.Diagnostics.EventLog.WriteEntry(String source, String message,
    EventLogEntryType type, Int32 eventID, Int16 category) +21
    System.Diagnostics.EventLog.WriteEntry(String source, String message,
    EventLogEntryType type, Int32 eventID) +15
    System.Diagnostics.EventLog.WriteEntry(String source, String message,
    EventLogEntryType type) +11

    Microsoft.ApplicationBlocks.ExceptionManagement.De faultPublisher.WriteToLog(
    String entry, EventLogEntryType type) +33

    Microsoft.ApplicationBlocks.ExceptionManagement.De faultPublisher.Publish(Exc
    eption exception, NameValueCollection additionalInfo, NameValueCollection
    configSettings) +1758

    Microsoft.ApplicationBlocks.ExceptionManagement.Ex ceptionManager.PublishInte
    rnalException(Exception exception, NameValueCollection additionalInfo) +76

    Microsoft.ApplicationBlocks.ExceptionManagement.Ex ceptionManager.Publish(Exc
    eption exception, NameValueCollection additionalInfo) +1934



    Lucas Guest

  2. #2

    Default RE: Exception manegement application block can't write to Windows server 2003

    Hi Lucas,

    As you mentioned, "Our Application uses impersonation and used to work fine
    on Windows 2000 Server.". Can you tell more detail about this? What is the
    account your ASP.NET will use to write the log on windows 2000? On the
    Windows 2003 server, you can change the ASP.NET configration to make it use
    System account. Will this work?

    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

  3. #3

    Default Re: Exception manegement application block can't write to Windows server 2003

    Hi Luke,
    I'm trying to run my ASP.Net application over Windows server 2003.
    Our application uses impersonate=true. I tested it with both SYSTEM and
    machine user account in processmodel of machine.config.
    I also test it changing the identity of the application pool to SYSTEM.
    As I'm impersonating I tried granting my user full control over Event Log
    registry account and Event Log folder, but nothing happens.
    Always the same problem trying to write to Application Event Log. The Event
    Log Source was created previously (using installutil with and administrator
    account) so I'm just trying to write events.
    The only way I found to make it work is when my user (the one I use to
    access the application, remember I'm impersonating) belongs to local
    Administrators group (but this is not a valid scenario)

    As I said above, I'm trying to run my Application over a Windows Server
    2003. The same application works fine in Windows 2000 Server.

    Thanks

    LucasC


    "MSFT" <lukezhanonline.microsoft.com> escribió en el mensaje
    news:8%23LLF0iuDHA.2900cpmsftngxa07.phx.gbl...
    > Hi Lucas,
    >
    > As you mentioned, "Our Application uses impersonation and used to work
    fine
    > on Windows 2000 Server.". Can you tell more detail about this? What is the
    > account your ASP.NET will use to write the log on windows 2000? On the
    > Windows 2003 server, you can change the ASP.NET configration to make it
    use
    > System account. Will this work?
    >
    > 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.)
    >

    Lucas Guest

  4. #4

    Default Re: Exception manegement application block can't write to Windows server 2003

    Hi Lucas,

    I suggest you may trace the permission dennied error with some utilities,
    for exmaple, regmon and filemon. They can record all behaviors access files
    and registry entries. You may check the access denied error in their log
    file to see if we can locate the resource which cause the permission issue.
    For more information on these utilities, 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

  5. #5

    Default Re: Exception manegement application block can't write to Windows server 2003

    Thanks Luke,

    I tryed RegMon
    I get just a few Access Denied for

    Process: w3wp.exe:2676
    Request: OpenKey
    Path: HKCU\Control Panel\International
    Result: ACCDENIED
    Other: MyDomain\MyUser

    Does this tell you something? I test it in a new (clear) Windows Server 2003
    environment. And the result was the same.
    I'll test with fileMon.

    Thanks

    Lucas C




    "MSFT" <lukezhanonline.microsoft.com> escribió en el mensaje
    news:oPS9D4wuDHA.3088cpmsftngxa07.phx.gbl...
    > Hi Lucas,
    >
    > I suggest you may trace the permission dennied error with some utilities,
    > for exmaple, regmon and filemon. They can record all behaviors access
    files
    > and registry entries. You may check the access denied error in their log
    > file to see if we can locate the resource which cause the permission
    issue.
    > For more information on these utilities, 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.)
    >

    Lucas Guest

  6. #6

    Default Re: Exception manegement application block can't write to Windows server 2003

    Hi Lucas,

    You may temporarily grant full control to everyone on this registry entry
    to see if it will help on the issue. For filemon, if you find any
    permission denied error on a special folder, you also can try to grant full
    control to see if it will help.

    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

  7. #7

    Default Re: Exception manegement application block can't write to Windows server 2003

    [email]lukezhanonline.microsoft.com[/email] (MSFT) wrote in message news:<OsatL$VvDHA.2520cpmsftngxa07.phx.gbl>...
    > Hi Lucas,
    >
    > You may temporarily grant full control to everyone on this registry entry
    > to see if it will help on the issue. For filemon, if you find any
    > permission denied error on a special folder, you also can try to grant full
    > control to see if it will help.
    >
    > 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.)
    Hi All,

    I have the same problem and I've been reading and implementing your
    posts. Still no luck. The funny thing is this issue only arose after
    I installed the SQL Server 2000 July 2003 ulative Patch. I'm running
    Windows 2003. Any ideas ?

    Ciaran
    Ciaran Guest

Similar Threads

  1. Windows 2000 Server/Windows Server 2003 Dual Boot
    By Bill Emery in forum Windows Server
    Replies: 1
    Last Post: June 28th, 01:40 PM
  2. App can't write to EventLog on Windows Server 2003
    By Scott Zabolotzky in forum ASP.NET Security
    Replies: 5
    Last Post: April 19th, 07:37 PM
  3. Error trying to write to the Application Log on a Windows 2003 server
    By Andy Mortimer [MS] in forum ASP.NET Security
    Replies: 1
    Last Post: February 25th, 02:31 PM
  4. Problem with Exception Mgt. App Block on W2k Server
    By Jim Ross [MVP] in forum ASP.NET Security
    Replies: 6
    Last Post: December 10th, 09:02 AM
  5. Write permissions for ASPNET user on Windows 2003
    By Jose Lopes Moreira in forum ASP.NET General
    Replies: 0
    Last Post: July 18th, 03:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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