有没有人成功使用VS2010的新Web部署功能将网站部署到运行在Windows Server 2003上的IIS 6?
当我尝试时,我收到以下错误:
Web部署任务失败.无法完成对远程代理URL'https:// myserver:8172/msdeploy.axd?site = mysite'的请求.无法连接到远程服务器.无法建立连接,因为目标计算机主动拒绝它.
我可以在本地部署(从安装在服务器上的VS到服务器上的IIS),并且World Wide Web Publishing服务正在运行.但是,没有进程侦听端口8172.是否应该有一个进程?
我在将MsBuild package + deploy命令分成两个单独的命令时遇到了一些问题.(我需要这样做才能将其他参数传递给MsDeploy).
工作正常的命令如下所示:
msbuild "src\Solution.sln" 
  /P:Configuration=Deploy-Staging 
  /P:DeployOnBuild=True
  /P:DeployTarget=MSDeployPublish
  /P:MsDeployServiceUrl=https://192.168.0.1:8172/MsDeploy.axd
  /P:DeployIISAppPath=staging.website.com 
  /P:AllowUntrustedCertificate=True 
  /P:MSDeployPublishMethod=WmSvc 
  /P:CreatePackageOnPublish=True 
  /P:UserName=staging-deploy 
  /P:Password=xyz
分离的打包命令如下所示:
msbuild "src\Solution.sln" 
  /P:Configuration=Deploy-Staging 
  /P:DeployOnBuild=True
  /P:DeployTarget=Package 
  /P:_PackageTempDir=C:\temp\web
哪个工作正常.但接下来是MsDeploy部分:
msdeploy 
 -verb:sync 
 -allowUntrusted 
 -usechecksum
 -source:manifest=
  'src\WebProject\obj\Deploy-Staging\Package\WebProject.SourceManifest.xml'  
 -dest:auto,ComputerName=
  'https://192.168.0.1:8172/MsDeploy.axd?site=staging.website.com',
   username='staging-deploy',password='xyz',authType='basic',includeAcls='false'
 -enableRule:DoNotDeleteRule
失败,WmSvc.log中出现以下错误
wmsvc.exe Error: 0 : Attempted to perform an unauthorized operation.
setAcl/C:\temp\web (Read)
ProcessId=15784
ThreadId=31
DateTime=2011-03-30T14:57:02.4867689Z
Timestamp=3802908721815
wmsvc.exe Error: 0 : Not authorized.
Details: No rule was found that could authorize user 'staging-deploy', 
         provider 'setAcl', operation 'Read', path 'C:\temp\web'.
(还有几个读/写操作)
它试图访问的路径显然出现了问题(因为它可以正常使用其他方法) - 我不确定它是否正在尝试正确使用iisApp定位,而且目前我认为没有正确的网络.config也将被部署.
我在一个小型Web应用程序(ASP.NET MVC 3)中使用Entity Framework 4.2 June 2011 CTP,因为它支持枚举.
我尝试使用Web部署部署它,我收到以下错误:
您尝试使用的应用程序池将"managedRuntimeVersion"属性设置为"v4.0".此应用程序需要'v4.2'.
如何创建在.NET 4.2上运行的应用程序池?
编辑: Web应用程序可以使用4.0应用程序池,因此真正的问题是如何在使用Visual Studio发布选项时禁用应用程序池运行时版本检查?
当运行Web部署到特定的IIS站点时,我收到以下错误:
Error: The synchronization is being stopped because the maximum number of sync passes '5' has been exceeded even though all the changes could not be applied. This could occur if there are external changes being made to the destination.
 At C:\Code\.....\deploy.ps1:185 char:10
 +         & <<<< ($appDeployCmd) $type /M:$url /U:$user /P:$pass /A:Basic -allowUntrusted -useCheckSum
 + CategoryInfo          : NotSpecified: (Error: The sync...he destination.:String) [], RemoteException
 + FullyQualifiedErrorId : NativeCommandError
Web Deploy在此环境中针对其他IIS站点正常工作,文件同步也正常工作.我以前能够使用Web部署来部署此特定站点而不会出现问题.突然之间,这个问题开始发生,我不能再部署这个网站了.
我正在使用从msbuild构建的包进行基本站点部署.我不认为具体内容是如此重要,因为正如我所说,这一切都在以前工作,并且目前在同一服务器场上的其他站点上工作没有问题.
错误消息说:
"如果对目的地进行外部更改,可能会发生这种情况."
但我不确定如何追踪这一点,或者甚至是开始时的问题.我确保所有远程会话中的所有资源管理器窗口都已关闭.我已经尝试重新启动网站和应用程序池.我唯一没试过的是重启服务器,这是不可能的.
可能导致此Web部署失败的任何想法?
我通常把我的连接字符串放到一个单独的文件中,在web.config中添加这样的东西:
<connectionStrings configSource="WebConnection.config" />
我刚刚安装了VS 2012,它会自动获取我现有的发布设置.但是,当我进行网络发布时,它现在自己添加了两个连接字符串,因此部署目标上的web.config现在看起来像这样:
  <connectionStrings configSource="WebConnection.config">
    <add name="EF.Model.DbContext" connectionString="EF.Model.DbContext_ConnectionString" providerName="System.Data.SqlClient" />
    <add name="Migrations.Db.MigrationDb" connectionString="Migrations.Db.MigrationDb_ConnectionString" providerName="System.Data.SqlClient" />
  </connectionStrings>
当然,这会产生错误(使用时节点内容必须为空configSource).我注意到,在新生成的.pubxml文件(现在存储发布设置)中有以下几行:
  <ItemGroup>
    <_ConnectionStringsToInsert Include="EF.Model.DbContext" />
    <_ConnectionStringsToInsert Include="Migrations.Db.MigrationDb" />
  </ItemGroup>
我该如何删除它们?:)如果我从文件中删除它们,Web-publish对话框会在我编辑发布设置时随时添加它们.
msdeploy one-click-web-publishing webdeploy visual-studio-2012
我一直在努力设置自动备份,但似乎已经碰壁了.按照本文档并使用Powershell,我启用了备份(TurnOn-Backups -On $ true,然后是Configure-Backups -SiteName"test1"-Enabled $ true ;所以Get-BackupSettings -SiteName"test1"告诉我备份已启用).
但是,每当我从Visual Studio发布时,都不会创建备份.我已设置备份路径,权限设置为允许每个人的所有内容..所以我不知道我还能检查什么.
我正在寻找类似Powershell脚本的东西来检查是否安装了msdeploy,如果是,那么是什么版本
我考虑过检查"c:\ Program Files\IIS"并检查那里的MSDeploy安装,但是这总是保证是安装位置吗?
我需要这个在任何给定的服务器机器上工作
当尝试使用TeamCity和Web Deploy部署我的站点时,我收到此错误:
error MSB4057: The target "MsDeployPublish" does not exist in the project.
我必须在构建服务器上安装一些东西吗?这是一个安装了Web Deploy 3.5的干净的Windows Server 2012.
我们正在尝试在构建部署系统中集成"构建一次,随处部署"模型.
MSDeploy为此创造了奇迹,通过CRC校验和比较显着缩短了构建时间,并且(在大多数情况下)使用参数化来根据我们部署的环境更改应用程序web.configs时,它也能正常工作.
我将这些参数中的大多数固定下来,但是无论我在parameters.xml文件中调用它们有多少种不同的方式,一些元素和属性似乎永远不会改变.我已经概述了三个这样的例子,这里是我试图改变的web.config文件:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <connectionStrings>
        <add name="DbConnectionString" connectionString="Data Source=null;Initial Catalog=null;Trusted_Connection=no;User ID=user1;Password=pass*9;" providerName="System.Data.SqlClient" />
    </connectionStrings>
    <system.web>
        <customErrors mode="On" defaultRedirect="/Library/Error/PageNotFound.aspx">
        </customErrors>
    </system.web>
    <applicationSettings>
        <settings>
            <setting name="service_Address" serializeAs="String">
                    <value></value>
            </setting>
        <settings>
    </applicationSettings>
</configuration>
这是parameters.xml文件:
<parameter name="DbConnectionString" defaultValue="">
    <parameterEntry kind="XmlFile" scope="\\web.config$" match="/configuration/connectionStrings/add[@name='DbConnectionString']/@connectionString" />
</parameter>
<parameter name="customErrorsMode" defaultValue="">
    <parameterEntry kind="XmlFile" scope="\\web.config$" match="configuration/system.web/customErrors/@mode" />
</parameter>
<parameter name="service_Address" defaultValue="">
    <parameterEntry kind="XmlFile" scope="\\web.config$" match="/configuration/applicationSettings/aim.Web.Properties.Settings/setting[@name='service_Address']/value" />
</parameter>
这是相应的setParameters.xml文件:
<setParameter name="DbConnectionString" value="Data Source=dbserver;Initial Catalog=DB1;Trusted_Connection=no;User ID=user1;Password=pass*9;"/> 
<setParameter name="customErrorsMode" value="Off"/>
<setParameter name="service_Address" value="https://myservice.asmx"/>
我测试了每个XPath表达式,结果与任何其他工作参数完全相同,但上面似乎永远不会改变.
有没有人看到我在这里丢失的任何明显的东西?
我有一个预先存在的ASP.NET Core 3.0应用程序,它已成功部署到Azure 应用服务(使用AspNetCoreModuleV2模块)。将应用程序升级到(今天的版本)ASP.NET Core 3.1 后,应用程序在我的本地版本IIS Express上构建并正确运行。但是,当我尝试使用(今天发布的)Visual Studio 16.4发布到 Azure 应用服务时,我收到以下错误:
资产文件“C:\Project\obj\project.assets.json”没有“.NETCoreApp,Version=v3.0”的目标。确保恢复已运行并且您已在项目的 TargetFrameworks 中包含“netcoreapp3.0”。
<PackageReference>到Microsoft.AspNetCore, Microsoft.EntityFrameworkCore, 并且Microsoft.Extensions已更新为3.1.0obj文件夹以确保没有任何遗留的引用。3.1.100的版本Microsoft.PackageDependencyResolution.targets。我知道有些东西仍然挂在.NET Core 3.0依赖项上。但目前还不清楚为什么这只会在部署过程中引起问题。是Azure的应用程序Service的还没有准备好.NET 3.1的核心?或者这是依赖解析目标的问题?
visual-studio webdeploy azure-web-app-service asp.net-core asp.net-core-3.1
webdeploy ×10
msdeploy ×4
iis ×2
teamcity ×2
.net ×1
asp.net-core ×1
build-server ×1
deployment ×1
iis-6 ×1
msbuild ×1
powershell ×1
web-config ×1
xpath ×1