in

Avoiding LocalSqlServer Conn String

Last post 05-11-2008 6:07 PM by ranomore. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-08-2008 11:49 AM

    Avoiding LocalSqlServer Conn String

    Hello,

    I use apsnet built in database for user and roles management and authentication.
    but I would like to use a single connection string. it is posible? does anybody have a clue how to do that?

    my current cs is: 

      <connectionStrings>
        <clear/>
        <add name="LocalSqlServer" connectionString="Data Source=Server1\SQLEXPRESS; Initial Catalog=dbname; User ID=aaa;Password=bbb;"  />
        <add name="MicroCommerce" connectionString="Data Source=Server1\SQLEXPRESS; Initial Catalog=dbname; User ID=aaa;Password=bbb;"
             providerName="System.Data.SqlClient" />
      </connectionStrings>

    and this what i want to use

      <connectionStrings>
        <clear/>
        <add name="ZCommerce" connectionString="Data Source=Server1\SQLEXPRESS; Initial Catalog=dbname; User ID=aaa;Password=bbb;"
             providerName="System.Data.SqlClient" />
      </connectionStrings>

    i got an an errors when i accessing the aspnet config, when i use the a single cs.

    just a single con string name. is it posible?

    regards,

    md5.

  • 05-08-2008 9:33 PM In reply to

    Re: Avoiding LocalSqlServer Conn String

    It should be possible but you have to make sure that all reference to the old connection strings are changed to the new one

    (check the Web.Config and maybe some cs files)

    If I am I because I am I, and You are You because You are You, then I am I, and you are you. But If I am I because You are You, and You are You because I am I, then I am not I and You are not You. -Rabbi of Kotzk
  • 05-11-2008 6:07 PM In reply to

    • ranomore
    • Top 10 Contributor
    • Joined on 11-05-2007
    • Salt Lake City
    • Posts 161
    • Moderator

    Re: Avoiding LocalSqlServer Conn String

    also you will need to put the tables, views, and stored procedures from the aspnetdb into your db. .NET comes with a tool to do this: http://aspnet.4guysfromrolla.com/articles/040506-1.aspx.

Page 1 of 1 (3 items)