I have this in web config
<connectionStrings>
<add name="web" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=ttt\SQL2K12;initial catalog=test;User ID=sa;Password=1222;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
<add name="web" connectionString="data source=tttt\SQL2K12;initial catalog=test;User ID=sa; Password=555 providerName="System.Data.SqlClient" />
</connectionStrings>
but throws error:
Configuration file is not well-formed XML
why?
答案 0 :(得分:2)
You are missing a double quote in the second Connection String.
Password=555 must be Password=555"
<add name="GalitosWebConnectionString" connectionString="data source=VLSAD0ISD\SQL2K12;initial catalog=test;User ID=sa; Password=555" providerName="System.Data.SqlClient" />
And it's better to not use the sa
login for websites. If someone hacked the site they would also have full control over the DB.