What should you recommend?

You are designing an exception-handling strategy for an ASP.NET Web Forms application.
The Web application will use Windows authentication. The Web application must meet the
following requirements: • Display a user-friendly error message to user. • Display a detailed
error message to server administrators. You need to recommend an approach for handling
exceptions. What should you recommend?

You are designing an exception-handling strategy for an ASP.NET Web Forms application.
The Web application will use Windows authentication. The Web application must meet the
following requirements: • Display a user-friendly error message to user. • Display a detailed
error message to server administrators. You need to recommend an approach for handling
exceptions. What should you recommend?

A.
In the customErrors element of the Web.config file, set the mode attribute to remoteOnly.

B.
Add a HandleError attribute to each controller class.

C.
On the assembly, add a SecureRules attribute with the security rule set configured to
level 2.

D.
In the Application_Error event handler, wrap the exception in an ExternalException
exception. Rethrow the exception if the user is not a member of the Administrators group.



Leave a Reply 0

Your email address will not be published. Required fields are marked *