我正在尝试设置一个网站和webjob,但每次我尝试独立于网站发布webjob时都会出错(即Publish as Azure WebJob从上下文菜单中选择)
C:\ Program Files(x86)\ MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4270,5):错误:'MyWebJob.Models.MyDataEntities-Web.config连接字符串'参数不能为null或为空.
C:\ Program Files(x86)\ MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4270,5):错误:'MyWebJob.Models.MoreDataEntities-Web.config连接字符串'参数不能为null或为空.
部署WebJob有两种选择
当我将我的webjob链接到一个网站项目时,它会在网站上部署而不会出错.但是,当我尝试独立部署它时,我在控制台和错误列表中出现上述错误,但仍然部署了webjob.
如何独立部署我的webjob并摆脱这种持久的"错误"?
当我尝试发布一个azure应用程序时,我收到此错误.C:\ Program Files(x86)\ MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4283,5):错误:'ibasis_Data_Transfer.mytestdbEntities-Web.config连接字符串'参数不能为空或空.
我的App.Config有一个连接字符串.例如
<add name="mytestdbEntities" connectionString="metadata=res://*/mytestappModel.csdl|res://*/mytestappModel.ssdl|res://*/mytestappModel.msl;provider=System.Data.SqlClient;provider connection string="data source=tcp:srv-mytestapp-home.database.windows.net,1433;initial catalog=mytestdb;persist security info=True;user id=blabla;password=blabla;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
Run Code Online (Sandbox Code Playgroud)
不知道在哪里开始寻找解决方案,因为网络上任何与天蓝色相关的错误都没有提到.
ibasis - Web Deploy.pubxml
<?xml version="1.0" encoding="utf-8" ?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<PublishProvider>AzureWebSite</PublishProvider>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>http://ibasis.azurewebsites.net</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>False</LaunchSiteAfterPublish>
<MSDeployServiceURL>ibasis.scm.azurewebsites.net:443</MSDeployServiceURL>
<DeployIisAppPath>ibasis</DeployIisAppPath>
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<UserName>$ibasis</UserName>
<_SavePWD>True</_SavePWD> …Run Code Online (Sandbox Code Playgroud)connection-string azure azure-deployment azure-webjobs visual-studio-2015
azure ×1