护理学专业知识

单选题You develop a service application named PollingService that periodically calls long-running procedures.These procedures are called from the DoWork method.You use the following service application code:   When you attempt to start the service, you recei

题目
单选题
You develop a service application named PollingService that periodically calls long-running procedures.These procedures are called from the DoWork method.You use the following service application code:   When you attempt to start the service, you receive the following error message: Could not start the PollingService service on the local computer.Error 1053: The service did not respond to the start or control request in a timely fashion. You need to modify the service application code so that the service starts properly.What should you do?()
A

Move the loop code into the constructor of the service class from the OnStart method.

B

Drag a timer component onto the design surface of the service. Move the calls to the long-running procedure from the OnStart method into the Tick event procedure of the timer, set the Enabled property of the timer to True, and call the Start method of the timer in the OnStart method.

C

Add a class-level System.Timers.Timer variable to the service class code. Move the call to the DoWork method into the Elapsed event procedure of the timer, set the Enabled property of the timer to True, and call the Start method of the timer in the OnStart method.

D

Move the loop code from the OnStart method into the DoWork method.

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You create a service and deploy it on a network in a building named Building1. You will deploy the service to Building2.The service in Building1 is configured using the following discovery scopes.The service in Building2 will be configured using the following discovery scopes.You need to ensure that the client application can discover the service in Building1 or the service in Building2.Which scopes should you add to the client configuration file? ()

A.

B.

C.

D.


参考答案:B

第2题:

You are planning to migrate an existing web application to Windows Azure.  The application consists of an ASP.NET web application and a set of native Win32 Windows Services that provide data to the application by using named pipes. The Windows Services cannot be modified.  You need to recommend a strategy for migrating the application to Windows Azure.  What should you recommend?()

  • A、 Define a Windows CommunicationFoundation (WCF) contract for the services.
  • B、 Deploy each Windows Service to a separate worker role.  Deploy the ASP.NET application to a web role.
  • C、 Deploy the application and Windows Services in a Windows Azure VM role.
  • D、 Upload service binaries to a web role by using the Windows Azure Service Management API.

正确答案:B

第3题:

You are developing a Windows Communication Foundation (WCF) service that will be hosted in Microsoft Internet Services (IIS) 7.0.The service must be hosted in an IIS application named Info. You need to enable this service to be hosted in IIS by changing the web.config file.Witch XML segment should you add to the web.config file?()

A.

B.

C.

D.


参考答案:C

第4题:

Your company has a domain controller named Server1 that runs Windows Server 2008 and the DNS server role. A server named Server2 runs a custom application. You need to configure DNS to include the following parameters for the custom application: Service Priority Weight Protocol Port Number Host offering this service Which record should you create?()

  • A、 Host Info (HINFO)
  • B、 Service Locator (SRV)
  • C、 Canonical Name (CNAME)
  • D、 Well-Known Service (WKS)

正确答案:B

第5题:

You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5.  This application will be part of a solution that contains a Windows Communication Foundation (WCF) service project. The Web application will be used to make calls to a service identified in theWCF service project. Management is planning to host the Web application on a separate serverfrom the WCF service. They want the WCF service to perform remotely. You need to add areference to the WCF service.  What should you do?()

  • A、You should add an assembly reference to the project.
  • B、You should add a project reference to the project.
  • C、You should add a Web reference to the project.
  • D、You should add a service reference to the project.

正确答案:D

第6题:

Your company has a domain controller named Server1 that runs Windows Server 2008 R2 and the DNS Server server role. A server named Server2 runs a custom application.You need to configure DNS to include the following parameters for the custom application: &710;Service &710;Priority &710; Weight &710; Protocol &710; Port number &710;Host offering this service Which record should you create?()

A. Host Info (HINFO)

B. Service Location (SRV)

C. Canonical Name (CNAME)

D. Well-Known Service (WKS)


参考答案:B

第7题:

You work as an application developer at Certkiller .com. Certkiller .com has asked you to develop an application that monitors and controls the activities of a Windows service.You need to use the appropriate class to meet Certkiller .com’s requirements. What should you do?()

  • A、 Use the ServiceBase class.
  • B、 Use the ServiceInstaller class.
  • C、 Use the ServiceManager class.
  • D、 Use the ServiceController class.

正确答案:D

第8题:

You develop a Windows Communication Foundation (WCF) service. It is used exclusively as an intranet application and is currently unsecured. You need to ensure that the service meets the following requirements: The service now must be exposed as an Internet application. The service must be secured at the transport level. Impersonation and delegation cannot be enabled.What should you use? ()

A. basicHttpBinding and HTTP

B. basicHttpBinding and Kerberos

C. wsHttpBinding and Kerberos

D. wsHttpBinding and HTTPS


参考答案:D

第9题:

You are the network administrator for The network consists of a single Active Directory domain named All network servers run Windows Server 2003. A member server named TK1 runs IIS. You install a Web-enabled application on TK1. The application includes a security feature that detects unauthorized attemptsto access the server. Whenever an authorized attempt is detected, the application automatically modifies the IIS configuration file to restrict the unauthorized user's access. To test the security feature, you try to gain unauthorized access to TK1. Twenty seconds after your first attempt, you try again. However, TK1 does not restrict your access on the second attempt. You wait five minutes, and then you examine the IIS configuration file. You verify that it was correctly modified by the application to restrict your access. You need to configure IIS to ensure that changes in the IIS configuration file will result in immediate changes in the behaviour of IIS. What should you do?()

  • A、Select the Enable Direct Metabase Edit option.
  • B、Specify the service account for the Application Pool as the IIS service account.
  • C、Select the Enable Rapid-Fail protection option.
  • D、Specify the status of the Internet Data Connector Web service extension as Allow.

正确答案:A

第10题:

Your network contains a single Active Directory domain. All client computers run Windows Vista  Service Pack 2 (SP2).     You need to prevent all users from running an application named App1.exe.     Which Group Policy settings should you configure()

  • A、Application Compatibility
  • B、AppLocker
  • C、Software Installation
  • D、Software Restriction Policies

正确答案:D

更多相关问题