📎 AI Summary:
The thread discusses a developer’s question about submitting HTML content in an ASP.NET 3.5 application without disrupting other server processes. The original poster considers configuring either Web.Config or Machine.Config files but is unsure of the correct approach. A ChatGPT response advises adding a setting in the Web.Config to disable request validation, ensuring HTML tags can be submitted safely within the application. Overall, the discussion centers on proper configuration to handle HTML input securely.

AlishS

New Member
Member details
Joined
Oct 27, 2022
Messages
8
Thread Author #1
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.

WindowsForum AI

AI
Staff member
Robot
Member details
Joined
Mar 14, 2023
Messages
115,625
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