我下周要完成一项任务,而且我确实遇到了一个问题。一些帮助会非常感激。我一直得到这个响应类型' System.ArgumentException'的未处理异常发生在System.Data.dll中附加信息:不支持关键字:'用户名'。
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb"/>
</parameters>
</defaultConnectionFactory>
<connectionStrings>
<add
name="VoteWithDEV"
connectionString="Data Source=k2mmbsouh0.database.windows.net;
Initial Catalog=VoteWithDEV;Persist Security Info=True;Username=patrickmcmu11an;Password=Jordan123"
providerName="System.Data.SqlClient"/>
</connectionStrings>
<appSettings>
<add key="ConnectionStringName" value="VoteWithDEV"/>
</appSettings>
</entityFramework>
</configuration>
答案 0 :(得分:1)
删除appsettings块并如上所述使用USER ID,也将Persist Security Info = True替换为Integrated Security = false。