simple deployment question

Discussion in 'Databases' started by lexius, Feb 7, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi,
    I am deploying a a visual studio web developer project 2008 with sql server 2008, that has a database with it.

    The database in my project is in the App_Data folder, when I uploaded the site files I included the App_Data folder, and attached the database file in the using the control panel on the site.

    the site files seem to be ok, i can get to the logon screen, but when it tries to connect to the database i get nasty errors

    '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)'


    I am using asp membership provider which was set up on my local SQL server 2008 express database, might the problem due to the server not being express but my DB set up (and in the web config as using express).

    I have probably missed something very basic, this is my first time deploying, I am very grateful for any help.

    Post Edited (Alexis) : 2/7/2009 3:39:20 PM GMT
     
  2. JorgeR

    JorgeR DiscountASP.NET Staff

    try adding the line in your connection string:
    <connectionStrings>
    <remove name='LocalSqlServer' />
    <add name='LocalSqlServer' connectionString='Data Source=DBServerName;Integrated Security=false;Initial Catalog=DBName;User ID=DBLogin;Password=DBPassword' providerName='System.Data.SqlClient' />
    </connectionStrings>


    junior

    DiscountASP.NET

    www.DiscountASP.NET
     
  3. 1. Do i need to change web.config when uploading it from my localhost? Can all settings be the same?


    2. Can I use the same connection string for my uploaded database,independently ofwhere my application resides, either on your webhost or mylocal computer.
     
  4. JorgeR

    JorgeR DiscountASP.NET Staff

    Yes, you should be able to use the same connection string locally and on the servers.


    junior

    DiscountASP.NET

    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page