微软MCAD 70-310 实战百题
题目内容

You create a . NET Remo ting object named AdminService, which is hosted in Internet Information Services(IIS) . The object uses an HttpChannel and a BinaryFormatter. AdminService is in an assembly named Ad- minService.dll. The URL for AdminService is http://LocalHost/ AdminService/AS.rem.You write a test console application named Tester.exe to test the AdminService interface. Tester.exe includes the following code segment:Module Tester Sub Main ()Dim service As New AdminService ()'Code to exercise the service object.End Sub End ModuleYou write a configuration file for Tester.exe. The configuration file is named Tester.exe.config and includes the following code segment:Cconfiguration〉〈system•runtime.remoting>〈application〉<client><wellknown url="http://LocalHost/ AdminService/AS.rem" type="AdminService, AdminService"/></client> </application〉〈/system.runtime.remoting></configuration>You run Tester.exe. The application immediately throws a Sys- tem.NullReferenceException. The exception includes the following message: "Object reference not set to an instance of an object.,’You need to resolve this exception.What should you do?

2021-12-25

A.To the application element of theTester.exe.config file, add the following code segment:〈channel ref=,'http">〈formatter ref="binary,,/>

B.Replace the use of the AdminService constructor in Tester.exe with the following code segment:Dim service As AdminService =CType(Activator.Createlnstance (GetType(AdminService)), AdminService)

C.At the beginning of the Main method in Tester.exe, add the following line of code:RemotingConfiguration.Configure("Tester.exe.config")

D.Rename the configuration file from Tester.ex

E.config to Tester.config

题目答案

试卷相关题目

最新试卷
热门试卷

长理培训客户端 资讯,试题,视频一手掌握

去 App Store 免费下载 iOS 客户端