For developers: Check new comments for spam
Using Akismet service, you can check all new comments for spam content. You do this with the HandleCreatingEvent service method in the handler of the ICommentCreatingEvent interface.
To use the Akismet library, instantiate an Aksimet wrapper.
NOTE: You need to provide the Akismet API key you acquired when registering on Akismet's site.
- In EventHub, use the ICommentCreatingEvent interface to subscribe to the event creation event.
The ICommentCreatingEvent fires before a comment is created.
- Paste the following code in the Global.asax file of your application.
NOTE: If you do not have a Global.asax file added to your project, in the context menu of your project, click Add » New Item… » Visual C# » Web » Global Application Class.