tags:

views:

59

answers:

1

I'm trying to run some queries to get rid of XSS in our database using Web Data Administrator but I keep running into this Potentially Dangerous Request crap.

How do I disable validation of the query in Web Data Administrator?

+1  A: 

Go into the install directory of web data admin, usually:

C:\Program Files\Microsoft SQL Server Tools\Microsoft SQL Web Data Administrator

Then in the "Web" folder open the file "QueryDatabase.aspx" and edit the following line:

<%@ Page language="c#" Codebehind="QueryDatabase.aspx.cs" AutoEventWireup="false" Inherits="SqlWebAdmin.query" %>

Add ValidateRequest="false" to the end of it like so:

<%@ Page language="c#" Codebehind="QueryDatabase.aspx.cs" AutoEventWireup="false" Inherits="SqlWebAdmin.query" ValidateRequest="false" %>

NOTE: THIS IS POTENTIALLY DANGEROUS!! Be Careful!

Jiaaro