title: How to check if Elmah exists in a project in your custom written HttpModule?
body: <p>I have written an HttpModule that allow access to certain urls only from a set of ipaddresses. These urls are configurable using regex in web.config of each project.</p>
  
  <p>Now I plan to use this module across many existing projects.</p>
  
  <p>One more thing I wanted to do was log to elmah all the url/ip to whom access have been denied. For that I use</p>
  
  <pre><code>string message = string.Format("Access {0} to url {1} from ip {2}", isResourceForbidden ? "denied" : "allowed", url, ip);
  Elmah.ErrorSignal.FromCurrentContext().Raise(new Exception(message));
  </code></pre>
  
  <p>Now my concern is many projects do not have Elmah configured and this will then throw and exception. </p>
  
  <p>How do I check if Elmah object is available for use and only then use the above line of code ?</p>