There is no EventLog source named ‘ASP.NET x.x.x.’. This module requires .NET Framework x.x

There is no EventLog source named ‘ASP.NET x.x.x.’. This module requires .NET Framework x.x

The above error is thrown because we are trying to log the ASP.Net errors (in most cases, unhandled errors) in to EventLog of the O/S using “WebMonitor.UnhandledExceptionModule” but the required EventLog source is missing. Therefore the fix for this would be to create the missing EventLog source. But where? Below I explain where and how to create the missing EventLog source in the server that you have hosted your site.

Where?

The missing EventLog source should be created in the O/S registry at the following location;

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet001\Services\EventLog\Application

How?

  1. Open the O/S registry by executing the “regedit” command in the “Run”
  2. Browse to the above location in the O/S registry, if there’s already an EventLog source which is pointing to the same .Net Framework as the one your application is running on, then export that key as shown in the screenshot below;

regexport

  1. Then open the exported *.reg file and change the Key name to the missing EventLog source shown in the error message as shown in the screenshot below and save the file;

editexport

  1. Go back to O/S registry again and import the edited *.reg file;

regimport

That’s it, this should fix the issue for you!! If not pls let me know

Advertisements

2 thoughts on “There is no EventLog source named ‘ASP.NET x.x.x.’. This module requires .NET Framework x.x

  1. Nice post, Rasika. I am afraid, however, this workaround cannot solve the problem entirely. As soon as someone’s webengine.dll assembly got updated, the workaround would fail because the file version changed.

    • True. The best is to create your own EventLog source in the code if your are going to log any exceptions in the EventLog of the O/S in your application.
      You can do this by checking the existence of the log source as shown below;

      if(!EventLog.SourceExists(“CustomSource”))
      {
      EventLog.CreateEventSource(“CustomSource”, “Application”);
      }

      Cheers!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s