Deploy an ASP.net MVC website to a subfolder of an Azure website?

女生的网名这么多〃 提交于 2019-12-07 07:56:42

问题


I have an asp.net mvc website that I'd like to deploy to Azure (preferably via GitHub deployment) so that it's accessed as subfolder of the main domain.

e.g. http://example.com/mymvcsite/

Ideally I'd like the website to be completely self-contained under the subfolder. As if it was configured to be a good old-fashioned IIS application folder. Ie I don't wanty to build a domain mvc website for mydomain.com that just happens to do all it's business under the /mymvcsite/ subfolder path.

I'm quite happy for the entire website to be hosted on Azure, it just makes sense for this particular project to live under a subfolder.

I've been struggling and googling today, trying to figure out how to go about this and have come up blank.


回答1:


You can just go to azure's control panel and add in a virtual directory path.

Please visit this MDSN blog to see how its done.

http://blogs.msdn.com/b/kaushal/archive/2014/04/19/microsoft-azure-web-sites-deploying-wordpress-to-a-virtual-directory-within-the-azure-web-site.aspx




回答2:


If you use Web deploy publish method you can set in Site name mydomain/mymvcsite instead of mydomain. At least it works for me for default windows azure site http://mydomain.azurewebsites.net/mymvcsite.

Or you can use FTP publish method.



来源:https://stackoverflow.com/questions/14983008/deploy-an-asp-net-mvc-website-to-a-subfolder-of-an-azure-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!