[英]I'm making ASP .NET MVC application, I'm getting this error when running the project
I am getting the following error 我收到以下错误
This is my connection string in web.config 这是我在web.config中的连接字符串
<!--EmployeeContext connection string-->
<connectionStrings>
<add name="EmployeeContext" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=D:\VisualStudioProjects\C# projects\LocalDBApplication\LocalDBApplication\Database1.mdf;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
该错误消息很明显,说明您的配置文件中有重复的connectionStrings部分。
Error clearly says you have more than one <conncetionStrings>
section specified. 错误明确表明您指定了多个<conncetionStrings>
部分。 Check your code and remove duplicates 检查您的代码并删除重复项
It only allowed one <connectionStrings>
section in config file. 它仅在配置文件中允许一个<connectionStrings>
部分。 Check your web.config
to remove or merge your defined connections. 检查您的web.config
删除或合并您定义的连接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.