Skip to content

dtrietsch/warty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

What is this?
This is code to send then receive XML to Hoptoad's notifier API via .NET.


How do I use it?
This code was built using a Gateway pattern as described by Martin Fowler in Patterns of Enterprise Application Architecture.

Usage is a snap:

(1) Add a reference to the DLL.

(2) Call the Gateway's Notify method and pass in your api key, environment name, and exception.

An easy way to do this is to add it to your Global.asax like this:

  protected void Application_Error(object sender, EventArgs e)
  {
    HoptoadGateway hoptoadGateway = new HoptoadGateway();
    hoptoadGateway.Notify(ConfigurationManager.AppSettings["hoptoadNotifierApiKey"],
      ConfigurationManager.AppSettings["hoptoadNotifierEnvironment"], HttpContext.Current.Request,
      Server.GetLastError().GetBaseException());
  }


To what extent?
Use it, copy it, fork it, whatever, as much as you want.

About

.NET Hoptoad Notifier Gateway

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages