Last post Aug 06, 2015 02:15 AM by anrorathod
None
0 Points
4 Posts
Aug 05, 2015 02:32 PM|anrorathod|LINK
I have hosted MVC application (membership) on web server and when run I got error.
Error:
The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.
Solution:
Nothing to do just Simply Add
<add name="LocalSqlServer" connectionString="Data Source=YourServerName;Integrated Security=true;Initial Catalog=YourDataBaseName" providerName="System.Data.SqlClient" />
this section in your webConfig file under <ConnectionString> Tag
Contributor
4407 Points
1264 Posts
Aug 05, 2015 04:41 PM|mostafasydney|LINK
Does your tag in Web.Config look like below:
<connectionStrings> <add name="LocalSqlServer" connectionString="Data Source=(LocalDb)\v11.00;;Initial Catalog=aaaaaaaaaaa;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings>
Thanks
Aug 06, 2015 02:15 AM|anrorathod|LINK
Yes, it looks like as below,
<connectionStrings> <add name="LocalSqlServer" connectionString="Data Source=10.10.10.10;Initial Catalog=DatabaseName;user id=abcd;password=abcd" providerName="System.Data.SqlClient" /> </connectionStrings>
Please let me know if you are facing issue still.
mvc asp.net EntityFramework
None
0 Points
4 Posts
The connection name 'LocalSqlServer' was not found in the applications configuration or the conne...
Aug 05, 2015 02:32 PM|anrorathod|LINK
I have hosted MVC application (membership) on web server and when run I got error.
Error:
The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.
Solution:
Nothing to do just Simply Add
<add name="LocalSqlServer" connectionString="Data Source=YourServerName;Integrated Security=true;Initial Catalog=YourDataBaseName" providerName="System.Data.SqlClient" />
this section in your webConfig file under <ConnectionString> Tag
Contributor
4407 Points
1264 Posts
Re: The connection name 'LocalSqlServer' was not found in the applications configuration or the c...
Aug 05, 2015 04:41 PM|mostafasydney|LINK
Does your tag in Web.Config look like below:
Thanks
Mostafa
If this post helps you to resolve your problem, don't forget to "Mark as Answer"
None
0 Points
4 Posts
Re: The connection name 'LocalSqlServer' was not found in the applications configuration or the c...
Aug 06, 2015 02:15 AM|anrorathod|LINK
Yes, it looks like as below,
Please let me know if you are facing issue still.
mvc asp.net EntityFramework