-
Notifications
You must be signed in to change notification settings - Fork 796
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
No connection string with key '' in configuration file! #3218
Comments
where should a connection string with the name of Default. as the default configuration of serenity. |
I have removed default connection string from my first post. Here is complete version:
|
You need to write line after CommonInitialization.Run as configuration subsystem is not initialized yet |
Serenity.Web.CommonInitialization.Run(); |
I got it. I have take this example from https://volkanceylan.gitbooks.io/serenity-guide/setting-connection-dialect.html |
I have add a connection string into web.config.
<connectionStrings> <add name="Snapshot" connectionString="Server=94.94.94.94;Database=db;Uid=use5;Pwd=ppppp;CHARSET=utf8;convert zero datetime=True" providerName="MySql.Data.MySqlClient" /> </connectionStrings>
I used this connectionString for my row with ConnectionKey attribute but endpoint connections executed with Default.
And I want to check
for testing purpose
I have add this piece of code in SiteInitialization.ApplicationStart
public static void ApplicationStart() { try { SqlConnections.GetConnectionString("Snapshot").Dialect = SqlServer2005Dialect.Instance;
I got this error: No connection string with key Snapshot in configuration file!
This is simple serene project, no advanced modification. Why i am getting this error?
The text was updated successfully, but these errors were encountered: