• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 957
  • Last Modified:

Trying to change the Database Connection in IIS 6 website

I have a website running in IIS 6 which is using a web.config file to access the database.  The connection String is this:

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

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 :

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

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.  

  • 2
1 Solution
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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 ...
SokellaAuthor Commented:
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.
SokellaAuthor Commented:
It was a security issue in the connection string - many thanks :-)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now