Web Developer Framework 4.0 Sample Questions – 30

Question: You are adding a Windows Communication Foundation (WCF) service to an existing application. The application is configured as follows. (Line numbers are included for reference only.) 01 <configuration> 02 <system.serviceModel> 03 <services> 04 <service name=”Contoso.Sales.StockService” 05 behaviorConfiguration=”MetadataBehavior”> 06 <host> 07 <baseAddresses> 08 <add baseAddress=”http://contoso.com:8080/StockService” /> 09 </baseAddresses> 10 </host> 11 </service> 12 </services> 13 <behaviors> 14 <serviceBehaviors> 15 <behavior name=”MetadataBehavior”> 16 </behavior> 17 </serviceBehaviors> 18 </behaviors> … You need to configure the service to publish the service metadata. Which two actions should you perform (Each correct answer presents part of the solution. Choose two.) Add the following XML segment … Click here to continue…..

Web Developer Framework 4.0 Sample Questions – 29

Question: You are developing a Windows Communication Foundation (WCF) service that reads messages from a public non-transactional MSMQ queue. You need to configure the service to read messages from the failed-delivery queue. Which URI should you specify in the endpoint configuration settings of the service net.msmq://localhost/msmq$;FailedMessages net.msmq://localhost/msmq$;DeadLetter net.msmq://localhost/system$;DeadXact net.msmq://localhost/system$;DeadLetter Correct Answer: 4 Question: You are implementing an ASP.NET Web page.You need to add a text box that allows only values between 1 and 10, inclusive, to be submitted. Which two code segments should you use (Each correct answer presents part of the solution. Choose two.)

Correct … Click here to continue…..

Web Developer Framework 4.0 Sample Questions – 28

Question: You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You use Microsoft ADO.NET Entity Data Model (EDM) to model entities. You create an entity named Person with a schema defined by the following XML fragment.

You need to ensure that entities within the application are able to add properties related to the city, region, and country of Person’s address. What should you do Create a new complex type named CAddress that contains the properties for city, region, and country. Change the Type of the Address property in CPerson to “Self.CAddress”. Create a … Click here to continue…..

Web Developer Framework 4.0 Sample Questions – 27

Question: Your Windows Communication Foundation (WCF) client application uses HTTP to communicate with the service. You need to enable message logging and include all security information such as tokens and nonces in logged messages.What should you do In the application configuration file, add the logKnownPii attribute to the message logging diagnostics source and set the value of the attribute to true. Generate the ContosoService class using the Add Service Reference wizard. Add a reference to System.ServiceModel.Routing.dll. Add the following code segment.

In the application configuration file, add the following XML segment to the system.serviceModel configuration section group.

In … Click here to continue…..

Web Developer Framework 4.0 Sample Questions – 26

Question: You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server database. The application uses the following object query to load a product from the database. (Line numbers are included for reference only.) 01 using (AdventureWorksEntities advWorksContext = new AdventureWorksEntities()) 02 { 03 ObjectQuery<Product> productQuery = advWorksContext.Product.Where(“it.ProductID = 900”); 04 05 } You need to log the command that the query executes against the data source. Which code segment should you insert at line 04 Trace.WriteLine(productQuery.ToString()); Trace.WriteLine(productQuery.ToTraceString()); Trace.WriteLine(productQuery.CommandText); Trace.WriteLine(((IQueryable)productQuery).Expression); Correct Answer: 2 Question: You use Microsoft Visual … Click here to continue…..