该项目我有使用msdeploy一个包发布到IIS。它部署在该项目的现有版本。 Web应用程序中,我有一个虚拟目录,但我每次部署项目时,虚拟目录上消失。
The project I have uses msdeploy to publish a package to IIS. It deploys over an existing version of the project. within the web application, I have a virtual directory, but every time I deploy the project, the virtual directory disappears.
我以下列方式调用MSDepoly:
I am calling MSDepoly in the following manner:
-source:package='d:\[...]\9.1.0.67\application\AppName.zip' -dest:auto,computerName="hostSite",userName="AutoInstall",password="****",authtype="NTLM",includeAcls="False" -verb:sync -enableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"d:\...\9.1.0.67\application\AppName.SetParameters.xml" -skip:objectName=binding -skip:absolutePath="info$" -skip:objectName=dirPath,absolutePath="help$",skipAction=Delete,你可以看到底,我有以下跳过规则:
as you can see at the end, I have the following skip rules:
-skip:objectName=binding -skip:absolutePath="info$" -skip:objectName=dirPath,absolutePath="help$",skipAction=Delete绑定跳过规则工作,但虚拟目录的信息,还是会被从Web应用程序中删除。虚拟目录嵌套在帮助目录中,所以我增加了跳跃动作跳过删除该文件夹也是如此。
The binding skip rule is working, but the virtual directory, info, is still getting removed from the web application. the virtual directory is nested within the help directory, so I added the skip action to skip deleting that folder as well.
根据我的一切从以下博客文章信息,但我的虚拟目录,信息,还是会被部署上删除。
I based all of this information from the following blog article, but my virtual directory, info, is still getting removed on deployment.
请帮帮忙!
推荐答案我放弃了让msdeploy发挥好。我只是写msdeploy完成后,将执行的蝙蝠脚本:
I gave up on getting msdeploy to play nice. I just wrote a bat script that would be executed after msdeploy completed:
mkdir C:\inetpub\application_wwwroot\VirtualDirectoryPhysicalDir ECHO adding read permissions to the app pool cacls C:\inetpub\application_wwwroot\VirtualDirectoryPhysicalDir/t /e /g "IIS APPPOOL\MyAppPool":r ECHO creating "info" virtual directory C:\Windows\System32\inetsrv\appcmd add vdir /app.name:"WebApplication/AppVirtualDirectory" / /path:"/help/info" /physicalPath:"C:\inetpub\application_wwwroot\VirtualDirectoryPhysicalDir" C:\Windows\System32\inetsrv\appcmd set vdir /vdir.name:"Medrio/MedrioWeb/help/info" /physicalPath:"C:\inetpub\application_wwwroot\VirtualDirectoryPhysicalDir"更多推荐
删除了msdeploy嵌套虚拟目录
发布评论