Web部署删除连接字符串中的引号

时间:2016-04-22 13:18:57

标签: entity-framework webdeploy

使用webdeploy时,在webserver web.config中删除了最后一个引用转义符。

任何想法为什么?

我目前必须登录服务器并在每次发布网站时都读取它!

<add name="Entities" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;server=server;database=db;user id=1;password=password;MultipleActiveResultSets=True;App=EntityFramework;&quot;" providerName="System.Data.EntityClient" />

变为:

 <add name="Entities" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;server=server;database=db;user id=1;password=password;MultipleActiveResultSets=True;App=EntityFramework;" providerName="System.Data.EntityClient" />

1 个答案:

答案 0 :(得分:1)

尝试删除&#34;;&#34; (分号)之前

  

&安培; QUOT

试试这个,

<add name="Entities" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;server=server;database=db;user id=1;password=password;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />