Web Service & Client Software to monitor downloads in BlogEngine.Net using Al Nyveldt’s Simple Download Counter Extension (Updated)

By Mayank Raichura at June 30, 2009 00:33
Filed Under: Flagged, Download

It’s been quite a while that I actually wrote a good content but trust me, I was busy for good. Recently, I wanted to monitor downloads(not total monitoring, I’ll leave that to Google Analytics and StatCounter, but just how many files get downloaded everyday) of files I posted on the blog. For this, I’ve been using Al Nyveldt’s Simple Download Counter extension for couple of months. I just loved its simplicity and as it’s name suggests, it was pure vanilla simple extension.

But, due to its simplicity, I had to visit each page to check the download counts. Since, the extension used quite a simple XML file, I thought, maybe I could consume the file in a web service and allow a remote client to connect to it and get its local content synched with the server. And Eureka, it was a great idea(maybe just for me but yeah….it saves my time and is comfortable to use :D).

So I created the web service and a client to consume it. To add little bit of security, I’ve included a plain text passphrase authentication that should give you sufficient enough security(in my initial idea, it wasn’t even there).

Now if that’s enough, why don’t you test the client and provide me feedbacks or bugs that you may encounter during your use and if you like it, just leave your thanks :).

 

Feature List

  • Allows you to monitor downloads of files posted on your BlogEngine.Net Blog without visiting your blog.
  • Provides a simple list of files that are downloaded and how many times they are downloaded.
  • Monitors old and new download values and highlights files that are downloaded since last save.
  • Stores copy of each website locally so that it can load last statistics when that site is monitored. Helpful when you are running multiple instances of BlogEngine.Net
  • Uses a single password for the purpose of security. Uses BlogEngine.Net’s Membership Provider interface to authenticate web service request.
  • Resides in Tray when minimized. Shows a balloon tool tip when a file is(or files are) downloaded.

 

Requirements

  • A working instance of Al Nyveldt’s Simple Download Counter extension which can be downloaded here on the server.
  • .Net Framework 2.0 for the client application.

 

Installation Steps

  • Download the Web Service & Client setup from the below link.
  • Extract it to your favourite location.
  • You will find “downloadstats.cs” under “wwwroot\App_Code”. Open it in your favourite text editor(try Notepad++)
  • Goto line 23 & change  the value of default_hash to your own password. You will need it when you connect using the client application.
  • Upload the files in given structure i.e. “downloadstats.asmx” to your blog root and “downloadstats.cs” as well as “downloadedfile.cs” to your App_Code folder.
  • Install the client application on the client computer.

Usage

Download Stats by Noise De Silence

  • The client application is very simple. You need to provide two three attributes for the application to work.
  • First one is Site URL. You need to enter your complete site URL that you use to access your blog. For example, mine is http://www.mayankraichura.com/. The application appends the web service file name(“/downloadstats.asmx”) to the link you provide. So the final link would look like http://www.mayankraichura.com/downloadstats.asmx.
  • Password is the value you entered in the downloadstats.cs file. Make sure the password you enter and the default_hash value are same. Otherwise, the application won’t work. The web service uses the default Membership Provider to authenticate user. Therefore, you need to provide the username & password to request your download statistics. You can change your password through Users in Admin section of your blog.
  • The default(and the only duration) of update is 1 minute. Once you press the Start button, the client will keep updating the table every 1 minute by querying the web service.
  • The client also compares new values with old values and if there is increase in a value, that record will be highlighted with yellow colour.

Download Stats by Noise De Silence Highlighted


That should be enough for now. Don’t forget to leave your suggestions, comments, bug reports and,if et al, your valuable compliments.

 

Download Link

Simple Download Counter Stats Client.zip

 

 

Regards,

Mayank Raichura

Fighting Comment Spam in BlogEngine.Net

By Mayank Raichura at June 08, 2009 04:13
Filed Under: Flagged, Tips & Tricks

nospam Recently I was going through the comments I received on my posts and I was shocked to see Spam all over it. These comments seem so genuine that it’s hard to identify that they are spam unless you do a little search over it. For example, I received a comment from a person(or rather a  bot) which seemed so faithful that I couldn’t stop replying to it thanking for his interest over my blog. But when I ran a google search over it, the result page was full of such comment from different BlogEngine.Net sites.

 

Infact, I’m already using Akismet extension to protect against comment spam but it is clearly visible that it has severely failed to do so. Anyways, it will always be hard to protect your blogs from Comment Spam but what we can do is stop the spammer getting benefit from it.

 

Let’s first understand the motive behind comment spam. This has to to do with Google’s PageRank feature which, lets just say, works based on the links to different websites. For further information check this page and this page. So, what spammers want to do is increase page rank of their(or their clients’) PageRank by posting comments with links to their sites. So all we need to do is stop Google from indexing these links. And the best way to do it is by using the well known rel=”nofollow” attribute. So let me show you how to implement this feature on your blog.


First of all, it is necessary to know that how comments are shown at the bottom of your blog posts. Well for this, BlogEngine.Net uses a user control called CommentView.ascx that resides in your theme folder. Yes, the control is theme specific and so the c

hanges, we’ll need to make, will be theme specific. I’m just going to show you how to do it in Standard theme that comes out-of-the-box with BlogEngine.Net

 

Open CommentView.ascx in your favourite text editor(if your don’t have one, I suggest you to try Notepad++).

Look for a line similar to the one given below.

 

<%= Comment.Website != null ? "<a href=\"" + Comment.Website + "\" class=\"url fn\">" + Comment.Author + "</a>" : "<span class=\"fn\">" +Comment.Author + "</span>" %>

 

Now, just after class attribute, add rel=”nofollow”. The code should look something like this…

<%= Comment.Website != null ? "<a href=\"" + Comment.Website + "\" class=\"url fn\" rel=\"nofollow\">" + Comment.Author + "</a>" : "<span class=\"fn\">" +Comment.Author + "</span>" %>

 

This will tell Google not to index the links in the comments section and therefore, the links in the comments in the comment would remain futile.

 

 

Your comments and suggestions are always welcome :)

Heavy Wind and Hailstorm near Hadamtala on Gondal-Rajkot Highway

By Mayank Raichura at June 06, 2009 08:27
Filed Under: Flagged, News

Just received call from my Dad that he was stuck in a heavy hailstorm and high speed wind which he assumes to be of around 50-60 KMPH. As per his information, the hailstorm started around 6 PM and lasted hardly for 15 minutes followed by Heavy Wind that uprooted large trees. One of the trees fell just near my dad’s car and broke the side mirror. A professional photographer has been called upon at the site to take pictures.

 

Strangely there are no reports of High Speed Wind around Rajkot and as per GujaratWeather.com (WX CallSign CW8030) there is no record of wind above 49.9 KMPH which was reported 3.39 PM, approx 2 hours before the said incident.

 

It should  be noted that similar incidents have been noted in last couple of years while I have been  a witness to one such incident.

 

I’m expecting the pictures to come by tonight and will update it as soon as possible.

About Mayank Raichura

Mayank Raichura Mayank Raichura is an aspiring VB.Net and ASP.net programmer who hails from Rajkot, Gujarat(India). He is known for his creations like Social Bookmarking Extension for BlogEngine.Net – AddThis and BlogEngine.Net Extension Creator. He has 6 years of experience in ASP and VB6 programming but recently have jumped in ASP.Net and VB.Net. Apart from that he loves sky gazing, photography, hiking, trekking, visiting place and playing games.

He believes - "Problems in life exist so that we can find a way to resolve them and thereby making us stronger and mature."

You can find him on following Social Networking Sites:

Facebook Linked In Flickr RSS Twitter

Chat With Me

Chat with Me!

Statistics

mayankraichura.com visitor count

trace