Recently i have faced an interview question.
You have finished an ASP.NET application using .NET framework 3.5.
You plan to submit text that contains HTML code to a page in the application.
You need to ensure that the HTML code can be submitted successfully without affecting other applications that run on the web server.
What would be your option?
-
Add the following in Web.Config
<system.web> <pages validateRequest="false"/> </system.web> -
Add the following in Machine.Config
<system.web> <pages validateRequest="false"/> </system.web>
I guess the correct answer could be (1). Just wish to confirm the answer from SO experts. Please help me.
1) is correct. by putting the code in machine.config you will affect the whole machine as this are global settings.