Database Connection Strings

Discussion in 'Databases' started by kavicarter, Nov 5, 2008.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. When I replace my local connection strings with the new one provided by discountasp.net; in the web.config file, do I replace every string I see? For instance:




    <connectionStrings>


    <add name="AdminConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=&amp;quot;C:\Users\Kavi\Documents\My Web Sites\SpaceOdyssey\App_Data\ASPNETDB.MDF&amp;quot;;Integrated Security=True;Connect Timeout=30;User Instance=True"


    providerName="System.Data.SqlClient" />


    <add name="usersConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True"


    providerName="System.Data.SqlClient" />


    </connectionStrings>


    <providers>


    <add name="CustomProfileProvider"


    type="System.Web.Profile.SqlProfileProvider"


    connectionStringName="LocalSqlServer"


    applicationName="SpaceOdyssey" />


    </providers>

    Would I replace those3 strings with the new oneprovided for me? And do I replace the entire string or do I leave some of it like the Integrated Security part, etc?
     
  2. Hi Mark,

    I took a look at the tips you gave. When I copy and pasted exactly what you said too (with my information of course) the website would load and I could browse it. However, when I went to create a user, I got an error; probably having to do with the connection.

    When I tried to keep what you said too and the connection strings from my first post, it still wouldn't work.

    I'm sorry, but I still don't understand how to update the connection strings so the database is functional.

    Thank you.
     
  3.  
  4. Yes, sorry.

    My connection string is:

    "Data Source=tcp:sql2k801.discountasp.net;Initial Catalog=SQL2008_563133_space;User ID=SQL2008_563133_space_user;Password=*;"
     
  5. Hi,
    Try it like this...Just edit your specific settings in there:
     
  6. Hi,

    I implemented your web.config file. I tried creating a user, and this is the error I'm getting:


     
  7. EDIT:

    Does it have anything to do with this part of the web.config file?


     
  8. I believe so, but all I did was attach the data file. This is my first time doing this, so I'm sure there might be something I'm missing.


    Other than attaching the data file, what else is there?
     
  9. No, this was the only Express DB I had attached with this site.

    It always seems whatever can go wrong when I'm working on something will go wrong.

    Thanks for your help.
     
  10. Ahhh, i figured it out, I had the wrong password in there.

    Thanks again for your help!
     
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