I have ran into an issue with this error. Here is the rest of the StackTrace (the first line of it, let me know if I need to provide the complete StackTrace )..
[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid)]
I can connect to the database through SSMS, but when I go to the site to register I get the error that I mentioned. A brief run down of what I created. Its an Web application from the template in VS2013. I took the database that it created with the following tables..
and I added a couple of tables of my own. Everything worked fine off of my laptop before publishing the website. GoDaddy is unsure of what is causing the issue and are looking into it. They ran tests and can connect to the database. But when you go to register on the website, its throwing that error.
I have doubled checked and rechecked my connection string, its the same one that I use to connect to the database through SSMS.
Here is my connection string, minus the username and password, datasource etc...
<add name="DefaultConnection" connectionString="Data Source=**********;Initial Catalog=******;Persist Security Info=True;User ID=*******;Password=*******" providerName="System.Data.SqlClient" />
I know the error says invalid connectionstring, but I was told that it was correct.
Any idea's?
UPDATE I did some digging around about deploying a membership database and found that when I generated scripts that I should have generated schema and data. So I went and removed the current tables and scripted out my local database(the one that works) and generated the schema and data. Then I ran it against the database, double checked that I had data in the database, which I know do. But when I went to register, I got the exact same error.