-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
does not find Azure connection string when in library of Web API app #37
Comments
I think you need to use web.config both compile and run time. |
@jackfoxy Did you resolve the issue? |
Yep |
@jackfoxy @vasily-kirichenko I just pushed an update to nuget. I've heard complains that it's bit inconvenient to specify connection string on each SqlCommand instantiation. Now "SqlCommandProvider" is default for ConnectionStringName parameter. If combined with either App.Config or Web.Config file in design type it's enough to specify something like: type MyQuery= SqlCommand<"SELECT * FROM MyTable"> Of course it expects following in config file Enjoy. |
I assume the old format still works...multiple connection strings is a possible scenario. |
Correct. Should work. |
Using Web API app derived from Dan Mohl's F# MVC5 template.
When SqlCommand compiled in main application (using App.config for connection string for local execution), it works locally and it works on an Azure website.
When SqlCommand compiled in a library project in the Solution (using App.config in the library project for connection string for local execution), it works locally, but on Azure it throws the following exception:
An exception of type 'System.Exception' occurred in FSharp.Data.Experimental.SqlCommandProvider.dll but was not handled in user code
Additional information: Connection string [connection string name] is not found.
The text was updated successfully, but these errors were encountered: