PrepAway - Latest Free Exam Questions & Answers

Which two additional actions should you perform?

You create a Web Form. The Web Form allows users to log on to a Web site. You implement the login logic using a Login control named Login1. The membership data for the application is stored in a SQL Express database in the App_Data directory. You need to configure your application so that the membership data is stored in a local Microsoft SQL Server database.
You add the following code segment to the Web.config file.

connectionStringName="MySqlProviderConnection"/>

Which two additional actions should you perform?
(Each correct answer presents part of the solution. Choose two.)

PrepAway - Latest Free Exam Questions & Answers

A.
Use Aspnet_regsql.exe to create the Microsoft SQL Server database.

B.
Set Login1’s MembershipProvider property to MySqlProviderConnection.

C.
Add the following code segment to the Web.config file.
<add name="MySqlProviderConnection" connectionString="valid connection string"/>

D.
Add the following code segment to the Web.config file.
<add key="MySqlProviderConnection" value="valid connection string" />

E.
In the ASP.NET configuration settings within IIS, ensure that Role Management Enabled is selected.

F.
Use the Web Site Administration Tool to select AspNetSqlMembershipProvider as the membership provider for your application.

Explanation:

Answer A is correct because you need to setup you own SQL Server database to store membership details.
Answer B would be incorrect because if anything the MembershipProvider property of the Login Control requires the provider name "MySQLProvider" not "MySQLProviderConnection". Secondly, there is no need to specify the MembershipProvider property because in the web.config file "MySQLProvider" is set to be the default provider.


Leave a Reply