You create an ASP.NET application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5.
The application conforms to the following specifications:
– It runs on a host server.
– It functions without administrative privileges.
– It uses a method named GetConnectionString.
The GetConnectionString method reads the database connection strings from the Machine.config file.
During the test process, attempts to load a page that uses the GetConnectionString method fail.
The following error message is displayed:
“Access Denied”
You need to ensure that the GetConnectionString method functions appropriately.
What should you do?
A.
Sign the assembly that contains the GetConnectionString method.
B.
Modify the GetConnectionString method to use the Web.config file.
C.
Configure the URL of the application as a trusted site in the Web browser.
D.
Decorate the GetConnectionString method by using the Unsafe attribute.