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 

Related posts

Comments

December 13. 2007 14:25

trackback

Trackback from DotNetKicks.com

Akismet extension for BlogEngine.net 1.2

DotNetKicks.com

December 17. 2007 14:50

Al Nyveldt

I was just thinking I'd make an extension like this over the weekend. Thanks for beating me to it. Smile

Al Nyveldt us

December 19. 2007 14:46

Chris

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?

Chris us

December 19. 2007 15:03

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.

Justin Etheredge us

December 19. 2007 15:04

Justin Etheredge

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

Justin Etheredge us

December 19. 2007 15:18

Chris

Sweet, it works!

Thanks for an excellent extension!

Chris us

December 20. 2007 09:23

massimo

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

massimo it

December 20. 2007 09:28

Justin Etheredge

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

Justin Etheredge us

December 23. 2007 19:12

Chris

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?

Chris us

December 23. 2007 22:31

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

Justin Etheredge us

December 31. 2007 05:55

trackback

Trackback from BlogEngine.NET

Extensions

BlogEngine.NET

January 4. 2008 18:30

warren

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

warren us

January 4. 2008 18:40

warren

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

warren us

February 13. 2008 04:31

Richard

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

Richard gb

February 13. 2008 11:05

Justin Etheredge

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.

www.codeplex.com/.../View.aspx?WorkItemId=4910

Justin Etheredge us

February 14. 2008 13:05

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.

Klaus

Klaus @tGraefensteiner us

Comments are closed