简体   繁体   中英

Publish Azure WebJob

When I try to publish Azure WebJob I got an error:

C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v14.0\\Web\\Microsoft.Web.Publishing.targets(4283,5): Error : The 'WebJobArchivingExpiredRequest.PixlocateEntities-Web.config Connection String' argument cannot be null or empty.

but I have the following line in app.config/connectionStrings :

<add name="PixlocateEntities" connectionString="metadata=res://*/DB.csdl|res://*/DB.ssdl|res://*/DB.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=tcp:[myserver].database.windows.net,1433;Initial Catalog=PixlocateDev;Persist Security Info=True;User ID=[username];Password=[password]&quot;" providerName="System.Data.EntityClient" />

also, I have 2 connection strings in web.config:

<add name="PixlocateEntities" connectionString="metadata=res://*/DB.csdl|res://*/DB.ssdl|res://*/DB.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=tcp:[myserver].database.windows.net,1433;Initial Catalog=PixlocateDev;Persist Security Info=True;User ID=[username];Password=[password]&quot;" providerName="System.Data.EntityClient" />

<add name="WebJobArchivingExpiredRequest.PixlocateEntities" connectionString="metadata=res://*/DB.csdl|res://*/DB.ssdl|res://*/DB.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=tcp:[myserver].database.windows.net,1433;Initial Catalog=PixlocateDev;Persist Security Info=True;User ID=[username];Password=[password]&quot;" providerName="System.Data.EntityClient" />

why it happens and how to fix?

在发布向导的“设置” >>“数据库”下,取消选中“在运行时使用此连接字符串”。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM