I have written a message board as my first ASP.NET project. It seems to work well so far. However, one of the features I have is that each message has a spam rating. It is simply the number of times that viewers have marked the message as spam divided by the total number of times the message has been viewed. The idea is to allow users to ignore messages with high spam ratings if they choose to do so.
However, the whole system can be foiled by a spammer simply viewing his own message and refreshing it a bunch of times, which will increase the number of times the message has been viewed. It can also be foiled by someone who marks the message as spam a bunch of times in a row. I need a way to determine whether a particular visitor has already viewed a particular message, and a way to determine whether a particular user has already marked a particular message as spam.
I don't want to require registration - I want anyone to be able to view or post messages. Two ideas I've been considering are setting a cookie when the visitor gets onto the site so I can track them, or creating a new data table that logs IP addresses of users when they view a message or mark it as spam. Can anyone else think of a better way? Does .NET have any built in features that might help me determine whether the visitor is viewing a page for the first time?