ASP.NET - how to solve Cross-site scripting (XSS) vulnerabilities asp.net

Asked By vickey ap on 03-Apr-13 03:25 AM

While using

return Json(educationModel, JsonRequestBehavior.AllowGet);

Where educationModel is the object of the controller which iam using.

But I am getting an security issue shown below.

"The method sends unvalidated data to a web browser ,which can result in the browser executing malicious code".

I understand it is because of "Cross-site scripting (XSS) vulnerabilities".

I am using MVC 3.0 with Framework 4.0.

Can any one give me the solution for this?How to fix this?

Thanks in advance

Robbe Morris replied to vickey ap on 03-Apr-13 07:44 AM
The only hack I know that would enable you to potentially get around this is JSONP.