2013-08-26 83 views
3

我有3个Web部署(Visual Studio发布项目到包)我使用msdeploy命令与服务器同步的包。其中一个包是新增加的。其他两个软件包工作正常,除了新添加的软件包。我在日志中看到以下错误。由于iisApp提供程序的权限已在IIS管理器委派设置中设置,因此我不确定在哪里设置此权限。我是IIS配置和.net开发的新手。任何人都可以提供信息,为什么我得到这个错误?Webdeploy权限问题

下面是使用命令:

PS D:\Deployment> &'C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe' -verb:sync -source:package='D:\temp\CI.Web.Pack_20130824.1\_PublishedWebsites\ProjectXYZ_Package\ 
ProjectXYZ.zip' -dest="auto,computerName='https://localhost:8172/msdeploy.axd?site=siteName',username 
='deployUserName',password='deployPassword',authType=basic,includeAcls='False'" -skip:objectName=createApp -disableLink:AppPoolExtens 
ion -disableLink:ContentExtension -disableLink:CertificateExtension -allowUntrusted 
Info: Using ID '2b0c6151-a2b0-4a87-9135-263330c5e619' for connections to the remote server. 
Info: Object createApp (D:\Builds\2\Mayo.KCMS\CI.Web.Pack\Sources\DEV\Web\ProjectXYZ\obj\Rele 
ase\Package\PackageTmp) skipped due to skip directive 'CommandLineSkipDirective 1'. 
Info: Adding sitemanifest (sitemanifest). 
Info: Adding IIS Application (Default Web Site/ProjectXYZ_deploy) 
Error Code: ERROR_USER_NOT_AUTHORIZED_FOR_IISAPP 
More Information: Could not complete an operation with the specified provider ("iisApp") when connecting using the Web M 
anagement Service. This can occur if the server administrator has not authorized the user for this operation. iisApp htt 
p://go.microsoft.com/fwlink/?LinkId=178034 Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_ 
AUTHORIZED_FOR_IISAPP. 
Error count: 1. 

错误的服务器:

wmsvc.exe Error: 0 : User: 
Client IP: ::1 
Content-Type: application/msdeploy 
Version: 9.0.0.0 
MSDeploy.VersionMin: 7.1.600.0 
MSDeploy.VersionMax: 9.0.1631.0 
MSDeploy.Method: Sync 
MSDeploy.RequestId: 6b694745-0024-416c-9439-3e97608417b9 
MSDeploy.RequestCulture: en-US 
MSDeploy.RequestUICulture: en-US 
ServerVersion: 9.0.1631.0 
Skip: objectName="^configProtectedData$"objectName="createApp" 
Provider: auto, Path: 
A tracing deployment agent exception occurred that was propagated to the client. Request ID '6b694745-0024-416c-9439-3e97608417b9'. Request Timestamp: '8/26/2013 2:01:55 PM'. Error Details: 
ERROR_USER_NOT_AUTHORIZED_FOR_IISAPP 
Microsoft.Web.Deployment.DeploymentDetailedUnauthorizedAccessException: Could not complete an operation with the specified provider ("iisApp") when connecting using the Web Management Service. This can occur if the server administrator has not authorized the user for this operation. iisApp http://go.microsoft.com/fwlink/?LinkId=178034 Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_AUTHORIZED_FOR_IISAPP. 
    at Microsoft.Web.Deployment.DelegationHelper.ImpersonateForOperation(String deploymentAction, String deploymentProvider, String deploymentPath, DelegationContextCache cache) 
    at Microsoft.Web.Deployment.DelegationHelper.ImpersonateForOperation(String deploymentAction, DeploymentObject deploymentObject) 
    at Microsoft.Web.Deployment.DeploymentObject.Add(DeploymentObject source, DeploymentSyncContext syncContext) 
    at Microsoft.Web.Deployment.DeploymentSyncContext.HandleAdd(DeploymentObject destObject, DeploymentObject sourceObject) 
    at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source) 
    at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source) 
    at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject) 
    at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId) 
    at Microsoft.Web.Deployment.DeploymentAgent.HandleSync(DeploymentAgentAsyncData asyncData, Nullable`1 passId) 
    at Microsoft.Web.Deployment.DeploymentAgent.HandleRequestWorker(DeploymentAgentAsyncData asyncData) 
    at Microsoft.Web.Deployment.DeploymentAgent.HandleRequest(DeploymentAgentAsyncData asyncData) 

enter image description here

回答

6

我已找到问题的解决方案。第三个软件包试图在服务器上创建一个新的应用程序,因为它的应用程序名称不同于其他两个软件包。我添加了一个新的setParameters.xml文件,其中包含应用程序名称的条目,该文件将使用前两个软件包部署到的默认应用程序名称来覆盖默认应用程序名称。我将这个setParameters.xml文件作为参数传递给Webdeploy命令。

&'C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe' -verb:sync -source:package='D:\temp\Project_XYZ.zip' -setParamFile:setParameters.xml -dest="auto,computerName='https://localhost:8172/msdeploy.axd?site=siteName',username='deployUser',password='changeMe',authType=basic,includeAcls='False'" -skip:objectName=createApp -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -allowUntrusted -whatif 

setParameters.xml

<?xml version="1.0" encoding="utf-8"?> 
<parameters> 
    <setParameter name="IIS Web Application Name" value="siteName" /> 
</parameters> 
4

除非用户是管理员,您需要授予他们访问部署到网站。您可以右键单击IIS管理器中的网站并选择Deploy :: Configure Web Deploy Publishing。只需选择用户并单击确定(您可以删除它在桌面上生成的发布设置文件)

+1

感谢丰富!我发现我做错了什么解决方案。我在setParameters.xml文件中设置了错误的应用程序名称。 – Kalyan