Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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-

ConfigurationManager.ConnectionStrings["ConnStringXXX"]

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.