Solved

Trying to change the Database Connection in IIS 6 website

Posted on 2014-03-10
3
759 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
[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
  • 2
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 39917132
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
ID: 39917153
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
ID: 39917183
It was a security issue in the connection string - many thanks :-)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
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…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

705 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