Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How can I change the default database connection for membership?

Posted on 2008-10-12
3
Medium Priority
?
281 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 1500 total points
ID: 22700742
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

604 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