Labels

Friday, August 27, 2010

#3 Practice Questions and Discussion for Exam 70-536

QUESTIONS Technology Focus: Embedding configuration, diagnostic, management, and installation features into a .NET Framework application

1. You develop a Windows application by using the .NET Framework. The application makes use of an assembly named MyAssembly. The assembly file MyAssembly.d11 is deployed in a folder named bin20 under the application's root directory. The MyAssembly assembly is not strongly named.
You must configure the Windows application to specify the location of the MyAssembly assembly. Any settings that you change must not affect other applications installed on the system. What should you do?
A. Modify the application configuration file to add the following settings to the <assemblyBinding> section: <probing privatePath="bin20"/>
B. Modify the application configuration file to add the following settings to the <assemblyBinding> section: <probing privatePath="bin20"/MyAssembly.d11"/>>
C. Modify the machine configuration file and add the following settings to the <assemblyBinding> section for the MyAssembly assembly: <codeBase href="bin20/myAssembly.d11"/>
D. Modify the machine configuration file and add the following settings to the <assemblyBinding> section for the MyAssembly assembly: <codeBase href="bin20"/>

2. You have deployed an application that uses a dependent assembly named TaxCalc. It was written to work with version 1.1.3.6 of TaxCalc, but has been tested successfully through version 2.1.1.0. The user updates the TaxCalc assembly to version 2.1.1.2 and your application no longer runs.
Several other applications on the computer use TaxCalc. The other applications on the computer can run with the new version of TaxCalc.You need to ensure that your application works with a supported version of TaxCalc that is installed on the computer. Your solution should allow other applications to continue to use the latest version of TaxCalc.What should you do?
A. Add the following to the publisher configuration file for the TaxCalc assembly:
    
<dependentAssembly>
   <assemblyIdentity type="win32" processorArchitecture="x86"
name="TaxCalc"
publicKeyToken="12345abcde12345bcdef12345abcde" />
      <bindingRedirect oldVersion="2.1.1.2" newVersion="2.1.1.0" 
/>
</dependentAssembly>
B. Add the following to the application configuration file:
<dependentAssembly>
   <assemblyIdentity type="win32" processorArchitecture="x86" name="TaxCalc" 
publicKeyToken="12345abcde12345bcdef12345abcde" oldVersion="1.1.3.6-2.1.1.2" 
newVersion="2.1.1.0" />
</dependentAssembly
C. Add the following to the application configuration file:
<dependentAssembly>
   <assemblyIdentity type="win32" processorArchitecture="x86" name="TaxCalc" 
publicKeyToken="12345abcde12345bcdef12345abcde" />
      <bindingRedirect oldVersion="2.1.1.2" newVersion="2.1.1.0" />
</dependentAssembly>
D. Add the following to the publisher configuration file:
<dependentAssembly>
   <assemblyIdentity type="win32" processorArchitecture="x86" name="TaxCalc" 
publicKeyToken="12345abcde12345bcdef12345abcde" oldVersion="2.1.1.2" 
newVersion="1.1.3.6-2.1.1.0" />
</dependentAssembly>

3. You are developing a .NET Framework application. When a user's attempt to log on to the application fails, you must write an entry to the Windows event log. When looking at the Windows event log viewer, the source of the events must be listed as MyApp.You need to create an event source that can be used to write entries to the event log. Which code segment should you use?
Option A
C# 
EventLog.LogNameFromSourceName("MyApp", "Security");
Visual Basic
EventLog.LogNameFromSourceName("MyApp", "Security")
Option B
C# 
if(!EventLog.SourceExists("MyApp"))
{
  EventLog.CreateEventSource("MyApp", "Application");
}
Visual Basic
If Not EventLog.SourceExists("MyApp") Then
    EventLog.CreateEventSource("MyApp", "Application")
End If
Option C
C# 
if(!EventLog.SourceExists("MyApp"))
{
  EventLog.CreateEventSource("MyApp", "Security");
}
Visual Basic
If Not EventLog.SourceExists("MyApp") Then
    EventLog.CreateEventSource("MyApp", "Security")
End If
Option D
C# 
EventLog.LogNameFromSourceName("MyApp", "Application");
Visual Basic
EventLog.LogNameFromSourceName("MyApp", "Application")

No comments:

Post a Comment