Database Connection error SQL Server

Discussion in 'Databases' started by voteright20, Mar 9, 2008.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi All: I'm new to DASP but have successfuly moved apps and databases to other asp.net providers in the past. At any rate, I just signed up for a basic hosting plan at DASP.Uploaded all files via FTP, including my database.Used the MDF upload utility to get my database to the DASP SQL Server environment (that setup finished successfully).Then cut/pasted the connection string the console suggested into my web.config file (the only change I made wa to the password, replacing the asterisks in the string with the passwod for my account).

    Then, I realized I may need to detach the database file (.mdf) from its local SQL Server Express before uploading. So I detached it in VS2008 and reuploaded via the MDF upload tool at DASP.

    However, all attempts have yieled the same genericerror below.Hvve a missed a step?Thanks...Tom.

    THE ERROR: 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 Network Interfaces, error: 26 - Error Locating Server/Instance Specified)


    My connection string in web.config, by the way, is:
    <connectionStrings>
    <clear/><
    remove name="Movies"/>
    <add name="Movies" connectionString="Data Source=tcp:sql2k511.discountasp.net;Initial Catalog=SQL2005_471856_movies;User ID=SQL2005_471856_movies_user;Password=******;" />
    </connectionStrings>
     
  2. Try it like this:

     
  3. Thanks, Mark, for the fast reply. I just made your suggested change to the connection string on the site. Then fired up the browser but still no luck. I refreshed to be sure. No beans, though.


    In my previous experiences I didn't need to expliciitly detach the .mdf file from the local SQL Server Express befoe uploading to the provider. Apart from detaching he database file and uploading, is there some other special trick or sequence of steps involved???





    Thanks, Tom
     
  4. Can you create a simple test, outside of the methods you're currently using?
    As an example, if you've been trying to get a Starter Kit to connect, create a simple page that accesses the SQL Server.

    Reason I mention this is, there are only about a zillion different things that can cause connection errors. [​IMG]

    I'll help with whatever you need, just offering what would be my next try if this was happening to me.
     
  5. Okay, Mark. I'll do a little experimentation. Thanks for the advice.





    Tom
     
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