PrepAway - Latest Free Exam Questions & Answers

Which code fragment should you add to the Web.config file?

You create a Microsoft ASP.NET Web application by using the Microsoft .NET Framework version 3.5.
You plan to set up authentication for the Web application. The application must support users from untrusted domains.
You need to ensure that anonymous users cannot access the application.
Which code fragment should you add to the Web.config file?

PrepAway - Latest Free Exam Questions & Answers

A.
<system.web> <authentication mode="Forms"> <forms loginUrl="login.aspx" /> </authentication> <authorization> <deny users="?" /> </authorization> </system.web>

B.
<system.web> <authentication mode="Forms"> <forms loginUrl="login.aspx" /> </authentication> <authorization> <deny users="*" /> </authorization> </system.web>

C.
<system.web> <authentication mode="Windows"> </authentication> <authorization> <deny users="?" /> </authorization> </system.web>

D.
<system.web> <authentication mode="Windows"> </authentication> <authorization> <deny users="*" /> </authorization> </system.web>


Leave a Reply