fsprojects / FSharp.Configuration

The FSharp.Configuration project contains type providers for the configuration of .NET projects.
http://fsprojects.github.io/FSharp.Configuration/
Other
114 stars 63 forks source link

FSharp.Configuration did not read settings specified in Azure Website #50

Open mastoj opened 9 years ago

mastoj commented 9 years ago

I didn't want to check in sensitive appSettings in my web.config file, so I used the file attribute on my appSettings to specify them through a separate file which only exists locally. I also specified the keys with empty values in my web.config file so I could use the web.config for the type provider.

Then on my Azure Web Site I specified the "production" values for my app settings in the management portal and thought they would be read by the type provider, but they weren't. I think the reason might be that the settings I provided are injected in run time and not added to the actual file, but that's just me guessing.

vasily-kirichenko commented 9 years ago

Yes, we use http://msdn.microsoft.com/ru-ru/library/ms151456(v=vs.110).aspx here https://github.com/fsprojects/FSharp.Configuration/blob/master/src/FSharp.Configuration/AppSettingsProvider.fs#L15, so we read the actual config file each time a setting value is requested.

If you have ideas how to get this working for your scenario as well, tell us or make a pull request.

mastoj commented 9 years ago

Ok. I'll let you know if I have time to look at it and figure out how to do it.