位置:首页 > 题库频道 > 其它分类 > 计算机其它 > 微软MCAD 70-310 实战百题

You create an XML Web service named YourService. You must ensure that this service meets the following URL authorization requirements .0 Anonymous access must be disabled for YourService.® An authenticated user named Userl cannot access YourService. 0 All other authenticared users can access YourService.You configure Internet Information Services(IIS) to meet these requirements. You now need to configure the authorization section in the Web.config file to properly authorize the users.Which code segment should you use?

发布时间:2021-12-25

试卷相关题目

  • 1You create a serviced component named Scheduler. Scheduler isregistered in a library application. The Scheduler methods parseString objects into Date Time objects.You write a console application named Coverage.exe to test eachmethod in Scheduler. You want Coverage.exe to test Scheduler formultiple cultures to verify its globalization support.What should you do?

    A.Create a Culturelnfo object for each culture locale beforecalling the Scheduler methods

    B.Create a Regionlnfo object for each culture locale beforecalling the Scheduler methods

    C.Set the current thread's CurrentCulture property to eachculture locale before calling the Scheduler methods

    D.Create a Coverage .ex

    E.config file and add a element to the configuration file for each culture locale

    开始考试点击查看答案
  • 2You create a .NET Remoting object named Patientinfo that exposes medical patient information. Because of the confidential nature of the information, you must ensure that the data remains secure.You want client applications to connect to Patientinfo over a secure communication channel. You want to accomplish this task by writing the minimum amount of code.What should you do?

    A.Create your own host application and use a TcpChannel and BinaryFormatter

    B.Create your own host application and use an HttpChannel and a SoapFormatter

    C.Install Patientinfo in an Internet Information Services (IIS) virtual directory. Configure Patientinfo to use a TcpChannel and a BinaryFormatter. Configure IIS to use SSL

    D.Install Patientinfo in an Internet Information Services (IIS) virtual directory. Configure Patientinfo to use an HttpChannel and a SoapFormatter. Configure IIS to use SSL

    开始考试点击查看答案
  • 3You are creating a Windows-based application named WinAppl. To the application, you add a Windows Form named Forml and a reference to a SingleCal 1 .NET Rernoting object named TheirObject.You need to ensure that Forml creates an instance of TheirObject to make the necessary remote object calls.Which code segment should you use?

    A.RemotingConfiguration.RegisterActivatedClientType ( —GetTy pe (TheirObject),"http://YourServer/TheirAppPath/TheirObject.rem")Dim theirObject As New TheirObject()

    B.RemotingConfiguration.RegisterWellKnownClientType( _GetTy pe(TheirObject),"http://YourServer/TheirAppPath/TheirObje ct.rem")Dim theirObject As New TheirObject ()

    C.RemotingConfiguration.RegisterActivatedServiceType( _GetT ype(TheirObject),Dim theirObject As New TheirObject ()

    D.RemotingConfiguration.RegisterWellKnownServiceType( _GetT ype(TheirObject),"http://YourServer/TheirAppPath/TheirObj ect. rem" , _WellKnownObjectMode . Singleton) Dim theirObject AsNew TheirObject()

    开始考试点击查看答案
  • 4You create an XML Web service project that consists of three services named BronzeService, SilverService, and GoldService. All three services are located in the same virtual directory on a production computer. When customers subscribe to your service, they select only one of the three available services.A new customer subscribes to SilverService. You need to create a discovery document that enables this customer to use only SilverService .Which discovery document should you create?

    A.

    B.

    C. 〈exclude path=w__vti_cnf" />^exclude path= "_vti_log'* />

    D. 〈exclude path""一vti一cnf" />〈exclude path=nBron2eServic

    E.asmxn />〈exclude path="GoldService.asmx" />

    开始考试点击查看答案
  • 5You are creating a .NET Remoting object named Payroll. The Payroll class allows remote client applications to access payroll data for your company. Client applications are developed by using Windows Forms and Web Forms.You must ensure that remote client applications are securely authenticated prior to gaining access to Payroll object. You want to accomplish this task by writing the minimum amount of code.What should you do?

    A.Use a TcpChannel and a Binary Format ter for the Payroll class

    B.Use an HttpChannel and a SoapFormatter for the Payroll class

    C.Host the Payroll class in Internet Information Services(IIS) and implement Basic authentication.

    D.Host the Payroll class in Internet Information Services(IIS) and implement Integrated Windows authentication

    开始考试点击查看答案
  • 6You have a .NET Remoting object named BatchOrder. The BatchOrder class allows remote client applications to submit orders in batches .Each BatchOrder object holds state information that is specific to each remote client application. The BatchOrder class has overloaded constructors for initializing an object.You want to develop a server application to host BatchOrder objects. What should you do?

    A.Create a Windows service, and register BatchOrder as a client- activated object

    B.Create a Windows service, and register BatchOrder as a server- activated Singleton object

    C.Host BatchOrder in Internet Information Services (IIS) and create a Web.config file to register BatchOrder as a server- activated SingleCall object

    D.Host BatchOrder in Internet Information Services (IIS) and create a Web.config file to register BatchOrder as a server- activated object with an infinite lease

    开始考试点击查看答案
  • 7You are creating a .NET Remoting object named Dealer for automobile dealership. Dealer exposes a method named SaveSales that saves sales information for the dealership.Dealer is configured to use Integrated Windows authentication to authenticate its callers . You musL ensure that all users of SaveSales are members of the Manager group before allowing the code within SaveSales to run.Which code segment should you use?

    A.Public Function SaveSales(ByVal _ sales As DataSet) As DataSet 'Code to save sales data goes here.End Function

    B.Public Function SaveSales(ByVal _ sales As DataSet) As DataSet 1 Code to save sales data goes here.End Function

    C.〈PrincipalPermission(SecurityAction.InheritanceDemand, Role="Manager")>Public Function SaveSales (ByVal __ sales As DataSet) As DataSet 'Code to save sales data goes here.End Function

    D.Public Function SaveSales(ByVal _ sales As DataSet) As DataSet Dim role As String = "Manager"PrincipalPermission perm = NewPrincipalPermission(Nothing, role)'Code to save sales data goes her

    E.End Function

    开始考试点击查看答案
  • 8You are creating an XML Web service named LegalService. This serviceexposes two Web methods named Send Message and ReceiveMessage.SendMessage is used to send highly confidential messages to its customers. ReceiveMessage is used to receive highly confidential messages from its customers and to process these messages for future use.You need to ensure that these messages cannot be intercepted and viewed by anyone other than LegalService and the customers who access LegalService.Which security mechanism should you use?

    A.SSL

    B.Authorization

    C.Authentication

    D.Impersonation

    开始考试点击查看答案
  • 9You develop an application named YourApp that uses a Windows Form, a Microsoft SQL Server database, and several database components. You want to restrict users from writing their own applications to access YourApp's database components.You need to configure your database component assemblies to accomplish this goal.What should you do?

    A.Apply the StrongNameldentityPermission attribute, and specify SecurityAction . LinkDemand . Set the Public-Key property to the public key of the key file you use to sign your application's assemblies

    B.Apply the StrongNameldentityPermission attribute, and specify SecurityAct ion . RequestMinimum. Set the PublicKey property to the public key of the key file you use to sign your application 's assemblies

    C.Apply the PublisherldentityPermission attribute, and specify SecurityAction.Deny

    D.Apply the Publisherldent ityPermission attribute, and Specify SecurityAction.RequestMinimum

    开始考试点击查看答案
  • 10You are creating an XML Web service named InventoryService for a nationwide clothing retailer company. The service provides near real-time inventory information to individual store managers by using a virtual private network(VPN).InventoryService exposes a Web method named Retrievelnventory that returns inventory information to the caller. You configure Internet Information Services(IIS) and InventoryService to use Integrated Windows authentication.You need to write code in InventoryService to ensure that only members of the Manager group can access Retrievelnventory.

    A.To the 〈authorization〉 section of the We

    B.config file, add the following element:Callow roles="Manager" />B.To the 〈authorization〉 section of the Web.config file, add the following element:

    C.In Retrievelnventory, add the following code segment: If User.Identity.Name.Equals("Manager") Then'Code to retrieve inventory data goes here.End If

    D.In Retrievelnventory, add the following code segment: If User.Identity.AuthenticationTyp

    E.Equals("Manager”} Then1Code to retrieve inventory data goes here.End If

    开始考试点击查看答案
返回顶部