Microsoft TS: Windows Communication Foundation velopment with Microsoft .NET Framework 4 Sample Questions:
1. You are developing a data contract for a Windows Communication Foundation (WCF) service.
The data in the data contract must participate in round trips. Strict schema validity is not required.
You need to ensure that the contract is forward-compatible and allows new data members to be added to it.
Which interface should you implement in the data contract class?
A) IExtensibleDataObject
B) IExtension<T>
C) ICommunicationObject
D) IExtensibleObject<T>
2. You are developing a Windows Communication Foundation (WCF) client application. The client application contains the following code.
The configuration file contains the following lines.
You need to ensure that the service is consumed.
Which code segment should you use?
A) Dim client As SocialClienc = New SocialClienc("POST") client.Endpoint.Behaviors.Add( New WebHttpBehavior())
B) Dim client As SocialClient = New SocialClient("SocialClient") client.Endpoint.Behaviors.Add( New WebHttpBehavior())
C) Dim client As SocialClient = New SocialClient("SocialClient") client.Endpoint.Behaviors.Add( New WebScriptEnablingBehavlor())
D) Dim client As SocialClient = New SocialClient("POST") client.Endpoint.Behaviors.Add( New WebScriptEnablingBehovior())
3. You are developing a windows Communication Foundation (WCF) service that will be hosted in Microsoft Intemnet Information Services (IIS) 7.0.
The service must be hosted in an lIs application named Info. You need to enable this senvice to be hosted in llS by changing the web.config file
Which XML segment should you add to the web.config file?
A) Option D
B) Option B
C) Option C
D) Option A
4. You have a Windows Communication Foundation (WCF) service.
The service has issues with performance when it receives messages on a specific endpoint. The service must collect the minimum number of performance counters to diagnose the message issues.
You need to configure the service.
In the web.config file for the service, what should you do?
A) Enable message logging for the endpoint.
B) In the service configuration diagnostics section, set the value of the performanceCounters property to ServiceOnly.
C) Enable the Windows Management Instrumentation (WMI) provider.
D) In the service configuration diagnostics section, set the value of the performancCounters property to All.
5. You develop an ASP.NET web application that is hosted in the virtual directory named SecureApp. The web application uses the ASP.NET membership provider.
The application pool for the website uses the dedicated domain account named MyDomain\WebServiceAccount. The web.config file contains the connectionStrings element.
You need to secure the connectionStrings element for the web application.
Which of the following two commands must you run at a command prompt? (Each correct answer presents part of the solution. Choose two.)
A) aspnet_regiis -pe "connectionStrings" -app "MyDomain\WebServiceAccount"
B) aspnet_regiis -pe "connectionStrings" -app "/SecureApp"
C) aspnet_regsql -pa "NetFrameworkConfigurationKey" "MyDomain\WebServiceAccount"
D) aspnet_regiis -pa "NetFrameworkConfigurationKey" "MyDomain\WebServiceAccount"
Solutions:
| Question # 1 Answer: A | Question # 2 Answer: B | Question # 3 Answer: B | Question # 4 Answer: D | Question # 5 Answer: B,D |

We're so confident of our products that we provide no hassle product exchange.


By Merle


