Link to home
Start Free TrialLog in
Avatar of Atouray
Atouray

asked on

Configuring sqlmembership provider

I am building webform application  using VS2012EXPRESS. I want to implent the sqlmembership for this. I installed all the necessary objects on my db server.
when i try test the connect by going to Project ,ASP.NET Configuration,provider tab.
Click on test i receive this error:
Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.
What is the cause? i have attached my webconfig
CONFIG.txt
Avatar of Daniel Van Der Werken
Daniel Van Der Werken
Flag of United States of America image

I don't think your connection string in the web.config is correct. All you have is:
connectionStringName="db_connection"

You need something that defines the connection more definitively:

http://www.connectionstrings.com/sql-server-2005

http://www.connectionstrings.com/sql-server-2012

i.e.
Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;

etc. Review the link I provided to see how this is done.
Avatar of Atouray
Atouray

ASKER

i definately have a correct connection string. here is it:
 <connectionStrings>
    <clear/>
    <add name="db_connection" providerName="System.Data.SqlClient" connectionString="Data Source=myipaddresshere;Integrated Security=true;Initial Catalog=aspnetdb;User ID=sysad;Password=abc@123"/>
  </connectionStrings>
Avatar of Atouray

ASKER

i have provided a connection name for my connectionstring.This is a valid one.
ASKER CERTIFIED SOLUTION
Avatar of Daniel Van Der Werken
Daniel Van Der Werken
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Atouray

ASKER

thank you