Hi, I'm relatively new to ASP.NET, and I've created a simple ASP.NET
website hosting using Microsoft Visual Web Developer 2008 Express Edition.
The
website hosting has one .aspx page, on this page, it has a SqlDataSource control that retrieves data from a Microsoft SQL Server 2005 Express database (a simple database with one table).
I then display that retrieved data using a GridView or DetailsView control (it doesnt matter).
The
website hosting work when I test it locally in MS VWD 2008, but when I upload it online and view the page, I receive this error:
Quote:
Server Error in '/' Application.
--------------------------------------------------------------------------------
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Server Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Server Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
|
So I asked for help in LivePerson chat, and the person told me that they do not support "attached database" and that I would have to "create a database from Plesk and the create a backup (.BAK) file of my database and upload it", he also mentioned something about giving me a connectionString? So now Im really confused.
Can someone please help me and explain why can't I just upload the database and connect it in the normal way? and what I need to do exactly?
Is it as simple as just creating a .BAK file? What happens behind the scene? Do you guys copy the backed up database and transfer all the table to the database I created in Plesk? Do you transfer the data for us? How does it work?
Code:
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
Thats my connection string in the web.config file, is that correct? or do I need to change it?
I've looked for threads on this forum but it seems none of them addresses my question.
I hope someone from eUKHost can kindly help me and give me a brief explanation please.
Thank you so much!
Will
