Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I change my webconfig to point to aspnetdb on sql 2000

Status
Not open for further replies.

Sethington

Technical User
May 16, 2006
34
US
I'm a newbie at this so bare with me.

I created a login screen for a website using Visual Studio 2005 using their login tools. Our webserver is running SQL server 2000. I ran aspnet_regsql.exe and imported the database into sql server 2000.

Now I just need to change the web.config file to look for the authentications there.

Can anyone help me or point me in the right direction?

Thanks
 
just change the connection string you are using to point to the new server and DB
 
Like I said I'm a newbie at this so could be elaberate on how I change my connection to the sql 2000 database.
 
I found an example of what I need to do but I can seem to get it too work.


Here is a copy of my web.config file

As you can see i'm trying to get the authentication to look at my instance running on my laptop which is using a default instance name of MSSQLSERVER.

Any suggestions why this still isn't working or how to get this to work.

<configuration xmlns=" <appSettings/>
<connectionStrings>
<add name="MySqlProviderConnection" connectionString="server=LAPTOP\MSSQLSERVER;integrated security = true;Initial Catalog=aspnetdb"/>
</connectionStrings>
<system.web>
<authentication mode="Forms" />
<roleManager enabled="true" />
<membership defaultProvider="MySqlMembershipProvider">
<providers>
<add connectionStringName="MySqlProviderConnection" name="MySqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</membership>
<compilation debug="true"/></system.web>
</configuration>
 
What do you mean it does not work? Are you not able to connect through your code? If so, what is the code?
 
To be honest I don't have any connection calls in my page code. I thought that I could just make my connection to the database by changing my web.config file.
 
In order to connect to the database, you need to use the connection string with one of the data controls.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top