0

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!

1 Answer 1

0

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

1
  • yes, I reconfirmed, both these settings are same.
    – iniki
    Jan 25, 2012 at 10:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .