I have uploaded my website to my webhost and it works great except the form authorication. When i try to login at get this error:
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)
When i deploy the website i publish it from Visual Studio to a local folder and then upload it to the webhost via a FTP client program. The problem here is that the App_Data folder is empty when i publish the website to my local folder. Could this be the problem?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Check if your server allows to run user instances. If it allows then you need not do anything and just upload the MDF file to the App_Data folder on the server and you’re good to go. You can also include App_data for publish which will automatically pick-up the App_Data folder along with the content.
If your server does not allow user instances then you need to perform following steps..
Ask admin to give you a SQLServer database along with access credentials.
From your Visual Studio right click on your database from the server explorer and select the option to PUBLISH TO PROVIDER. Follow the wizard steps and generate the SQL script with or without default data.
alt text http://ruchitsurati.net/myfiles/db.png
Connect to your Remote SQL Server from management studio and run the generated SQL script on the database given by your admin.
Update the connection string in your application for deployment.
Method 2
Tick the “include files from the App_data folder” checkbox when publish.
alt text http://img260.imageshack.us/img260/8891/appdatapublish.png
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0