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

You create an XML Web service named ReportService for an application on your company's intranet. You configure Internet Information Services(IIS) and ReportService to use Integrated Windows authentication .You configure the Access Control List (ACL) for ReportService to allow access to only members of a Windows group named FieldAgents. You test and confirm that only members of the FieldAgents group can use ReportService.ReportService includes a method named Submit Surveillance that calls a serviced component named ReportDat

发布时间:2021-12-25

A.ReportData uses COM+role- bases security to restrict component access to members of the COM+ Agents role. The COM+ Agents role is configured to include the FieldAgents group.You call SubmitSurveillance. However, when the call to ReportData is attempted, an exception is thrown indicating that access is denied. You need to correct this problem.What should you do?A.In IIS, enable Anonymous access

B.In the section of the Web.config file, add the following line of code:〈identity impersonate^"true”/>

C.In the〈system.web> section of the Web.config file, add the following line of code:〈identity impersonate^"false"/〉

D.In the section of the Web.config file, add the following line of code:〈authentication mode="None"/>

试卷相关题目

  • 1You create a serviced component named StockQuote that implements the IStockQuote interface. The StockQuote class includes the following code segment:Public Class StockQuoteInherits ServicedComponent Implements IStockQuote Public Function GetQuote(stock as Ticker) as Price Implements IStockQuote.GetQuote 'Implementation code goes here.End Function End ClassYou want to secure StockQuote so that it can only be accessed by users in the Customers and Managers roles.Which actions should you take?(Each correct answer presents part of the solution. Choose two)

    A.To the StockQuote class, add the following attribute:

    B.To the StockQuote class, add the following attribute: 〈Transaction(TransactionOption.Required)>

    C.Implement the ISecurityCallContext COM interface in the StockQuote class. Implement the IsCallerlnRole method for the Customers and Managers roles

    D.To the StockQuote class, add the following attributes:

    E.To the beginning of the GetQuote method, add the following code segment:If Not ContextUtil.IsCallerlnRole("Managers,Customers")_Then Throw New SecurityException("Access is denies.”)End If

    开始考试点击查看答案
  • 2You create a serviced component named Tracker that uses attributes to dynamically register itself for C0M+ services. Tracker is in an assembly file named Fabrikam.dll. Tracker uses transactions and role-based security. The roles and the application identity for Tracker are configured on the development computer.You are preparing to hand off Tracker to and administrator for deployment to production computers. You want all the COM4- configuration information for Tracker to be installed on the production computers.What should you do?

    A.Use the Component Services Tool to export Tracker to an .msi file. Provide to the administrator the .msi file with instructions to run the installer

    B.Provide to the administrator the Fabrikam.dll file. Instruct the administrator to copy Fabrikam.dll to all production computers and to install it in the global assembly cache

    C.Provide to the administrator the Fabrikam.dll file. Instruct the administrator to use the . NET Services Installation Tool(Regsvcs.exe) to install Tracker

    D.Add a new merge module to your solution. Add Fabrikam.dll to the merge modul

    E.Provide to the administrator the .msi filewith installation instructions.

    开始考试点击查看答案
  • 3You have a .NET Remoting object named Utils. The Utils class is a client-activated .NET Remoting object.You want to write a client application that creates and uses a Utils object. You want the client application to hold onto a reference to a Utils object for the duration of its execution.What should you do?

    A.Construct the Utils object, and hold the object in a member variable

    B.Construct the Utils object, and set the LifeTiraeService. LeaseTime to 0

    C.In the client application, create an Implementation of the ISponsor interface. Implement the Renewal method to extend the lease

    D.In the client application, create an Implementation of the ILease interfac

    E.Implement the CurrentLeaseTime property to return Int32.MaxValue

    开始考试点击查看答案
  • 4You are creating a Visual Studio .NET assembly, which will run as a shared assembly with other applications. The assembly will be installed in the global assembly cache. You will distribute the assembly to many customers outside your company.You must ensure that each customer receives your assembly without alteration, in a way that reliably specifies the origin of the code.What should you do?

    A.Sign the assembly by using a strong name. Do nothing further

    B.Sign the assembly by using File Signing tool (Signcode.exe). Do nothing further

    C.First sign the assembly by using a strong name. Then sign the assembly by using File Signing tool (Signcode.exe)

    D.First sign the assembly by using File Signing tool (Signcod

    E.exe) .Then sign the assembly by using a strong name

    开始考试点击查看答案
  • 5You have an application named MyApp that contains a reference to version 1.0.0.0 of a strongly named serviced component named YourComponent. This component is located in the bin directory of MyApp.You receive version 2.0.0.0 of YourComponent, which you install in the global assembly cache. You reconfigure the application configuration file to redirect calls to version 2.0.0.0 .You now receive version 3.0.0.0 of YourComponent, which you install in the global assembly cache. You do not reconfigure the application configuration file. You then run MyApp.Which version of YourComponent is loaded and from which location is it loaded?

    A.Version 1.0.0.0 from the bin directory

    B.Version 2.0.0.0 from the global assembly cache C . Version 2.0.0.0 from the bin directoryD. Version 3.0.0.0 from the global assembly cache

    开始考试点击查看答案
  • 6You are creating an XML Web service named YourWebService. Callers must be authenticated by using credentials passed in the SOAP header of each Web service call. You want to use role-based security to secure each method on YourWebService. The roles that users are assigned are stored in a custom database table.You need to write code that will allow you to dynamically change which roles can execute specific methods at run time.What should you do?

    A.Create a Windowsldenti ty object and a Windows Principal Object. Then implement declarative role-based security

    B.Create a Windowsldenti ty object and a Windows Principal object. Then implement imperative role-based security

    C.Create a Gene riel dentity object and a GenericPrincipal object. Then implement declarative role-based security

    D.Create a Genericldentity object and a GenericPrincipal object. Then implement imperative role-based security

    开始考试点击查看答案
  • 7You are developing an application by using Visual C# .NET and Visual Basic .NET. The application will use functions form a DLL written in unmanaged code.One function requires the calling application to allocate unmanaged memory, fill it with data, and pass the address of the memory to the function . On returning from the function, the calling application must deallocate the unmanaged memory.You need to decide how your application will handle unmanaged memory.What should you do?

    A.Use a byte array

    B.Use the methods of the Marshal class

    C.Use the methods of the MemoryStream class

    D.Derive a new class from the Stream class, and override the allocation methods

    开始考试点击查看答案
  • 8You create an assembly that contains a collection of serviced components. You want to secure these components by using a collection of COM+ roles. Different group of roles will secure different components.You need to ensure that role-based security is enforced in the assembly. You want to accomplish this goal by adding an attribute to the project source code.Which attribute should you use?

    A.〈assembly: SecurityRole("Assembly", true)>

    B.〈assembly:SecurityPermission(SecurityAction.RequestOptional)>

    C.〈assembly:ApplicationActivation(ActivationOption.Server)>

    D.〈assembly:AppiicationAccessControl(AccessChecksLevel = AccessChecksLevelOption.ApplicationComponent)>

    开始考试点击查看答案
  • 9You are creating an XML Web service named ViewOrders that is available to customers over the Internet. ViewOrders exposes a Web method named ViewShippingDetail that requires additional security. You decide to use generic role-based security to secure ViewShippingDetail.You need to write code to ensure that once the caller is authenticated, a user identity named Generic is created. This user identity has membership in a group named Shipping to allow access to ViewShippingDetail .Which code segment should you use?

    A.Dim myldentity As IIdentity = New GenericIdentity("Generic”, "Custom")Dim Roles As String() = {"Shipping"}Dim myPrincipal = New GenericPrincipal(myldentity, Roles)ir.yldentity = Windowsldentity. Get Current

    B.Dim myldentity As Genericldentity = New_Genericldentity("Generic", "Custom")Dim Roles As String () = {"Shipping"}Dim myPrincipal = New GenericPrincipal(myldentity,_ Roles) Thread.CurrentPrincipal = myPrincipal

    C.Dim myldentity As Ildentity = New_Genericldentity("Generic", "Shipping")Dim myPrincipal As 工Principal = New_WindowsPrincipal(myldentity)Threa

    D.CurrentPrincipal = myPrincipalD.Dim myGenericIdentity As Ildentity = New_Genericldentity(”Generic", "Custom")Dim myldentity As Windowsldentity = myGenericIdentity Dim Roles As String() = {"Shipping"}Dim myPrincipal = New GenericPrincipal(myldentity,_Roles)Windowsldentity.Impersonate(myldentity.Token)

    开始考试点击查看答案
  • 10You are creating a serviced component named Itemlnventory. An online catalog application will use Itemlnventory to display the availability of products in inventory.Additional serviced components written by other developers will continuously update the inventory data as orders are placed.The Item Inventory class includes the following code segment: <Transaction(TransactionOption.Required)>Public Class Itemlnventory Inherits ServicedComponent 'Method code goes here.End ClassItemlnventory is configured to require transactions. You want Item Inventory to respond to requests as quickly as possible, even if that means displaying inventory values that are not up to date with the most recent orders.What should you do?

    A.To the Itemlnventory class, add the following attribute:

    B.To all methods of the Itemlnventory class, add the following attribute:

    C.Modify the Transaction attribute of the Itemlnventory class to be the following attribute:

    D.Modify the Transaction attribute of the Itemlnventory class to be the following attribute:〈Transaction(TransactionOption.Required, __IsolationLevel:» TransactionlsolationLevel.ReadOncoromitted)>

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