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: 1. It must impersonate the user when it writes data to the file 2. 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.identity impersonate="false"/B、 Use the following XML segment in the Web.config file.identity impersonate="true"/C、Use the following code segment to access the file. WindowsPrincipal wp =(WindowsPrincipal)HttpContext,Current.User;WindowsIdentity wt = (WindowsIdentity)wp.Idetity;WindowsImpersonationContext wic = wi.Impersonate();// Access The file herewic.Undo();D、Use the following code segment to access the file. WindowsIdentity wi = WindowsIdetity.GetCurrent();WindowsImpersonationContext wic = WindowsIdentity.Impersonate(wi.Token);// Access the file herewic.Undo();

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: 1. It must impersonate the user when it writes data to the file 2. 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.<identity impersonate="false"/>
  • B、 Use the following XML segment in the Web.config file.  <identity impersonate="true"/>
  • C、Use the following code segment to access the file. WindowsPrincipal wp =(WindowsPrincipal)HttpContext,Current.User;WindowsIdentity wt = (WindowsIdentity)wp.Idetity;WindowsImpersonationContext wic = wi.Impersonate();// Access The file herewic.Undo();
  • D、Use the following code segment to access the file. WindowsIdentity wi = WindowsIdetity.GetCurrent();WindowsImpersonationContext wic = WindowsIdentity.Impersonate(wi.Token);// Access the file herewic.Undo();

相关考题:

You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5.  You host the Web application in Microsoft Internet Information Services (IIS) 6.0. You browse theapplication and receive the following error message:  Server Application Unavailable  The web application you are attempting to access on this web server is currently unavailable.Please hit the "Refresh" button in your web browser to retry your request.  You view the Application event log and discover the following message:  It is not possible to run two different versions of ASP.NET in the same IIS process. Please use theIIS Administration Tool to reconfigure your server to run the application in a separate process.  To ensure productivity you need to solve this problem as quick as possible.  What should you do?()A、You should change the IIS isolation mode.B、You should assign the application to another application pool.C、You should configure all applications that are part of your application's application pool in orderto use the same version of ASP.NET.D、You should run the Aspnet_regiis.exe Tool.E、You should restart the application pool that hosts the application.

You develop an ASP.NET web application that uses a Windows Azure web role. The application includes a startup script that installs a third-party component. You are developing a test plan for the startup script.  What should you recommend?()  A、 Enable Remote Desktop Protocol (RDP) and deploy the application without the startup script.  Connect to the web role instance by using RDP, and then manually test the startup script.B、 Deploy the application in the Windows Azure Compute Emulator.C、 Deploy the application with a custom error page.D、 Deploy the application and then use IntelliTrace.

You are migrating a solution to Windows Azure.   The solution includes a web application and a business logic layer.  The web application runs on three dual-core servers.  The business logic layer runs on two quad-core servers.   The Windows Azure application must match or exceed the current hardware specifications.  You need to recommend role instance sizes that minimize cost.  What should you recommend?()A、 Small for the web application and Medium for the business logic layerB、 Small for the web application and Large for the business logic layerC、 Medium for the web application and Large for the business logic layerD、 Large for the web application and Extra Large for the business logic layer

You work as an application developer at Contoso.com. You use Microsoft .NET Framework 3.5 and Microsoft ADO.NET to develop an application. The user name and password that is kept by the connection string is stored directly in the code of the application. You want to make sure that the password in the connection string is as protected.   What should you do? ()A、 Add the connection string to the Settings.settings file.B、 Add connection string to the Web.config file and use protected configuration.C、 Use the TRUE setting in the Persist Security Info keyword.D、 Use the FALSE setting in the Persist Security Info keyword

You work as the IT professional in an international company which is named Wiikigo. You are experiencedin implementing and administering a network operating system. You are specialized in deploying servers,configuring Windows Server 2008 Terminal services and network application services, and configuring aweb services infrastructure. You manage a server that runs Windows Server 2008. The server hasTerminal Service Web Access (TS Web Access) installed. Several line-of-business applications areavailable on the server by using TS Web Access. You have a new application installed on the server. Youhave to make the application available through TS Web Access. In order to achieve this,What action should you perform?()A、In order to make the application available through TS Web Access, the data source for TS Web Accessshould be specified from the TS Web Access Web site.B、In order to make the application available through TS Web Access, the application should be added to the RemoteApp Programs list from TS RemoteApp Manager.C、In order to make the application available through TS Web Access, the users should be added to the TS Web Access Computers group from the Local Users and Groups snap-in.D、In order to make the application available through TS Web Access, the mstsc.exe command should be run and specify the /v parameter should be specified from the command prompt.

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. identity impersonate="false"/B、Use the following XML segment in the Web.config file. identity impersonate="true"/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 are the desktop administrator for your company. Your company’s software developers use Windows XP Professional and IIS on their client computers to develop Web-based applications. All client computers use Microsoft Internet Explorer 6. 0 or later as their Web browser. One of the developers reports that he can no longer access the Web-based application on his desktop by using his Web browser. When you attempt to access the application by using your Web browser, you receive the following error message: “Cannot find server or DNS Error.” You verify that the World Wide Web Publishing Service is started on the developer’s computer. You also verify that you are using the correct URL to access the developer’s computer by using your Web browser. You need to ensure that the developer can access the Web application by using his Web browser. How should you configure the developer’s computer?() A、Start the default Web site.B、Start the IIS Admin Service.C、Run the IPconfig /registerdns command.D、In the default Web site properties,disable the host header setting.

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  When you access the application in a Web browser, you receive the following error message: "Service Unavailable".  You need to access the application successfully.  What should you do? ()A、Start Microsoft IIS 6.0.B、Start the Application pool.C、Set the .NET Framework version.D、Add the Web.config file for the application.

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 have a Web server named Server1 that runs Windows Server 2003 Service Pack 2 (SP2). Server1 hosts one Web site. You create a second Web site that hosts a third-party Web application named App1. The vendor of the third-party application states that the application does not support host headers. You need to ensure that users can access both Web sites. What should you do?()A、Enable WebDAV.B、Enable Server Side Includes.C、Configure both Web sites to use different IP addresses.D、Configure both Web sites to use different application pools.

You are developing a Web application. The Web application restricts access to an administrative page. The Web application uses the following code segment to protect the page.if (Page.User.Identity.Name != @"CONTOSO/Administrator") { the page, you are redirected to Login.aspx. You discover that the User.Identity.Name property is not being correctly populated. You need to ensure that you can access the page when you are logged on as Administrator. Which two actions should you perform? ()A、In the Web.config file, enable impersonation.B、In IIS, enable anonymous access.C、In IIS, disable anonymous access.D、In the Web.config file, set the authentication mode to Windows.

You work as an ASP.NET Web Application Developer for SomeCompany.  The company uses Visual Studio .NET 2010 as its application development platform. You create an ASP.NET Web application using .NET Framework 4.0. You create a Web page in the application. The Web page will get large sets of data from a data source.  You add a DataPager control to the page. You are required to display navigation controls that enable you to create a custom paging Ul for the DataPager control. What will you do?()A、Use NextPreviousPagerField.B、Use NumericPagerField.C、Use PreviousPagerField.D、Use NextPagerField.E、Use TemplatePagerField.

You work as an ASP.NET Web Application Developer for SomeCompany. The company uses Visual Studio .NET 2010 as its application development platform. You have recently finished the development of an ASP.NET Web application using .NET Framework 4.0. Now, you are deploying the ASP.NET Web application to a remote server. You are required to select a deployment method that will make sure that all Internet Information Services (IIS) settings, in addition to the Web content, are deployed to the remote server. Which of the following deployment methods will you select to accomplish this?()A、Web Setup projectB、Web-based deploymentC、Deployment manifestD、Web Deployment Tool

You develop an ASP.NET web application that uses a Windows Azure web role. The application includes a startup script that installs a third-party component. You are developing a test plan for the startup script.  What should you recommend?()A、 Enable Remote Desktop Protocol (RDP) and deploy the application without the startup script.  Connect to the web role instance by using RDP, and then manually test the startup script.B、 Deploy the application in the Windows Azure Compute Emulator.C、 Deploy theapplication with a custom error page.D、 Deploy the application and then use IntelliTrace.

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、SetPage.MasterPageFile in the Page’sPage_Initevent.B、SetPage.MasterPageFile in the Page’sOnInit event.C、SetPage.MasterPageFile in the Page’sPage_Loadevent.D、SetPage.MasterPageFile in the Page’sPage_PreInitevent.

单选题You are the desktop administrator for your company. Your company’s software developers use Windows XP Professional and IIS on their client computers to develop Web-based applications. All client computers use Microsoft Internet Explorer 6. 0 or later as their Web browser. One of the developers reports that he can no longer access the Web-based application on his desktop by using his Web browser. When you attempt to access the application by using your Web browser, you receive the following error message: “Cannot find server or DNS Error.” You verify that the World Wide Web Publishing Service is started on the developer’s computer. You also verify that you are using the correct URL to access the developer’s computer by using your Web browser. You need to ensure that the developer can access the Web application by using his Web browser. How should you configure the developer’s computer?()AStart the default Web site.BStart the IIS Admin Service.CRun the IPconfig /registerdns command.DIn the default Web site properties,disable the host header setting.

单选题You develop an ASP.NET web application that uses a Windows Azure web role. The application includes a startup script that installs a third-party component. You are developing a test plan for the startup script.  What should you recommend?()A Enable Remote Desktop Protocol (RDP) and deploy the application without the startup script.  Connect to the web role instance by using RDP, and then manually test the startup script.B Deploy the application in the Windows Azure Compute Emulator.C Deploy theapplication with a custom error page.D Deploy the application and then use IntelliTrace.

单选题You want to enable users of a Web application to modify the Web application's UI and behavior. These modifications must be maintained at the user level so that when users return to the Web application, the changes are still in effect. You need to achieve this goal by using the minimum amount of custom code. What should you do?()APersist control data by using view state.BUse Web Part controls.CMaintain a profile for each user.DEnable session state on the Web application.

单选题You are migrating a solution to Windows Azure.   The solution includes a web application and a business logic layer.  The web application runs on three dual-core servers.  The business logic layer runs on two quad-core servers.   The Windows Azure application must match or exceed the current hardware specifications.  You need to recommend role instance sizes that minimize cost.  What should you recommend?()A Small for the web application and Medium for the business logic layerB Small for the web application and Large for the business logic layerC Medium for the web application and Large for the business logic layerD Large for the web application and Extra Large for the business logic layer

单选题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?()ASetPage.MasterPageFile in the Page’sPage_Initevent.BSetPage.MasterPageFile in the Page’sOnInit event.CSetPage.MasterPageFile in the Page’sPage_Loadevent.DSetPage.MasterPageFile in the Page’sPage_PreInitevent.

多选题You are a systems administrator responsible for managing a Windows Server 2008 Web Server Currently,there are no Web sites configured on the server. You need to configure the server to host two Web applications: Engineering App and Sales App. Both Web applications must be accessible by using HTTPport 80 without the use of host headers. Also, you must protect against problems in one Web applicationaffecting the performance or reliability of the other Web application. Which two steps should you take tomeet these requirements?()ACreate a single Web site that contains both Web applications.BCreate two Web sites, one for each Web application.CAssign both Web applications to the same application pool.DAssign each Web application to its own application pool.

多选题You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5.  You host the Web application in Microsoft Internet Information Services (IIS) 6.0. You browse theapplication and receive the following error message:  Server Application Unavailable  The web application you are attempting to access on this web server is currently unavailable.Please hit the "Refresh" button in your web browser to retry your request.  You view the Application event log and discover the following message:  It is not possible to run two different versions of ASP.NET in the same IIS process. Please use theIIS Administration Tool to reconfigure your server to run the application in a separate process.  To ensure productivity you need to solve this problem as quick as possible.  What should you do?()AYou should change the IIS isolation mode.BYou should assign the application to another application pool.CYou should configure all applications that are part of your application's application pool in orderto use the same version of ASP.NET.DYou should run the Aspnet_regiis.exe Tool.EYou should restart the application pool that hosts the application.

多选题You create a Microsoft ASP.NET Web application by using the Microsoft .NET Framework version 3.5.  When you review the application performance counters, you discover that there is an unexpected increase in the value of the Application Restarts counter. You need to identify the reasons for this increase.  What are three possible reasons that could cause this increase?()ARestart of the Microsoft IIS 6.0 host.BRestart of the Microsoft Windows Server 2003 that hosts the Web application.CAddition of a new assembly in the Bin directory of the application.DAddition of a code segment that requires recompilation to the ASP.NET Web application.EEnabling of HTTP compression in the Microsoft IIS 6.0 manager for the application.FModification to the Web.config file in the system.web section for debugging the application.

单选题You have a Web server named Server1 that runs Windows Server 2003 Service Pack 2 (SP2). Server1 hosts one Web site. You create a second Web site that hosts a third-party Web application named App1. The vendor of the third-party application states that the application does not support host headers. You need to ensure that users can access both Web sites. What should you do?()AEnable WebDAV.BEnable Server Side Includes.CConfigure both Web sites to use different IP addresses.DConfigure both Web sites to use different application pools.

单选题You develop an ASP.NET web application that uses a Windows Azure web role. The application includes a startup script that installs a third-party component. You are developing a test plan for the startup script.  What should you recommend?()A Enable Remote Desktop Protocol (RDP) and deploy the application without the startup script.  Connect to the web role instance by using RDP, and then manually test the startup script.B Deploy the application in the Windows Azure Compute Emulator.C Deploy the application with a custom error page.D Deploy the application and then use IntelliTrace.