Move the loop code into the constructor of the service class from the OnStart method.
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.
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.
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.
第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?()
第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.
第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?()
第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?()
第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)
第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?()
第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
第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?()
第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()