70-513 WCF Development with Microsoft .NET Framework 4 Exam Set 4

There is a ASP.NET MVC 2 Web Application named abcApp.

abcGuideApp includes a controller class.

The definition of this class is displayed in the class exhibit.

The @Page directive exhibit displays the page directive of a page Index.aspx which is

stored in the Views folder of abcApp.

You use google chrome to test abcApp. The error exhibit shows the error that is

returned when the Index method is invoked.

How can this problem be resolved?


Options are :

  • Move the Employee.aspx file to the Employee map
  • A & B (Correct)
  • Move the Index.aspx file to the Employee map.
  • Make a map named Employee inside the Views folder.

Answer : A & B


There is a ASP.NET MVC 2 Web Application named abcApp.

abcApp has multiple folders.

The folder Views/Shared/DisplayTemplates folder includes a file PassGuideH.ascx.

PassGuideH.ascx do specialized integer formatting.

There is a folder Models folder that contains an Employ class.

The definition of the Employ class is displayed in the exhibit.

Whenever a view, with a model type of Employ, in abcApp is using the HtmlHelper.DisplayForModel method on CurrentValue values the custom formatting need

to be applied.

How can you ensure this?


Options are :

  • Change the CurrentValue property by adding the attribute .
  • Put the PassGuideH.ascx in the Views/Employ/DisplayTemplates folder
  • Change the CurrentValue property by adding the attribute [Update(Name="CurrentValue", ShortName="PassGuideH")]
  • Change the CurrentValue property by adding the attribute . (Correct)

Answer : Change the CurrentValue property by adding the attribute .

You are creating a Windows application by using the .NET Framework 3.5.

The application stores customer details in a database within the corporate network. The application has a

form that contains a TextBox control to capture the customer name.

The auto-complete feature must be used in the TextBox control to display the customer names entered

since the application started.

You need to ensure that the application meets the following requirements:

It is available in the offline mode.

It provides the fastest response time for the auto-complete feature.

What should you do?


Options are :

  • Implement one-level caching by caching all customer records within a Microsoft SQL Server 2008 Express Edition database.
  • Implement two-level caching. First, cache all customer records within a Microsoft SQL Server 2008 Compact Edition database. Then, cache the customer names entered in the TextBox control within a List object in the application. (Correct)
  • Implement one-level caching by caching all customer records within a DataSet object in the application.
  • Implement two-level caching. First, cache all customer records within a DataSet object in the application. Then, cache the customer names entered in the TextBox control to a Microsoft SQL Server 2008 Compact Edition database

Answer : Implement two-level caching. First, cache all customer records within a Microsoft SQL Server 2008 Compact Edition database. Then, cache the customer names entered in the TextBox control within a List object in the application.

70-513 WCF Development with Microsoft .NET Framework 4 Exam Set 3


There is a WCF service library PassGuideWCF.

A related code file is displayed in the exhibit.

PassGuideWCF is built and the assembly is deployed to an IIS application.

The GetBestEvaluation method must be called from JavaScript.

How can this be achieved?


Options are :

  • All of the above (Correct)
  • Add code..
  • .. Service.svc
  • <%@ ServiceHost Service="PassGuideWCF.PGService" Factory="System.ServiceModel.Activation.WebScriptServiceHostFactory" %> to file…

Answer : All of the above

You create a Windows application by using the .NET Framework 3.5.

You create a Windows user control in the application.

The application contains the following code segment. (Line numbers are included for reference only.)

01 public struct FullName

02 {

03 public string FirstName { get; set; }

04 public string LastName { get; set; }

05 }

The user control has a property named UserName of the FullName type. You add the user control to a

Windows form.

During the design phase, the UserName property must be allowed to update the FirstName and

LastName properties as comma-delimited values in the property window.

You need to ensure that the properties in the FullName structure are represented as string values.

What should you do?


Options are :

  • Override the ToString method for the FullName structure
  • Implement the IConvertible interface for the FullName structure.
  • Implement the IFormattable interface for the FullName structure
  • Create a TypeConverter class for the FullName structure. (Correct)

Answer : Create a TypeConverter class for the FullName structure.

You create a Windows application by using the .NET Framework 3.5.

The application uses a Microsoft SQL Server 2008 database.

You discover that the application is non-responsive and performs slowly at certain times during the day.

Twenty-five additional users are added to the application to meet a deadline.

You need to ensure that all users experience a consistent level of high application performance

throughout the day. You want to achieve this goal by using minimum development effort.

Which two actions should you perform?


Options are :

  • Create a Test Harness application to test the performance of remoting proxies. Change the remoting proxies to use the TcpChannel class instead of the HttpChannel class.
  • Use the SQL Server Profiler tool to identify functions that call stored procedures in the database. Divide these functions into multiple queries.
  • Use the CommandBehavior.CloseConnection option and the DataReader objects.
  • A & B (Correct)

Answer : A & B

70-513 WCF Development with Microsoft .NET Framework 4 Exam Set 4

You create a Windows application by using the .NET Framework 3.5.

You plan to use ClickOnce deployment.

The application will run in a partial trust environment.

You need to store user preferences for the application.

What should you do?


Options are :

  • Save data to isolated storage (Correct)
  • Save data to a network file share
  • Save data to the Windows Temporary Files folder
  • Save data to the application folder

Answer : Save data to isolated storage

There is a ASP.NET MVC 2 Web Application named PassGuideApp.

PassGuideApp has multiple folders.

The folder Views/Shared/DisplayTemplates folder includes a file PassGuideH.ascx.

PassGuideH.ascx do specialized integer formatting.

There is a folder Models folder that contains an Employ class.

The definition of the Employ class is displayed in the exhibit.

Whenever a view, with a model type of Employ, in PassGuideApp is using the

HtmlHelper.DisplayForModel method on CurrentValue values the custom formatting need

to be applied.

How can you ensure this?


Options are :

  • Change the CurrentValue property by adding the attribute [Update(Name="CurrentValue", ShortName="PassGuideH")]
  • Change the CurrentValue property by adding the attribute . (Correct)
  • Change the CurrentValue property by adding the attribute [Display(Name="CurrentValue", ShortName="PassGuideH")]
  • Change the CurrentValue property by adding the attribute

Answer : Change the CurrentValue property by adding the attribute .

There is an ASP.NET application named PassGuideApp.

PassGuideApp is utilizing a out-of-proc mode session state.

How can you add one attribute to the Vehicle Class, displayed in the code exhibit, to make

sure you can save an instance to session state.

What would be the preferred attribute?


Options are :

  • Digitized
  • Parallel
  • Serializable (Correct)
  • Bindable

Answer : Serializable

70-513 WCF Development with Microsoft .NET Framework 4 Exam Set 5

There is an ASP.NET Web site PassGuideWS.

There is an ASP.NET page PassGuidePage.

PassGuidePage has a text control.

If a user enter JavaScript code into the text box of PassGuidePage the code will be run.

This code should not be allowed to run.

If can this be achieved?


Options are :

  • In @Page directive…
  • All of the above (Correct)
  • ..set attribute ValidateRequest
  • ..to true.

Answer : All of the above

You are creating a Windows application to manage customer relationships by using the .NET

Framework 3.5.

Users of the application access a form named FrmMain to view a list of contacts. When the user

double-clicks the contact, the item details for the contact can be viewed on another form named

FrmDetails.

You need to ensure that the application meets the following requirements:

A user can compare the details of multiple customers simultaneously.

A user can rearrange all the open instances of the FrmDetails forms as a cascade or a tile in the FrmMain

form.

What should you do?


Options are :

  • Set the IsMdiContainer property of the FrmMain form to True. Set the MdiParent property of the FrmDetails form to FrmMain. (Correct)
  • Set the IsMdiContainer property of the FrmDetails form to True. Set the MdiParent property of FrmMain to FrmDetails.
  • Create a new instance of the FrmDetails form for each contact. Call the Show method. Set the TopMost property of FrmMain to True.
  • Create a new instance of the FrmDetails form for each contact. Call the ShowDialog method. Set the TopMost property of FrmMain to False.

Answer : Set the IsMdiContainer property of the FrmMain form to True. Set the MdiParent property of the FrmDetails form to FrmMain.

70-513 WCF Development with Microsoft .NET Framework 4 Exam Set 4

You are creating a Windows application by using the .NET Framework 3.5.

The application uses a Web Service to allow managers to retrieve employee performance data.

The application allows managers to access and modify data offline. The employee performance data is

sensitive and must be protected.

You need to implement an offline storage strategy.

What should you do?


Options are :

  • Save a local XML file that contains the data for the employees selected in the home directory of the application.
  • Use the System.Security.Cryptography.TripleDESCryptoServiceProvider to encrypt a local XML file that contains only the data for the employees selected (Correct)
  • Save a local XML file that contains the data for the employees selected in Isolated Storage
  • Use the System.Security.Cryptography.MD5CryptoServiceProvider to encrypt a local XML file that contains only the data for the employees selected.

Answer : Use the System.Security.Cryptography.TripleDESCryptoServiceProvider to encrypt a local XML file that contains only the data for the employees selected

You create a Windows application by using the .NET Framework 3.5.

You plan to design the deployment of an application.

The requirement specifies that DLL files must be added to the global assembly cache (GAC) as part of the

deployment process.

You need to use the appropriate deployment technique to meet the requirement.

What should you do?


Options are :

  • Use the ClickOnce installation method and allow the users to install the application.
  • Use Microsoft Windows Installer packages for deployment. (Correct)
  • Use the ClickOnce installation method and request the administrator to install the application.
  • Use the MS-DOS XCOPY command for deployment.

Answer : Use Microsoft Windows Installer packages for deployment.

You are creating a Windows application by using the .NET Framework 3.5.

You create an installer package that deploys the following elements:

The PageLayout.exe tool

The ImageImporter.exe tool

A shared DLL named Graphics.dll

Resource files

You use the NGen Windows service and write the script package commands in the following manner.

(Line numbers are included for reference only.)

01 ngen queue pause

03 ngen executequeueditems 1

04 ngen queue continue

You need to ensure that the following installation requirements are met:

The just-in-time (JIT) compilation of the PageLayout.exe tool is completed during installation.

The Graphics.dll file is installed to the global assembly cache.

The script package commands are placed in a sequence for precompilation of the ImageImporter.exe tool

after installation.

Conflicts between the installer package and the NGen Windows service are avoided during installation.

The script package commands are arranged in the sequence of their execution.

Which set of commands should you insert at line 02?


Options are :

  • gacutil /i Graphics.dll ngen install PageLayout.exe /queue:1 ngen install ImageImporter.exe /queue:2 ngen update /queue (Correct)
  • gacutil /u Graphics.dll ngen install ImageImporter.exe /queue:1 ngen install PageLayout.exe /queue:2 ngen update /queue
  • gacutil /i Graphics.dll ngen install ImageImporter.exe /queue:1 ngen install PageLayout.exe /queue:2 ngen update /queue
  • gacutil /u Graphics.dll ngen install PageLayout.exe /queue:1 ngen install ImageImporter.exe /queue:2 ngen update /queue

Answer : gacutil /i Graphics.dll ngen install PageLayout.exe /queue:1 ngen install ImageImporter.exe /queue:2 ngen update /queue

70-513 WCF Development with Microsoft .NET Framework 4 Exam Set 5

You are creating a Windows application by using the .NET Framework 3.5.

You can use data manipulation operations on the entities stored in a database. You are designing a data

access layer for the application.

The database schema can change.

You need to ensure that the application is minimally affected by the changes made to the database

schema.

What should you do?


Options are :

  • Use stored procedures to perform data manipulation on the entities (Correct)
  • Use the DataReader and Command objects to perform data manipulation on the entities.
  • Use parameterized command objects to perform data manipulation on the entities.
  • Use the DataAdapter and typed DataSet objects to perform data manipulation on the entities.

Answer : Use stored procedures to perform data manipulation on the entities

You are creating a Windows application by using the .NET Framework 3.5.

The application will be used to manage records of patients at the hospital. Each application form contains

a TreeView control that displays a hierarchical list of patients. Items from the TreeView controls can be

dragged to other controls on the form. Each form has a different layout.

You discover that items from the TreeView controls of 10 forms cannot be dragged to other forms.

You need to ensure that the TreeView controls across all forms in the application function appropriately.

You want to achieve this goal by using minimum development effort.

What should you do?


Options are :

  • Create a static class that contains a single method to create and return a TreeView control. Modify each form in the application to call the method. Add the TreeView control that is returned by the method to the controls collection of the forms.
  • Use the Singleton pattern to create a class that contains all events to be raised by each TreeView control in the application. Modify each application form to subscribe to the events on the Singleton class instead of the TreeView controls. Set the TreeView controls to use the Singleton class to raise events.
  • Create a user control that contains the TreeView control. Replace the TreeView control on each form in the application with the TreeView user control. (Correct)
  • Create a single base form that inherits the System.Windows.Forms.Form class. Add a TreeView control to the base form. Modify each form in the application to inherit the base form.

Answer : Create a user control that contains the TreeView control. Replace the TreeView control on each form in the application with the TreeView user control.

You create a Windows Forms application by using the .NET Framework 3.5.

The application has a data entry form that includes the following controls:

A Label control docked to the bottom of the form to provide status details

A TextBox control docked to the top of the form to provide search functionality

You plan to design 10 additional Windows forms that have the same search functionality and status label.

The background color and the font size of the Label control for different forms will be different.

You need to ensure that the functionality is shared between forms by using minimum development effort.

What should you do?


Options are :

  • Create a base form that has the Label and TextBox controls. Set the Modifiers property of the Label control to protected. Set the Modifiers property of the TextBox control to private. Inherit all the forms from the base form.
  • Create a base form that has the Label and TextBox controls. Set the Modifiers property of the Label control to private. Set the Modifiers property of the TextBox control to protected. Inherit all the forms from the base form.
  • Create a composite UserControl control that contains the Label and TextBox controls. Set the Modifiers property of the Label control to protected. Set the Modifiers property of the TextBox control to private. Add the UserControl control to all the forms.
  • Create a composite UserControl control that contains the Label and TextBox controls. Set the Modifiers property of the Label control to private. Set the Modifiers property of the TextBox control to protected. Add the UserControl control to all the forms. (Correct)

Answer : Create a composite UserControl control that contains the Label and TextBox controls. Set the Modifiers property of the Label control to private. Set the Modifiers property of the TextBox control to protected. Add the UserControl control to all the forms.

70-513 WCF Development with Microsoft .NET Framework 4 Exam Set 2

You are creating a Windows application by using the .NET Framework 3.5.

The application has the following specifications:

It uses a centralized Microsoft SQL Server 2008 database instance.

It is deployed to several computers within the network.

It retrieves and updates the records of the Customer table.

A customer record can exist on multiple forms within the application. Users log on to the application by

using their unique user ID. You implement optimistic concurrency on the Customer table.

You need to design a strategy to detect conflicts by using minimum amount of network bandwidth.

What should you do?


Options are :

  • Detect conflicts by using all the columns of the Customer table.
  • Create a column to save a GUID to the Customer table. Then, detect conflicts by using the GUID (Correct)
  • Detect conflicts by using the primary key column of the Customer table.
  • Create a new column to save the user ID in the Customer table. Then, detect conflicts by using the user ID.

Answer : Create a column to save a GUID to the Customer table. Then, detect conflicts by using the GUID

You are creating a Windows application by using the .NET Framework 3.5.

An existing application uses functionality provided by an unmanaged dynamic-link library (DLL) to validate

user inputs. The application contains a wrapper class that uses Platform Invoke to access the required

DLL functions.

The application has the following deployment and security requirements:

ClickOnce deployment is used to publish the application to an Internet Web site.

The application is available online only.

The application does not require protected storage.

Users can access the application without requiring the elevated permission.

You need to ensure that the deployment and security requirements are met without affecting the

application validation performance.

What should you do?


Options are :

  • Eliminate the wrapper class and migrate the code in the DLL to managed code. (Correct)
  • Sign the ClickOnce manifest by using a valid Authenticode certificate.
  • Apply the SuppressUnmanagedCodeSecurityAttribute attribute to the wrapper class
  • Apply the AllowPartiallyTrustedCallersAttribute attribute to the assembly that contains the wrapper class.

Answer : Eliminate the wrapper class and migrate the code in the DLL to managed code.

You are creating a Windows application by using the .NET Framework 3.5.

The application stores data in a Microsoft SQL Server 2008 database.

You discover the following performance issues:

The application takes a long time to respond.

The application consumes over 900 MB of RAM.

You need to ascertain the reason for the poor performance of the application.

What should you do?


Options are :

  • Capture information about execution of the application by using the Trace.Write method to identify the objects that cause performance issues.
  • Add the debugger display attribute to the functions that access the SQL Server 2008 database. Set a breakpoint in the application to step through the code.
  • Use the .NET CLR Profiler tool to identify the objects that cause performance issues. (Correct)
  • Use the Performance Monitor tool and add the appropriate performance counters to the .NET CLR Memory performance object.

Answer : Use the .NET CLR Profiler tool to identify the objects that cause performance issues.

You create a Windows application by using the .NET Framework 3.5.

The application connects to a Microsoft SQL Server 2008 database table named Customer to retrieve and

display customer information.

Users of the application view and modify data from the Customers table. You plan to use a DataAdapter

object and a DataSet object to retrieve data.

You need to select an appropriate concurrency strategy that maintains data integrity and scalability.

What should you do?


Options are :

  • During updates, examine only the primary key column to update the customer details.
  • Add a time stamp column to the Customer table. During updates, examine the time stamp column to see whether data is changed. (Correct)
  • Create a SQL transaction object that has the isolation level set to Serializable. During updates, set the transaction object to the UpdateCommand command of the DataAdapter object.
  • Create a SQL transaction object that has the isolation level set to RepeatableRead. Set the transaction object to the SelectCommand command of the DataAdpater object, and then retrieve data. During updates, set the same transaction object to the UpdateCommand command of the DataAdapter object

Answer : Add a time stamp column to the Customer table. During updates, examine the time stamp column to see whether data is changed.

You are creating a Windows application by using the .NET Framework 3.5. The application will be

installed on Windows Vista client computers.

Your application will log usage information.

Users with non-administrative privileges must be able to log the information.

You need to identify a logging strategy.

Which strategy should you use?


Options are :

  • Write the log information to a file in the %windir%\system32\logfiles directory.
  • Write the log information to a file in the %LOCALAPPDATA% directory (Correct)
  • Write the log information to the system event log.
  • Add entries to a custom event log. Create the custom log if it does not exist.

Answer : Write the log information to a file in the %LOCALAPPDATA% directory

You create a windows application by using the .NET Framework 3.5. The application has a business

layer and a data access layer class library.

You create a Web UI by using ASP.NET for the application.

You discover excessive code repetition on the flow of the application between the Windows Forms UI and

the Web UI.

You need to increase code reuse between the applications.

What should you do?


Options are :

  • Create a service layer to shield the business layer and the data access layer.
  • Create a UI Process layer as a class library (Correct)
  • Compile the Windows Forms application as a class library to reference the ASP.NET Web application
  • Create a single class library for the business layer and the data access layer

Answer : Create a UI Process layer as a class library

You create a Windows application by using the .NET Framework 3.5. The application is used by the

employees and managers of a bank.

You plan to implement role-based security for the application by using the Identity and Principal features

provided by the .NET Framework 3.5.

You need to ensure that application meets the following requirements:

All users are authenticated against credentials stored in the application database.

Only the managers can access certain features in the application.

What should you do?


Options are :

  • Manage roles as group accounts in Windows, and use the GenericIdentity and WindowsPrincipal classes in the application.
  • Manage roles in the database, and use the GenericIdentity and GenericPrincipal classes in the application. (Correct)
  • Manage roles in the database, and use the WindowsIdentity and WindowsPrincipal classes in the application
  • Manage roles as group accounts in Windows, and use the WindowsIdentity and WindowsPrincipal classes in the application

Answer : Manage roles in the database, and use the GenericIdentity and GenericPrincipal classes in the application.

You are creating a Windows application by using the .NET Framework 3.5.

The application will be used by individuals with physical disabilities.

You need to ensure that the application implements accessibility guidelines for navigation.

What should you do?


Options are :

  • Provide a link to the startup screen from all the screens
  • Display the path traversed by using the breadcrumb trail navigation feature.
  • Implement navigation by using menus.
  • Implement the keyboard interface for all user interface elements. (Correct)

Answer : Implement the keyboard interface for all user interface elements.

You create a Windows application by using the .NET Framework 3.5. The application is used by

employees to submit timesheets and to generate reports.

The application must contain a Managers role and an Employees role.

You have the following security requirements:

Members of the Managers role can approve the timesheets.

Members of the Employees role can generate reports only if they are a member of the local administrators

group.

Members of the Managers role can access the application from untrusted domains.

You need to design a security model to meet the design requirements.

What should you do ?


Options are :

  • Define the Employees role as a custom role in the database and the Managers role as a local system role.
  • Define the Managers and Employees roles as local system roles
  • Define the Managers role as a custom role in the database and the Employees role as a local system role (Correct)
  • Define the Managers and Employees roles as custom roles in the database.

Answer : Define the Managers role as a custom role in the database and the Employees role as a local system role

You are creating a Windows application by using the .NET Framework 3.5.

The application is used to browse through purchase orders. The purchase order data is stored in a file on

the local computer.

The application synchronizes purchase order data with a central database by using a Web service.

You discover that other applications on the computer can access the purchase order data.

You need to ensure that the purchase order data can be accessed only by the Windows application.

What should you do?


Options are :

  • Use the RijndaelManaged class to encrypt the purchase order data. (Correct)
  • Add the PrincipalPermission class to the method that reads the purchase order data.
  • Use the ZipPackage class to store the purchase order data
  • Use the IsolatedStorageFileStream class to store the purchase order data.

Answer : Use the RijndaelManaged class to encrypt the purchase order data.

You are creating a Windows application by using the .NET Framework 3.5.

An existing ASP.NET application has the following specifications:

The application is hosted on a server named SERVER1.

Reports are built by using the Microsoft SQL Server 2008 Reporting Services (SSRS).

The reports execute on SERVER1.

User credentials are stored in a Microsoft SQL Server 2008 database.

Users can view the reports after authentication to the ASP.NET application.

The Windows application runs on a local computer. The reports that are used in the ASP.NET application

are also applicable to the Windows application users

You need to design a reporting strategy to ensure that the Windows application displays the reports by

using a MicrosoftReportViewer control.

What should you do?


Options are :

  • Set the ProcessingMode property to Remote. Set the ServerReport.ReportServerUrl property to SERVER1. Call the ServerReport.ReportServerCredentials.SetFormsCredentials method by using the appropriate credentials. (Correct)
  • Set the ProcessingMode property to Remote. Set the ServerReport.ReportServerUrl property to LOCALHOST. Call the ServerReport.SetDataSourceCredentials method by using the appropriate credentials.
  • Set the ProcessingMode property to Local. Set the ServerReport.ReportServerUrl property to LOCALHOST. Call the ServerReport.SetDataSourceCredentials method by using the appropriate credentials
  • Set the ProcessingMode property to Local. Set the ServerReport.ReportServerUrl property to SERVER1. Call the ServerReport.ReportServerCredentials.SetFormsCredentials method by using the appropriate credentials

Answer : Set the ProcessingMode property to Remote. Set the ServerReport.ReportServerUrl property to SERVER1. Call the ServerReport.ReportServerCredentials.SetFormsCredentials method by using the appropriate credentials.

You are creating a Windows application that processes sales orders by using the .NET Framework

3.5.

The application has the following specifications:

It connects to a Microsoft SQL Server 2008 database.

It retrieves data from a table named Products.

The product table has three columns named Name, Description, and Quantity. The application uses the

Name and Description columns as lookup fields. It updates the Quantity column when orders are placed.

You need to design a concurrency management strategy that meets the following requirements:

Data integrity is maintained during the update process.

Database locking for the lookup data is minimal.

What should you do?


Options are :

  • Implement optimistic concurrency on the Products table.
  • Split the Products table into two different tables named Product_Data and Product_Quantity. Ensure that the Product_Data table contains the name and description of the product. Ensure that the Product_Quantity table contains the quantity details of the product. Implement pessimistic concurrency on the Product_Data table.
  • Split the Products table into two different tables named Product_Data and Product_Quantity. Ensure that the Product_Data table contains the name and description of the product. Ensure that the Product_Quantity table contains the quantity details of the product. Implement pessimistic concurrency on the Product_Quantity table. (Correct)
  • Implement pessimistic concurrency on the Products table

Answer : Split the Products table into two different tables named Product_Data and Product_Quantity. Ensure that the Product_Data table contains the name and description of the product. Ensure that the Product_Quantity table contains the quantity details of the product. Implement pessimistic concurrency on the Product_Quantity table.

You are creating a Windows application by using the .NET Framework 3.5.

Your company has an existing ASP.NET Web application that uses a Microsoft SQL Server 2008 data

source. The application authenticates users by using the SqlRoleProvider and SqlMembershipProvider

classes.

You plan to design a strategy to authenticate users to the Windows application by using the same SQL

Server 2008 data source.

You need to implement the strategy by using minimum possible code.

What should you do?


Options are :

  • Collect the user login credentials, and authenticate the users directly against the database. Use the login credentials to construct a principal used for authentication
  • Enable client application services. Set an authentication service location and a membership service location. Authenticate the users by calling the Membership.ValidateUser method. (Correct)
  • Use the HttpWebRequest class to post form data to the login page of the Web application. Create a principal by using the cookies that are returned. Use the principal for authentication
  • Implement a custom Web service that replicates the authentication services. Authenticate the users to the Web service.

Answer : Enable client application services. Set an authentication service location and a membership service location. Authenticate the users by calling the Membership.ValidateUser method.

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions