0
votes

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?

1
I think the error is talking about your Web.config file - Maria Ines Parnisari
I have the same connectionString in Web.Config - Oleg Sh

1 Answers

0
votes

In the Publish wizard, under Settings >> Databases, uncheck "Use this connection string at runtime".