Error 500.19 Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid in ASP.Net

Last Reply on Jul 26, 2017 08:57 AM By dharmendr

Posted on Jul 24, 2017 03:24 AM

 

A potentially dangerous Request.Form value was detected from the client (TextBixcomment="...e to only <a> and ").
Description: ASP.NET has detected data in the request that is potentially dangerous because it might include HTML markup or script. The data might represent an attempt to compromise the security of your application, such as a cross-site scripting attack. If this type of input is appropriate in your application, you can include code in a web page to explicitly allow it. For more information, see http://go.microsoft.com/fwlink/?LinkID=212874.

Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (TextBixcomment="...e to only <a> and ").

Source Error:


[No relevant source lines]

.......................................................

 


Posted on Jul 24, 2017 05:28 AM

Thank you for your response, still facing same problem after applying your solution

 

Server Error in '/' Application.
A potentially dangerous Request.Form value was detected from the client (TextBixcomment="<a class="btn" href=...").
Description: ASP.NET has detected data in the request that is potentially dangerous because it might include HTML markup or script. The data might represent an attempt to compromise the security of your application, such as a cross-site scripting attack. If this type of input is appropriate in your application, you can include code in a web page to explicitly allow it. For more information, see http://go.microsoft.com/fwlink/?LinkID=212874.

Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (TextBixcomment="<a class="btn" href=...").

Source Error: 

 <pages validateRequest ="false" />   </system.web>


Posted on Jul 24, 2017 07:54 AM

As you are using .Net 4.0 or higher frameworks you need to add the below line in the web.config file as well.

<system.web>
    <httpRuntime requestValidationMode="2.0" />
</system.web>

 


Posted on Jul 26, 2017 07:20 AM

i did , then i got this error

 

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information:
Module	   IIS Web Core
Notification	   Unknown
Handler	   Not yet determined
Error Code	   0x800700b7