wiki:C

Version 1 (modified by yox, 11 years ago) (diff)

--

Installation for ASP.NET, using C#:

Requirements:

  1. ASP.NET 2.0 website
  2. FireStats 1.3.5 or higher

Installation:

  1. Download FireStats.
  2. Create a /firestats folder in the root of your website, and extract the files there.
  3. In your browser, open URL (your_site's_domain)/firestats, or /firestats.index.php, if it's not a default for your site.
  4. Enter the DB credentials at bottom left.
  5. In the FireStats interface, go to Sites Management, and click on "Add a new site". Add your site.

Now you're done with the FireStats installation. The ASP.NET part:

  1. Add the class found in: http://firestats.cc/browser/branches/firestats-1.3/firestats/integration/C%23/cs_hit.cs to your web application.
  2. If you're using multiple sites, you can specify the ID of the site in your web.config file, by adding the following line to the <configuration><appSettings> section:

<add key="SendCommentsEmail?" value="true" />

  1. Now simply use FireStats.Send() in the Page_Load of each page you'd like to monitor. If you use a master page, just put it once in the master page's Page_Load, and you're done!

To see your statistics, go to (your_site's_domain)/firestats.

Enjoy! Yossi. http://www.yossikolesnicov.com