.Net Interview Questions and Answers

Search:

ASP.NET MVC security Interview questions

By : Shiv Prasad Koirala | May 28th, 2015 | Views : 6285 | Comments : 2 Bookmark and Share

What is XSS ?

 

XSS (Cross site scripting) is a security attack where the attacker injects malicious code while doing data entry. This code can be a javascript , vbscript or any other scripting code. Once the code is injected in end user's browser. This code can run and gain access to cookies, sessions, local files and so on.

 

For instance below is a simple product data entry form. You can see in the product description how the attacker has injected a javascript code.

 

 

Once we click submit you can see the JavaScript code actually running.

 

 

 How can we prevent the same in MVC ?

 

In MVC by default XSS attack is validated. So if any one tries to post javascript or HTML code he lands with the below error.

 

 

Download our 100 ASP.NET MVC interview question PDF from


http://www.codeproject.com/Articles/556995/ASP-NET-MVC-interview-questions-with-answers

 
Rate this Article :
1 Star
2 Stars
3 Stars
4 Stars
5 Stars
1 1 1 2 1
 
 
Comments
Posted By : 32 | 2015-09-10
8
Posted By : Dfd | 2015-09-08
Hi

Write a Comment

All fields marked with * are mandatory

0d94e

 

 
 

.NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala

In this article we will explain .NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala.... Read More

What is the difference between Stored Procedures and Function (SQL Server interview question with answers)?

In this article we will explain what is the difference between Stored Procedures and Function.For more articles and videos visit us on www.questpond.com... Read More

Explain MVC application life cycle?

In this article we will explain MVC application life cycle.For more articles and videos visit us on www.questpond.com... Read More

C# Design pattern interview questions with answers: - How Singleton is different from Static class?

In this article we will explain How Singleton is different from Static class.... Read More

WCF interview questions and answers: - What is the difference between Service endpoint and Client endpoint?

In this article we will explain What is the difference between Service endpoint and Client endpoint.... Read More

.NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala

In this article we will explain .NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala.... Read More

What is the difference between Stored Procedures and Function (SQL Server interview question with answers)?

In this article we will explain what is the difference between Stored Procedures and Function.For more articles and videos visit us on www.questpond.com... Read More

Explain MVC application life cycle?

In this article we will explain MVC application life cycle.For more articles and videos visit us on www.questpond.com... Read More

C# Design pattern interview questions with answers: - How Singleton is different from Static class?

In this article we will explain How Singleton is different from Static class.... Read More

WCF interview questions and answers: - What is the difference between Service endpoint and Client endpoint?

In this article we will explain What is the difference between Service endpoint and Client endpoint.... Read More

Article Categories

Learn in Hindi