You are working on an existing Web site. You need to secure the Web site by redirecting all users to the logon page, Login.aspx. After logging on, users must be sent back to the page that they originally requested. Which code segment should you use? ()

A . In the Web.config file: <authorization> <deny users="?" /></authorization> On each page in the Web site: Protected Sub Page_Load(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles Me.Load FormsAuthentication.Initialize() End Sub B . On each page in the Web site: Protected Sub Page_Load(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles Me.Load FormsAuthentication RedirectToLoginPage("login.aspx") End Sub C . On each page in the Web site: Protected Sub Page_Load(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles Me.Load Response.Redirect("login.aspx") End Sub D . In the Web.config file: <authentication mode="Forms"> <forms name=".ASPXUSERDEMO" loginUrl="login.aspx" protection="All" timeout="60" /></authentication&gt

时间:2022-10-18 22:16:17 所属题库:MCTS(70-528)题库

相似题目