Azure的Web应用程序 - 承载多个应用程序 [英] Azure Web App - Multiple apps hosting

查看:314
本文介绍了Azure的Web应用程序 - 承载多个应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的本地IIS服务器,我创建了一个IIS网站并部署3 ASP.NET Web应用程序,这样他们将有类似的网址
IIS URL / webapp1,IIS URL / webapp2的,IIS URL / webapp3和它的作品般的魅力。我能够在部署Web应用程序的Azure而不是其他人只有一个Web应用程序。

In my local IIS server, i have created a IIS website and deployed 3 ASP.NET web application such that they will have URL like IIS URL/webapp1 , IIS URL/webapp2 , IIS URL/webapp3 and it works like charm. I am able to deploy only one web application in Azure webapp and not others.

我可以比部署在一个Azure的Web应用程序一个Web应用程序吗?如果是,那么如何?

Can i deploy more than one web application in one Azure web app ? If yes, then how ?

推荐答案

我的解决方案如下所述。首先创建一个样本AzureWebsite -

My solution is described below. First create a sample AzureWebsite -

在这里输入的形象描述

设置了在AzureWebsite如下额外的应用程序。导航到 Configuration选项卡,并创建一个应用程序如下图所示 -

Setup up an additional application in the AzureWebsite as follows. Navigate to Configuration tab and create an application as shown below –

通过上面的应用,我们保留 / 来MVC的网站,然后 /的WebAPI 来的WebAPI端点创建。

By creating above application we reserved / to MVC site and then /webapi to webapi endpoints.

比方说,你想从与解决方案发布MVC和Web API项目,如下图所示。

Lets say you want to publish MVC and Web API projects from VS Solution as shown below.

在这里输入的形象描述

上面创建AzureWebsite的下载publishsettings文件。该publishsettings文件导入到Visual Studio MVC项目(右键单击该项目,并选择发布)如下图所示 -

Download publishsettings file of above created AzureWebsite. Import the publishsettings file to the Visual studio MVC project (right click the project and select publish) as shown below -

在这里输入的形象描述

同样通过导入同一publishsettings文件发布的WebAPI项目。但是,我们需要修改目标网址网​​站名称到新创建的应用程序的详细信息。请检查下面的截图 -

Similarly publish the WebApi project by importing the same publishsettings file. But we need to change the Destination URL and Site name to the newly created application details. Please check below screenshot –

在这里输入的形象描述

发布两个项目。

现在导航到 http://ramidev1.azurewebsites.net 的MVC站点。并导航到 http://ramidev1.azurewebsites.net/webapi/api 获得的WebAPI端点。

Now navigate to http://ramidev1.azurewebsites.net for the MVC site. And navigate to http://ramidev1.azurewebsites.net/webapi/api for WebApi endpoints.

这篇关于Azure的Web应用程序 - 承载多个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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