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
Loved the article? Hated it? Didn’t even read it?
We’d love to hear from you.
I was just thinking I’d make an extension like this over the weekend. Thanks for beating me to it. 🙂
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?
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.
@Al – Sorry about that! It appears that I screwed it up anyways. It should be working now though.
Sweet, it works!
Thanks for an excellent extension!
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
massimo
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).
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?
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.
Im getting an out of index error when trying to add the api key and the blog url. Any ideas?
Nevermind I got that work now it is hanging much like the guy reports above…
I am getting the same error index out of range exception. How was it fixed?
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.
http://www.codeplex.com/blogengine/WorkItem/View.aspx?WorkItemId=4910
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.
Klaus
thanks for this theme
Thanks for an excellent extension!
thanks for an nice extension. i love this.
Great extension, thanks for the note.
where to get API Key for this extension.
Thanks for sharing this extentsion, will it also work with the latest from BlogEngine.net 1.4.5?
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.
http://jim.blacksweb.com/post/Block-SPAM-in-comments.aspx
Thanks again for sharing this extension.
Thank you very much
Good extension
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…
Thanks!
AL
@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.
Akismet needed for handle spamming…
Thanks bro.
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?
@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.
Thanks for the Extension!!!
Great.
I think this is ‘a must’ extension for blogengine user. thanks for sharing it..
Wow, what a great extension – good job!
I thinks this extension is really work it.
I like blog engine and your extension is great!