我们正在使用 ASP.Net 模板使用 VSTS 构建。我们传递的 MSBuild 参数如下 -
/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\"
我们没有看到任何构建错误。从日志中我们观察到一行 -
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v /LRM -p ..\LRM\ -u -f -d PrecompiledWeb\LRM\
其中 LRM 是我们正在构建的 .NET sln 名称。该 sln 包含多个项目以及 LRM 网站。
在构建管道的末尾,我们看到没有生成任何工件。我们在“发布构建工件”中看到一条警告:
2018-01-03T06:07:47.9208838Z ##[警告]目录“D:\VSTS Agents\DEV-QAS\A1\66\a”为空。不会添加任何内容来构建工件“drop”。
我在Linux中安装了Tomcat v9.当我尝试访问Manager App时 - 它不会要求任何登录,并在下一页显示403 Access Denied错误.
tomcat-users.xml文件显示用户条目如下 -
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="admin" password="admin" roles="admin-gui,manager-gui"/>
<user username="tomcat" password="tomcat" roles="tomcat,manager-gui"/>
<user username="both" password="both" roles="tomcat,role1"/>
<user username="role1" password="role1" roles="role1"/>
</tomcat-users>
Run Code Online (Sandbox Code Playgroud)
同样在server.xml中,正确映射了tomcat-users.xml文件.
>
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources> …Run Code Online (Sandbox Code Playgroud)