![](/img/trans.png)
[英]Why I'm getting a HTTP 400 (bad request) error when I'm posting user credentials with JQuery .ajax() method, to a C# controller? (ASP.NET Mvc Kestrel)
[英]I'm making ASP .NET MVC application, I'm getting this error when running the project
我收到以下错误
这是我在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部分。
错误明确表明您指定了多个<conncetionStrings>
部分。 检查您的代码并删除重复项
它仅在配置文件中允许一个<connectionStrings>
部分。 检查您的web.config
删除或合并您定义的连接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.