locked
Writing event log to event viewer on web server RRS feed

Answers

  • User1120430333 posted

    All NT based Windows workstation O/S(s) from Windows NT 3.1 to Windows 10  and all Windows NT 3.1  to Windows 2017 server based O/S(s) have an Application eventlog. All modern Windows O/S(s) are NT based O/S(s) fashioned after the NT O/S. 

    https://en.wikipedia.org/wiki/Windows_NT

    Make your own eventlog for your application, as the example code shows,  and use it staying away from Application eventlog.  However, if you insist upon using the Application eventlog, then you don't try to make it, becuase its already there.

    https://msdn.microsoft.com/en-us/library/xzwc042w(v=vs.110).aspx

    myLog.Source = "Application";

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, June 4, 2018 7:33 AM
  • User283571144 posted

    Hi tvb2727,

    I wish I could add a new one, but I will not have the access to do that.

    As you mentioned, if you want to modify the event log, you need have the enough permission.

    There is no workaround way.

    If you want to modify or read the evenlog, you should use the administator account or give the enough permission for the user(application pool).

    More details about how to add the permission, you could refer to below answer.

    https://stackoverflow.com/a/3138269/7609093

    Best Regards,

    Brando

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 14, 2018 9:26 AM
  • User753101303 posted

    Hi,

    I would be surprised if the "Application Error" source is not registered. It could be a default value that could be configured in the web.config file maybe (if you don't have access an admin user may want to change this).

    Edit: I believe the "health monitoring" feature is taking a source computed maybe from System.Environment.Version. It might Worth to look how it is done at referencesource.Microsoft.com and use perhaps the same source ?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 14, 2018 9:51 AM

All replies

  • User1120430333 posted

    All NT based Windows workstation O/S(s) from Windows NT 3.1 to Windows 10  and all Windows NT 3.1  to Windows 2017 server based O/S(s) have an Application eventlog. All modern Windows O/S(s) are NT based O/S(s) fashioned after the NT O/S. 

    https://en.wikipedia.org/wiki/Windows_NT

    Make your own eventlog for your application, as the example code shows,  and use it staying away from Application eventlog.  However, if you insist upon using the Application eventlog, then you don't try to make it, becuase its already there.

    https://msdn.microsoft.com/en-us/library/xzwc042w(v=vs.110).aspx

    myLog.Source = "Application";

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, June 4, 2018 7:33 AM
  • User-1188570427 posted

    All NT based Windows workstation O/S(s) from Windows NT 3.1 to Windows 10  and all Windows NT 3.1  to Windows 2017 server based O/S(s) have an Application eventlog. All modern Windows O/S(s) are NT based O/S(s) fashioned after the NT O/S. 

    https://en.wikipedia.org/wiki/Windows_NT

    Make your own eventlog for your application, as the example code shows,  and use it staying away from Application eventlog.  However, if you insist upon using the Application eventlog, then you don't try to make it, becuase its already there.

    https://msdn.microsoft.com/en-us/library/xzwc042w(v=vs.110).aspx

    myLog.Source = "Application";

    Okay, cool. I think you answered my question as "Application" will always be there with Windows installed. 

    I wish I could add a new one, but I will not have the access to do that.

    Monday, June 4, 2018 10:18 AM
  • User283571144 posted

    Hi tvb2727,

    I wish I could add a new one, but I will not have the access to do that.

    As you mentioned, if you want to modify the event log, you need have the enough permission.

    There is no workaround way.

    If you want to modify or read the evenlog, you should use the administator account or give the enough permission for the user(application pool).

    More details about how to add the permission, you could refer to below answer.

    https://stackoverflow.com/a/3138269/7609093

    Best Regards,

    Brando

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 14, 2018 9:26 AM
  • User753101303 posted

    Hi,

    I would be surprised if the "Application Error" source is not registered. It could be a default value that could be configured in the web.config file maybe (if you don't have access an admin user may want to change this).

    Edit: I believe the "health monitoring" feature is taking a source computed maybe from System.Environment.Version. It might Worth to look how it is done at referencesource.Microsoft.com and use perhaps the same source ?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 14, 2018 9:51 AM