部署aspnet5应用到Azure上的网站的虚拟目录 [英] Deploying aspnet5 apps to virtual directories on azure websites

查看:190
本文介绍了部署aspnet5应用到Azure上的网站的虚拟目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

随着新的PowerShell部署时,默认的文件夹结构的发布没有虚拟目录工具

The default folder structure when deploying with the new powershell publish tools for none virtual directories are

/data
/LogFiles
/site
/site/appRoot
/site/wwwroot
/site/wwwroot/web.config
/site/locks
/site/deployments

再部署新的应用程序到一个虚拟目录时:

结构变得

/site/wwwroot/approot
/site/wwwroot/testvirt
/site/wwwroot/testvirt/web.config

这是预期的方式在wwwroot文件夹虚拟迪尔斯approots?
有没有为approot的放置任何灵活性。添加一个虚拟应用程序时,看着文件结构它woulld覆盖第一个虚拟应用程序的为approot会发生什么?

is this the intended way to have virtual dirs approots in the wwwroot folder? Is there any flexibility in the placement of approot. What happens when adding the next virtual application, looking at file structure it woulld overwrite the approot of the first virtual application?

推荐答案

相关信息,这可以发现:的 https://github.com/aspnet/dnx/issues/928#issuecomment-171617386

Related information to this can be found : https://github.com/aspnet/dnx/issues/928#issuecomment-171617386

我设法通过设置像下面蔚蓝门户虚拟目录设置,以获得运行并排3个虚拟应用程序:

I managed to get 3 virtual apps running side by side by setting the virtual directory settings on azure portal like the following:

然后,我以同样的方式,视觉工作室是做什么用命令行部署Web应用我的所有3个测试。

Then I deployed my webapp to all 3 for test using commandline in the same way that visual studio is doing it.

"C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:IisApp='C:\Users\pks\AppData\Local\Temp\PublishTemp\appname53' -dest:IisApp='appname/app2',ComputerName='https://appname.scm.azurewebsites.net/msdeploy.axd',UserName='$appname',Password='',IncludeAcls='False',AuthType='Basic' -verb:sync -enableLink:contentLibExtension  -retryAttempts:2

和手动拷入在web.config中的父文件夹在GitHub的从@davidfowl暗示表示。

and manually copyed over web.config to parent folder as indicated in the github suggesting from @davidfowl.

所以目前它并不直接与Visual Studio工具来发布这种行为成为可能。它应该是更多钞票来得到它与Visual Studio工作,如果只需要根和一个额外的虚拟应用程序。如果想比approots文件夹越会发生冲突。

So currently its not possible directly with visual studio tooling to publish this behavior. It should be posible to get it working with visual studio if only the root and one additional virtual app is needed. If wanting more than that the approots folders will conflict.

我也遇到了一个错误(不知道是否是因为很多手工的web.config复制的)虚拟应用程序有httpplatform处理器已经加入,并开始投掷500错误和修复是更新的web.config

I also ran into an error (not sure if it was due to alot of manual web.config copying) that the virtual applications had the httpplatform handler added already and it started throwing 500 errors and the fix was to update web.config

 <handlers>
      <remove name="httpplatformhandler" />
      <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
    </handlers>

这篇关于部署aspnet5应用到Azure上的网站的虚拟目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆