更多"You develop a Web application. Your"的相关试题:
[单项选择]You develop a Web application. Your application contains two settings in the Web.config file. You deploy your application to production. You need to modify the application settings in the production environment without manually editing the XML markup in the Web.config file. What should you do? ()
A. Modify the application settings by using the Web Site Administration Tool.
B. Modify the application settings by using the Visual Studio property page editor for the project.
C. Modify the application settings by using the resource editor.
D. Modify the application settings by using the Visual Studio start options editor.
[多项选择]You develop a Web application that writes data to a file on a server. You restrict access to the file to specific Windows users. The Web application runs as CONTOSO/ASPNET. You deny anonymous access to the application in IIS. You add the following XML segment in the Web.config file.You need to ensure that the application meets the following requirements:It must impersonate the user when it writes data to the file.It must run as CONTOSO/ASPNET when a user does not access the file. Which two actions should you perform? ()
A. Use the following XML segment in the Web.config file.
B. Use the following XML segment in the Web.config file.
C. Use the following code segment to access the file. Dim wp As WindowsPrincipal = _CType(HttpContext.Current.User, WindowsPrincipal) Dim wi As WindowsIdentity = WindowsIdentity.GetCurrent() Dim wic As WindowsImpersonationContext = wi.Impersonate()' Access the file herewic.Undo()
D. Use the following code segment to access the file. Dim wi As WindowsIdentity = WindowsIdentity.GetCurrent()Dim wic As WindowsImpersonationContext = _WindowsIdentity.Impersonate(wi.Token)' Access the file herewic.Undo()
[单项选择]You develop a Web application that contains two master pages. You need to dynamically set the master page when a user views pages in the application. What should you do? ()
A. Set Page.MasterPageFile in the Page's Page_Init event.
B. Set Page.MasterPageFile in the Page's OnInit override.
C. Set Page.MasterPageFile in the Page's Page_Load event.
D. Set Page.MasterPageFile in the Page's Page_PreInit event.
[多项选择]You have been asked to develop an application that uses only connection-oriented protocols. Which two protocols can you use?()
A. PPP
B. UDP
C. TCP
D. ICMP
[单项选择]You deploy your companys Internet Web site. You need to deny anonymous access to the Web site, allowing only authenticated users. Which code segment should you use? ()
A.
B.
C.
D.
[多项选择]You create Web sites for your company. You apply a consistent design to the pages and controls of the Web sites. You need to make style changes to all of the Web sites on the Web server. You want to achieve this goal without having to edit the individual pages on each Web site. Which two actions should you perform?()
A. Place a theme in the App_Themes directory under the application root directory.
B. Place a theme under an ASP.NETClientFiles folder under the ASP.NET installation directory.
C. Assign a theme by setting the <%@ Page Theme="..." %> directive to the name of the application theme.
D. Assign a theme by specifying the
section in the Web.config file.
[单项选择] You are developing a Web application. Your code restricts access to some pages based on the users credentials. You need to configure IIS to supply the user's Windows credentials to your Web application. These credentials must be encrypted. What should you do? ()
A. Enable Anonymous access. Enable Integrated Windows authentication.
B. Enable Anonymous access. Enable Basic authentication.
C. Disable Anonymous access. Enable Integrated Windows authentication.
D. Disable Anonymous access. Enable Basic authentication.
[单项选择] In your web application,you need to execute a block of code whenever the session object is first created. Which design will accomplish this goal?()
A. Create an HttpSessionListener class and implement the sessionInitialized method with that block ofcode.
B. Create an HttpSessionActivationListener class and implement the sessionCreated method with thatblock of code.
C. Create a Filter class, call the getSession(false) method, and if the result was null, then execute that block of code.
D. Create an HttpSessionListener class and implement the sessionCreated method with that block of code.