尝试使用Web部署时访问被拒绝

编程入门 行业动态 更新时间:2024-10-26 22:23:27
本文介绍了尝试使用Web部署时访问被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我一直在关注自动部署和测试的标准环境,我遇到了一些错误.

I have been following Standard Environments for Automated Deployment and Testing and I have run into some errors.

我有两台服务器,一台 Windows Server 2008 R2 和另一台 Windows Server 2012 .在这两个机器上,我都已经安装了Web Deploy 3并且服务Web Deployment Agent Service正在运行.我的域中有服务帐户,并且将两台计算机上的帐户都添加到了Administrators组.我还将此帐户用于Build and Test控制器和代理.

I have two servers, one Windows Server 2008 R2 and another Windows Server 2012. On both I've installed Web Deploy 3 and the service Web Deployment Agent Service is running on both machines. I have the service account in my domain and I added the account on both machines to Administrators group. I also used this account for the Build and Test controller and agent.

2008服务器是构建服务器,我想将带有构建服务器的网站部署到2012服务器.我有一个构建定义,该构建定义使用标准的 TFS 2012 Update 2 处理模板(使用/p:DeployOnBuild=True作为MS build参数添加)来制作带有zip和deploy.cmd等的程序包.

The 2008 server is the build server and I want to deploy a website with the build server to the 2012 server. I have one build definition that makes the package with the zip and deploy.cmd etc. with the standard TFS 2012 Update 2 process template (added /p:DeployOnBuild=True as MS build argument).

我还有一个基于LabDefaultTemplate TFS 2012 update 2模板的构建定义.在实验室过程模板中,我在部署"选项卡上添加了以下命令:

I have another build definition based on the LabDefaultTemplate TFS 2012 update 2 template. In the lab process templates I added the following command on the deploy tab:

"$(BuildLocation)\_PublishedWebsites\UI.Web.Mvc4_Package\UI.Web.Mvc4.deploy.cmd" /y /m:SERVERNAME_OF_THE_2012_SERVER

当我运行第二个构建定义时,出现访问被拒绝"错误.我不知道它从哪里来.我看不到有什么特别的事情发生.我也将日志设置为诊断,但这不起作用.

When I run the second build definition, I get the "Access Denied" error. I don't know where it is coming from. I don't see any special things here happening. I also set the log to diagnostic but that doesn't work.

当我与远程桌面连接到2008构建服务器并手动运行相同的deploy.cmd时,一切正常.该站点已部署在2012服务器上,并且一切都在运行.

When I make a connection with Remote Desktop to the 2008 build server and manually run the same deploy.cmd, everything is working. The site is deployed on the 2012 server and everything is running.

有人可以帮助我吗?

谢谢

从构建中添加了日志:

Deploy Build on Environment 00:22 Deploying Build 00:22 Run Deployment scripts Initial Property Values Values = Web Server | $(BuildLocation)\_PublishedWebsites\UI.Web.Mvc4_Package\start.bat 00:22 Run Deployment Task Initial Property Values BuildLocation = \\AP-GDA06-TFSB\DropFolder\Dev MVC4\Dev MVC4_20130510.11 DeploymentScriptDetails = Web Server | $(BuildLocation)\_PublishedWebsites\UI.Web.Mvc4_Package\start.bat LabEnvironmentUri = vstfs:///LabManagement/LabEnvironment/3 MaxWaitTime = 00:30:00 ThrowOnError = True UseRoleForDeployment = True Deployment Task Logs for Machine: 2012_SERVER Access is denied Exception Message: Team Foundation Server could not complete the deployment task for machine '2012_SERVER', script '\\2008_SERVER\DropFolder\Dev MVC4\Dev MVC4_20130510.11\_PublishedWebsites\UI.Web.Mvc4_Package\start.bat' and arguments ''. (type LabDeploymentProcessException) Exception Stack Trace: Server stack trace: at Microsoft.TeamFoundation.Lab.Workflow.Activities.RunDeploymentTask.ExecuteDeploymentTask.RunCommand(AsyncState state) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase) at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData) at System.Action`1.EndInvoke(IAsyncResult result) at Microsoft.TeamFoundation.Lab.Workflow.Activities.RunDeploymentTask.ExecuteDeploymentTask.EndExecute(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager) Final Property Values BuildLocation = \\2008_SERVER\DropFolder\Dev MVC4\Dev MVC4_20130510.11 DeploymentScriptDetails = Web Server | $(BuildLocation)\_PublishedWebsites\UI.Web.Mvc4_Package\start.bat LabEnvironmentUri = vstfs:///LabManagement/LabEnvironment/3 MaxWaitTime = 00:30:00 ThrowOnError = True UseRoleForDeployment = True Final Property Values Values = Web Server | $(BuildLocation)\_PublishedWebsites\UI.Web.Mvc4_Package\start.bat

启动的BAT文件包含以下命令:

START UI.Web.Mvc4.deploy.cmd /y /m:2012_SERVER

推荐答案

如果使用 DefaultLabTemplate 启动构建定义,则应该在构建日志中看到以下内容:

If you start build definition which is using DefaultLabTemplate you should see following in your build log:

...

If deployment needed Do deployment Reserve Environment For Deployment Deploy Build on Environment Deploying Build Run Deployment scripts Run Deployment Task Deployment Task Logs for Machine: <your machine> Accessing the following location using the lab service account: <your service account>, <your drop location>.

...

您看到实验室服务帐户正在使用吗?

Do you see that the Lab Service account is using?

更多推荐

尝试使用Web部署时访问被拒绝

本文发布于:2023-08-05 05:47:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1303051.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:被拒   Web

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!