Microsoft UPG:Transition MCPD.NET Frmwrk 3.5 Web Dev to 4 Web Dev Sample Questions:
1. You are designing an ASP.NET Web application for content management.
You have the following requirements:
*Support multiple languages.
*Support dynamic changes to site content.
*Provide the ability to add content to the site without making changes to files within the application directory.
You need to recommend the application's source for retrieving content.
Which source should you recommend?
A) a database based on CurrentUICulture
B) local resources based on CurrentCulture
C) a master page based on CurrentUICulture
D) global resources based on CurrentCulture
2. Four Windows Communication Foundation (WCF) services are hosted in Microsoft Internet Information
Services (IIS). No behavior configuration exists in the web.config file.
You need to configure the application so that every service and endpoint limits the number of concurrent
calls to 50 and the number of concurrent sessions to 25.
Which XML segment should you add to the system.serviceModel configuration section of the web.config
file?
A) <behaviors> <serviceBehaviors> <behavior name="ALL"> <serviceThrottling maxConcurrentCalls="50" maxConcurrentSessions="25"/> </behavior>
</serviceBehaviors>
</behaviors>
B) <behaviors> <serviceBehaviors> <behavior name="default"> <serviceThrottling maxConcurrentCalls="50" maxConcurrentSessions="25"/> </behavior>
</serviceBehaviors>
</behaviors>
C) <behaviors> <serviceBehaviors> <behavior name="*"> <serviceThrottling maxConcurrentCalls="50" maxConcurrentSessions="25"/> </behavior>
</serviceBehaviors>
</behaviors>
D) <behaviors> <serviceBehaviors> <behavior name=""> <serviceThrottling maxConcurrentCalls="50" maxConcurrentSessions="25"/> </behavior>
</serviceBehaviors>
</behaviors>
3. You create an ASP.NET page named TestPage.aspx that contains validation controls. You need to verify that all input values submitted by the user have been validated by testing the Page.IsValid property. Which page event should add an event handler to?
A) Load
B) PreInit
C) PreLoad
D) Init
4. 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.)
A) <asp:TextBox ID="txt1" runat="server" onChange="validate_value(this, args)" />
B) <script type="text/javascript"> function validate_value(obj, args) { args.IsValid = (args.Value >= 1 && args.Value <= 10); } </script>
C) <asp:TextBox ID="txt1" runat="server" /> <asp:CustomValidator ID="val1" runat="server" ControlToValidate="txt1" ClientValidationFunction="validate_value" ErrorMessage="Value invalid" />
D) <script type="text/javascript"> function validate_value(obj, args) { return (args.Value >= 1 && args.Value <= 10); } </script>
5. You use Microsoft Visual Studio 2010 and Microsoft ADO.NET Framework 4 to create an application. The application connects to a Microsoft SQL Server 2008 database. You use the ADO.NET LINQ to SQL model to retrieve data from the database. You use stored procedures to return multiple result sets. You need to ensure that the result sets are returned as strongly typed values. What should you do?
A) Apply the FunctionAttribute and ResultTypeAttribute to the stored procedure function. Use the GetResult <TElement> method to obtain an enumerator of the correct type.
B) Apply the ParameterAttribute to the stored procedure function. Use the GetResult <TElement> method to obtain an enumerator of the correct type.
C) Apply the FunctionAttribute and ParameterAttribute to the stored procedure function and directly access the strongly typed object from the results collection.
D) Apply the ResultTypeAttribute to the stored procedure function and directly access the strongly typed object from the results collection.
Solutions:
| Question # 1 Answer: A | Question # 2 Answer: D | Question # 3 Answer: A | Question # 4 Answer: B,C | Question # 5 Answer: A |

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


By Shirley


