Is the LocalSqlServer connection string name required?

How to configure connection string for Asp.Net membership provider? Do I need to write it manually or is any tool available in Visual Studio, where can I specify the connection string, as well as the algorithm used to store the password?

I read one article and sets this connection string: -

<configuration> <connectionStrings> <remove name="LocalSqlServer"/> <add name="LocalSqlServer" connectionString="Data Source=localhost;Initial Catalog=appservicesdb;Integrated Security=True" providerName="System.Data.SqlClient"/> </connectionStrings> </configuration> 

This LocalSqlServer name LocalSqlServer not seem too intuitive. How to change this?

Thank you in advance:)

+4
source share
1 answer

It refers either from the <membership> configuration section

 <membership defaultProvider="SqlMembershipProvider" > <providers> <clear/> <add name="MySqlMembershipProvider" connectionStringName="LocalSQLServer" applicationName="MyAppName" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </providers> </membership> 

or from the place where you initialize the SqlMembershipProvider in your code.

As far as I can see, there is no default - you (or the code you copied) should have named it that way.

+8
source

All Articles