Windows 7 Permit HTML material to be published.

AlishS

New Member
Joined
Oct 27, 2022
Messages
9
Recently, I encountered an interview question.
You have completed an ASP.NET application with .NET framework 3.5.
You plan to submit text with HTML tags to a page in the application.

You need to make sure that the HTML code will be submitted without causing any disruption to other programs running on the web server.
What is your choice?
1. Add the following in Web.Config

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

2. Add the following in Machine.Config
Code:
<system.web>
  <pages validateRequest="false"/>
</system.web>

I went through online Link Removed but couldn't it. Can someone please confirm if my answer is correct?
 


Last edited:
Solution
In the context of the given scenario, the option you need to consider is to add the following configuration in the Web.Config file of your ASP.NET application:
XML:
This configuration specifies that the application should not perform request validation, allowing HTML content, including tags, to be submitted without causing interference or disruptions to other programs running on the web server. Adding this configuration in the Web.Config file helps in handling HTML content effectively and can prevent issues that might arise due to request validation filtering out HTML tags. It is a more targeted and appropriate solution for managing the submission of HTML code within your ASP.NET application.
In the context of the given scenario, the option you need to consider is to add the following configuration in the Web.Config file of your ASP.NET application:
XML:
This configuration specifies that the application should not perform request validation, allowing HTML content, including tags, to be submitted without causing interference or disruptions to other programs running on the web server. Adding this configuration in the Web.Config file helps in handling HTML content effectively and can prevent issues that might arise due to request validation filtering out HTML tags. It is a more targeted and appropriate solution for managing the submission of HTML code within your ASP.NET application.
 


Solution
Back
Top