Click here to Skip to main content
15,917,538 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

I am trying to use Asp.Net website configuration tool.I am getting this error in
Provider Management ::

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.  

I used the aspnet_regsql command-line utility to create and configure the database.The web.config file looks like this::
  <remove name="TestConnectionString"/>
  <remove name="JConnectionString"/>
  <add name="TestConnectionString" connectionString="Data Source=CE;Failover;Initial Catalog=PhoneBillDev;Integrated Security=True" providerName="System.Data.SqlClient"/>
  <add name="JConnectionString" connectionString="Data;Initial Catalog=DCEOnlinePayment; User ID=dceSQLCCD; Password=Dce0nlineP2012" providerName="System.Data.SqlClient"/>
  <add key="ConnectionString" value="Server=CE;Failover;Database=PhoneBillDev;uid=SQLReportUser;pwd=Mon321Key678"/>

How to fix this issue?Can anyone help regarding this?

[Edit]Code blocks added[/Edit]
Updated 22-Apr-13 7:16am
ZurdoDev 22-Apr-13 15:19pm    
It says it cannot connect to the database.
priya9826 22-Apr-13 15:28pm    
How to connect to database?
ZurdoDev 22-Apr-13 15:30pm    
That's what the connection string is "connectionString="Data Source=CE;Failover;Initial Catalog=PhoneBillDev;Integrated Security=True" You have to supply the way to connect to it.
priya9826 22-Apr-13 15:31pm    
WhenI run the aspnet_regSql command utility ,it creates the <add key="ConnectionString" value="Server=CE;Failover;Database=PhoneBillDev;uid=SQLReportUser;pwd=Mon321Key678">
in web.config file.Is that means does it connected to database or not?
It aso cretaes the asp.Net tables in my custom database.
priya9826 22-Apr-13 15:37pm    
I am sure about the server name,credentials to connect to the database.But I dont the reason why it is failing in the aspnet reg sql utility..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900