Solved

Trying to change the Database Connection in IIS 6 website

Posted on 2014-03-10
3
627 Views
Last Modified: 2014-03-10
I have a website running in IIS 6 which is using a web.config file to access the database.  The connection String is this:

    <connectionStrings>
        <add name="Vision" connectionString="data source=VisionAlias; integrated security=True; initial catalog=DatabaseName; Application Name=Forcasting" providerName="System.Data.SqlClient"/>
    </connectionStrings>

This connects to a SQL Server 2005 database.

I need to change it to point to a new 2008 database.
I have tried Creating an Alias called "Forecasting" on the 2008 database, and then changing the "data Source=Forecasting;..... however it doesn't work.

I've also tried replacing it with a connection string in the format :

    <connectionStrings>
        <add name="Apple" connectionString="data source=SQLServerInstance; integrated security=True; initial catalog=DatabaseName" providerName="System.Data.SqlClient"/>
    </connectionStrings>

That doesn't work either.

Is there something else I need to change?  I have restarted IIS services after each change, and it does make a change (it breaks!), so I know I'm using the right file.  

Thanks
0
Comment
Question by:Sokella
  • 2
3 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
Comment Utility
however it doesn't work.
giving some error message may help to troubleshoot.

are the same logins/permissions created on the new server?
is it enabled in terms of TCP/IP connectivity and allow remote connections?
is at also a "default" instance, or eventually a named instance?
etc ...
0
 

Author Comment

by:Sokella
Comment Utility
OK the error message is this:

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /ForecastTool/errorPages/errorPages/applicationError.aspx

It might be the security problem - I might change the security from Trusted.
It's not a default instance, it is a named instance, and I included that in the string.
Should the full connection string work?  If so I will play with that and assume it's the security.
0
 

Author Closing Comment

by:Sokella
Comment Utility
It was a security issue in the connection string - many thanks :-)
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now