question regarding proper setup pf the web.config file

Last post 05-03-2008 12:45 AM by jhar. 2 replies.

Sort Posts:

  • question regarding proper setup pf the web.config file

    04-17-2008, 9:17 PM
    • Member
      point Member
    • christly
    • Member since 04-15-2008, 12:01 AM
    • Florida
    • Posts 1

    I am pretty much a newbie and I am not totally familiar with the proper setup of the web.config file for the SBSK. My web host uses SQL 2000, so I found the post on this forum where someone shared the script to create the database on SQL 2000 instead of the built in SQL 2005 Express - and that seeemd to work fine. I am now trying to mody the web.config file to connect to that database properly. Here is what I have so far:

     <connectionStrings>
        <remove name="LocalSqlServer"/>
        <add name="MyConnectionString" connectionString="Data Source=[IP Address of remote sql server here],1433;
    Network Library=DBMSSOCN;Initial Catalog=(db name here);User ID=xxxxxx;Password=xxxxxxxx;"/>
      </connectionStrings>

    I blanked out the IP Address of the remote SQL server (but I have verified that I can conect to it fine), as well as the user ID, password, and database name.

    I am thinking I have something misconfigured - such as the NetworkLibrary value, or maybe it is something else. Any help from the forum is appreciated.

    -John 

     

     

     

  • Re: question regarding proper setup pf the web.config file

    04-18-2008, 1:13 AM
    • Member
      254 point Member
    • sprakashcs
    • Member since 04-11-2008, 8:49 AM
    • Chennai
    • Posts 62

     Hai friend i have read your mesage,
    to use connectionstring in web.config..
     <configuration>
        <connectionStrings>
            <add connectionString="Server=server name;Database=databasename;uid=user id;pwd=password;" name="ConStr"/>
        </connectionStrings>  
    </configuration>

    To call the connection string to our page
    SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["ConStr"].ToString());     
    I think it may useful to you..
    If still you have doubt reply me.   

    visit this link for further clarification 

     http://foraspdotnetdevelopers.blogspot.com/

  • Re: question regarding proper setup pf the web.config file

    05-03-2008, 12:45 AM
    • Member
      190 point Member
    • jhar
    • Member since 07-10-2007, 5:22 PM
    • Posts 47

    Try..

    <connectionStrings>
        <remove name="LocalSqlServer"/>
        <add name="LocalSqlServer" connectionString="Data Source=[IP Address of remote sql server here],1433;
    Network Library=DBMSSOCN;Initial Catalog=(db name here);User ID=xxxxxx;Password=xxxxxxxx;"/>
      </connectionStrings>

    Hopefully that should get you up and running

Page 1 of 1 (3 items)