Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having Windows 7 and IIS 7.5 on my machine.

For my application, I have my config files xxx.config and xxx.db.config
located at C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG

with both being referenced in machine.config as -

<appSettings file="xxx.config"/>
  <connectionStrings configSource="xxx.db.config"/>

There are around 10 connection strings in xxx.db.config file. However, when I try to access connection string using following C# code-


No connection string except the default-

.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true

are being returned :-(

P.S. when working with above setting in another Windows 2003 machine with IIS 6, I am able to see all the connection strings available in xxx.db.config

Can anyone please guide what could be the issue.

Thank you!

share|improve this question

Check your site's application pool settings to make sure it's configured for .NET Framework 2.0 and 64 bit mode:

enter image description here

share|improve this answer
yes, I reconfirmed, both these settings are same. – iniki Jan 25 '12 at 10:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.