Here's a version of our classic hit counter script implemented in ASP.NET.
I've implemented it as a custom user control in order to make it
easy to use on a large number of pages. It works much in the same
manner as our original sample and stores the counts in a file based
on the hosting file's name with a .cnt appended to it. For example,
if you use the control on a page named index.aspx, it stores the
hit count for that page in index.aspx.cnt. It also stays true to
the original and lets you select whether you want the count
displayed as text or images. I've also added a new option to show
no display at all.
The main issue most people will probably have is the standard
anonymous users not being able to write to the folder containing
web content. In order to fix this you should use explorer to
change the permissions on the .cnt files to allow writing. Don't
change the permissions on the whole folder. If you don't want to
change permissions on each .cnt file then create a new folder to store
them all, change permissions on that folder, and then modify the script
to store the count files in that folder. A final option is to wait
until I get our database driven counter converted to ASP.NET (now available).
The zip file below includes the ascx control, a sample aspx file that
uses the control, and a sample count file. You can get the images in
a zip file from here(5.3 KB).