Question
Actually I have one website running on my webserver. This site contains one textbox on an aspx page. I have a server side validation for this textbox.
But I get following exception:
Exception Type: System.Web.HttpException
Exception Message: Unable to validate data.
Exception Source: System.Web
Exception Target Site: GetDecodedData
Actually some spammer try to put following data into textbox thats why the errors are comming:
Hi everybody! Wanna see my cool pages? Please visit my homepage too:
<a href= http://celexa.ne1.net/index.html >celexa drug</a> celexa drug <a href= http://celexa.ne1.net/celexa-side-effects.html >celexa withdrawal</a> celexa withdrawal <a href= http://celexa.ne1.net/celexa-weight-gain.html >celexa side effects</a> celexa side effects <a href= http://celexa.ne1.net/celexa-withdrawal.html >celexa side effects</a> celexa side effects <a href= http://celexa.ne1.net/celexa-anxiety.html >celexa</a> celexa <a href= http://celexa.ne1.net/buy-celexa.html >buy celexa</a> buy celexa
Is there any possible way to stop that type of spamming.
Answer
I'm with Jeff, CAPTCHA is probably the best option in the way of defending against comment spam. Stripping HTML might be nice, but it won't stop the spam. One other option I might pose to you is to take a look at the ASP.NET AJAX Toolkit's NoBot control. This attempts to identify bots without requiring user interaction. I haven't used it, but it might be worth a look.
http://ajax.asp.net/ajaxtoolkit/NoBot/NoBot.aspx
Question
I have a need to allow a few individuals in different departments of our company to edit content on our website. However, I want to enforce a common theme / style over each area. One paticular department has one main page with links to about 50-60 other static pages, each with dozens of links. One approach ive thought of is to replace each of the static link pages with an xml file that contains the links for that section, then have only one aspx page that lets them choose the area they want, which then loads the links from the related xml file.
Answer
Personally, I'd consider using a tool like DotNetNuke, which already has all of this built in. This way, you can give them as little or as much control as you want and all you have to worry about is getting it setup. I admit that DNN can sometimes be a pain to get up and running the first time, but this is usually just because of not doing things correctly. Once you get experience with the product, it's almost second nature. While DNN doesn't have everything and there's probably a lot that could be done better, I try to look at it as a great starting point. If you want something changed, you can do it yourself.