Dim as new

This preview shows page 42 - 44 out of 151 pages.

Dim EXSoapHeaderCollection As New SoapHeaderCollection() EXSoapHeaderCollection.Add(myAuthenticateUser) Dim accountBalance As String accountBalance = EXAccountInformation.GetAccountBalance() Answer: A Question: 54 You are creating an XML Web service named XYZService. This service has a function named WriteMessage that writes messages to a flat file in the C:\EXServiceLog directory..You want to implement security for WriteMessage so that WriteMessage and all the code it calls can write messages only to the EXServiceLog directory. Which code segment should you use?A. Dim filePermission As New FileIOPermission_(FileIOPermissionAccess.Write, “C:\EXServiceLog”) filePermission.Demand() B. Dim filePermission As New FileIOPermission_(FileIOPermissionAccess.Write, “C:\EXServiceLog”) filePermission.Deny() C. Dim filePermission As New FileIOPermission_(FileIOPermissionAccess.Write, “C:\EXServiceLog”) filePermission.PermitOnly() D. Dim filePermission As New FileIOPermission_(FileIOPermissionAccess.Write, “C:\EXServiceLog”) filePermission.Assert() Answer: C Explanation: The CodeAccessPermission.PermitOnly method prevents callers higher in the call stack from using the code that calls this method to access all resources except for the resource specified by the current instance. Reference: .NET Framework Developer's Guide, PermitOnly .NET Framework Class Library, CodeAccessPermission.Demand Method .NET Framework Class Library, CodeAccessPermission.Assert Method Incorrect AnswersA:We want to grant permission, not check the permission.
Background image
Exam Name: Developing XML Web Services & Server Components with MS Visual Basic .NET Exam Type: Microsoft Exam Code: 70-310 Total Questions: 223 Page 43 of 151 Note: The CodeAccessPermission.Demand method forces a SecurityException at run time if all callers higher in the call stack have not been granted the permission specified by the current instance. B: We must allow permission, not deny it.D: The CodeAccessPermission.Assert method asserts that calling code can access the resource identified by the current permission through the code that calls this method, even if callers higher in the stack have not been granted permission to access the resource.Question: 55 You develop an application named EXApp. This application needs to run on the same computer as a Windows service named EXService. You want to ensure that EXService starts from EXApp if EXService is not already running..Which code segment should you use?
Background image
Image of page 44

You've reached the end of your free preview.

Want to read all 151 pages?

  • Spring '16
  • .NET Framework, Microsoft Visual Studio

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture