validation - Validate ASP.NET Page -


i want validate page prevent html injection attacks.

some viruses, trojans etc. can detect , inject code web site. , can cause design of web site can change or malicious codes can injected.

how can validate page page create server?

you can set validaterequest true, default

<configuration>   <system.web>     <pages validaterequest="true" />   </system.web> </configuration> 

and encode user input:

server.htmlencode("<script>unsafe</script>"); 

for more information:

request validation - preventing script attacks

htmlencode, htmldecode


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -