Solved

How can I change the default database connection for membership?

Posted on 2008-10-12
3
271 Views
Last Modified: 2013-11-07
I have set up a website with membership login which works fine locally, though when hosted, the database has changed location and name. How can I change settings so the login control and the create user control will reference this new database configuration instead of looking for old database. The database itself is exactly the same; it has been created from the .BAK file from old DB.

Cheers.
0
Comment
Question by:finnatic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 11

Expert Comment

by:Anurag Agarwal
ID: 22700384
In the web.config of your website search for the tag like

<connectionStrings>
  <add name="ADConnectionString"
   connectionString="server=MyServer,database=mydatabase,integrated security=true;" />
</connectionStrings>

In this change the name of server only as you said that database name & other settings are same. Then try

Anurag
0
 

Author Comment

by:finnatic
ID: 22700487
Not quite what I need I think... The connection string you show there is not used by the login or create user controls. These controls set their own connections to a database that they create. I have other controls that access the same database via the connection string in the web.config. This I have updated and the controls connect fine, but the login still creates error as below

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

I think it must be because the control is still looking for the original database. I need to change the provider within configuration manager??

The connection string that currently works in web.config is as below;

Server=mssql001.web24.net.au;Database=MWFDB;Uid=finnatic;Pwd=scout7;

so I need the login control and create new user control to reference this database connection.

Ideas??
0
 
LVL 26

Accepted Solution

by:
Anurag Thakur earned 500 total points
ID: 22700742
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question