This post was migrated from Justin’s personal blog, '' Views, opinions, and colorful expressions should be taken in context, and do not necessarily represent those of Simple Thread (and were written under the influence of dangerous levels of caffeination).

I had been long planning on adding an extension to for Askimet, but I had been talked out of it by the fact that I wasn't really getting any comment spam. Well recently it appears that Mads Kristensen (the creator of has had a bit of trouble with spam on his blog and so I decided to go ahead and implement it. Since there is a wonderful Akismet API for C# out there already, I just decided to go ahead and use that. It is BSD licensed, so everyone should be happy. Well, it took all of about 10 minutes to implement, since Joel Thoms did all the hard work writing the API. So here it is, just drop the two files into your App_Code/Extensions folder and change the apiKey and blogUrl variables in AkismetExtension.cs to whatever you need them to be. I was going to use the Utils.AbsoluteWebRoot, but I wasn't sure if Akismet used this info to see if you have registered the site with your key. So I figured I would leave it configurable if you want to use the same key for more than one site. Anyways, here is the download:

Download the 1.2 Akismet Extension

Download the 1.3 Akismet Extension 



Well I think I followed the instructions by updating the blog address and api key… but when I try and save a comment it just sits there telling me "Saving the comment….".

Did I miss something?

Justin Etheredge

Yeah, that was my stupid mistake. I was using the boolean result of CommentCheck backwards. I guess in the tests I ran Akismet was seeing my comments as spam! Just download it again, I have fixed it.


Hi dear, i’m feeling stupid… please help me: I inserted files but what’s "apiKey"?
like in chris application, when I try and save a comment it just sits there telling me "Saving the comment…."…
thank you

Justin Etheredge

In order to use Akismet you have to have an API key from You don’t actually need to have a wordpress blog, but you have to setup and account with them to get an API key so that you can use their service (They provide the Akismet service).


It seems that BlogEngine.Net v1.3 doesn’t like the Akismet extension… Any chance you will be able to release an updated version?

(in case it helps…) Please?

Justin Etheredge

Yep, I have an updated version all done, but I am waiting on a few fixes that to the Extension manager that I have reported. I’ll post the new extension manager, but you probably won’t be able to get it setup until they fix two issues. If you want you can go to the ticket I posted on the issue tracker and make the changes that I have put in that ticket.


I am getting the same error index out of range exception. How was it fixed?

Klaus @tGraefensteiner

Hi Justin,

I like your Akismet Extension. One nice additional feature would be the logging of rejected "comment-check" requests. Akismet seems to filter out a lot of false positives.



Thanks for sharing this extentsion, will it also work with the latest from 1.4.5?

Al Bsharah

Hey, thanks for the extension. Before I go setting things up, one quick question…will I have the ability to manage what Akismet believes to be spam from within WordPress, or within BlogEngine? Or do they just go into a black hole of some kind…


Justin Etheredge

@Al Sorry, but they just go into a black hole. I am just using someone else’s api that passes the spam message to Akismet and only receives a boolean response back. Then it accepts or rejects based on that response value.

Ahmad Masykur

My blog received ton of comments every day. Temporary solution is turning on comment moderation on my BlogEngine.NET setting. But this solution need manually approve non comment spam. I would like to try akismet but I can’t get free API key. How to get free akismet API key for non wordpress blog?

Comments are closed.