Akismet extension for BlogEngine.net 1.2

I had been long planning on adding an extension to BlogEngine.net 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 BlogEngine.net) 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 BlogEngine.net 1.2 Akismet Extension

Download the BlogEngine.net 1.3 Akismet Extension 

Be Sociable, Share!


  1. I was just thinking I’d make an extension like this over the weekend. Thanks for beating me to it. :)

  2. 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?

  3. 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.

  4. @Al – Sorry about that! It appears that I screwed it up anyways. It should be working now though.

  5. Sweet, it works!

    Thanks for an excellent extension!

  6. 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

  7. In order to use Akismet you have to have an API key from wordpress.com. 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).

  8. 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?

  9. 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 BlogEngine.net issue tracker and make the changes that I have put in that ticket.

  10. Im getting an out of index error when trying to add the api key and the blog url. Any ideas?

  11. Nevermind I got that work now it is hanging much like the guy reports above…

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

  13. Here is the workitem that I opened with the source fix for BlogEngine.net. This issue is fixed now and should be in their latest source drops. This is what the error is most likely.


  14. 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.


  15. Thanks for an excellent extension!

  16. thanks for an nice extension. i love this.

  17. Great extension, thanks for the note.

  18. where to get API Key for this extension.

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

  20. Well it seems to work, at least I can still accept comments. I added a post to my blog regarding your extension and detailed directions to installing and configuring it. Feel free to check it out and let me know if I missed something.


    Thanks again for sharing this extension.

  21. Thank you very much

    Good extension

  22. 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…


  23. @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.

  24. Akismet needed for handle spamming…
    Thanks bro.

  25. 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?

  26. @Ahmad You just need to go sign up for a wordpress account. They are free, you will receive an API key when you do that.

  27. Thanks for the Extension!!!

  28. I think this is ‘a must’ extension for blogengine user. thanks for sharing it..

  29. Wow, what a great extension – good job!

  30. I thinks this extension is really work it.

  31. I like blog engine and your extension is great!