Ok, so I've tried looking all over the internet for an answer that would work for me in my situation, but have yet to find anything. I've created a website using ASP.NET with the membership provider. After creating the basic website, it works completely fine on my local computer. I can register an account, log in, delete accounts as an administrator, and do whatever I want it to do. No issues.
So I decided it was ready to deploy the application. I deployed it by first creating the membership part on the website using the aspnet_regsql. Following this, I copied over the tables I created in my database to the server. Upon going to the website, everything looks to work perfectly fine. I can view all the links and stuff without issues. When I click login and then click register to create my account, it gives me the page as expected. However, immediately after clicking "create account", the page crashes and throws the error I have pasted below. Curious on whether it even got to creating the account, I click register again and try to create the same account. It says it already exists... So I click login, try to log in with my new user, and the exact same error message comes up.
I've already verified my web.config file to match as it's supposed to. In fact, here are the two parts of the web.config file that (I believe) have to deal with the issue. Is there really something wrong with them? Note I simply filled in what's really there with what they are. For example, I didn't literally put "theserver", I put the server that the host has given me.
My connection string:
<add name="MyConnectionStringName" providerName="System.Data.SqlClient"
connectionString="Data Source=theserver;
Initial Catalog=mydatabase; Integrated Security=no;
User ID=myuserid; Password=mypassword" />
And here's the membership part:
<membership defaultProvider="MyMembershipProvider">
<providers>
<add name="MyMembershipProvider" type="System.Web.Security.SqlMembershipProvider"
connectionStringName="MyConnectionStringName"
enablePasswordRetrieval="false" enablePasswordReset="true"
requiresQuestionAndAnswer="true" requiresUniqueEmail="false"
passwordFormat="Hashed" maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10" />
</providers>
</membership>
Finally, here's the error message it keeps giving me:
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: 26 - Error Locating Server/Instance Specified)