How can I merge a web application, an admin site, and web api into one website in Azure - azure

We use Azure.
We have a web application, an admin site, and also an Web API (for mobile apps). They are all using the same database. Right now each one has its own website. But each website cost money. So how can I use just one website to have them altogether? Something like this:
www.myapp.com - for the web application
www.myapp.com/admin -for site admin
www.myapp.com/webapi - for web api
If we have our own IIS, I know we can use virtual directory. But with Azure, how can I achieve this?

I think this article explained it
Create three projects (web, admin, and api)
Assign admin and api to their appropriate virtual directory
Publish the root project (web)
Set up virtual directory in azure portal
Publish the child projects

Related

sharepoint add-in multi site installation

developing a provider hosted application where the application redirects to different pages of a web application hosted on an azure web site.
This web site also handles the app installed event.
The problem is that in the web.config of the site, we need to add a client ID and Password, but these (Client ID/Password) are automatically generated by the SharePoint Online app registration page, after we register the application on the SharePoint online site.
So if we install the app on this SPOnline Site , it works fine, but if we try to install it on another site, when it redirects to the azure web site page, we got an authentication error.
need to add a unique client ID and password to the azure web site so when the SharePoint app in being installed on any Client ‘s SharePoint site can be identified as safe, authenticated and well-functioning with the azure site.
In the current process, we have to create an azure web site for each SharePoint Site where the application is being installed
How is this done with SharePoint plugins? Does the provider have to generate the Id and secret on each SharePoint Site.
In the SharePoint web provider project code , I found something called HostedAppSigningKey and HostedAppName , but did not find any tutorial about that. Can these be used for a solution?
To support multiple environments you should generate a id/secret from the Microsoft Seller Dashboard (even if you don't plan to sell your add-in) and use one set for all the environments. You should not use the appregnew page.

Web page in Azure Mobile app

I have created a Mobile App in New Azure portal. It has many APIs available for mobile users and some API for admin. we are creating Admin page (HTML with jquery). Is it possible to host the Admin page in Mobile App or do i need to create separate web app in Azure portal ?
A mobile app is essentially a web app customized for mobile features. So, yes, this is possible.
Place your HTML page (ie: index.html) in wwwroot of the web app.

Add website to Azure Cloud Service

We are currently in the process of building a website on azure. At this moment I have a cloud service that is hosting my web api. Deploying to azure works like a charm.
Besides this project we have a pure HTML AngularJS project. I can publish this website as a WebApp. Though, is it possible to deploy it together with the web api?
You can deploy the second one as a Virtual Application/ Directory (Remember to check the Application check box):
You can use this link on how to publish to Root App as well as Virtual directory in your Azure subscription:
http://blogs.msdn.com/b/tomholl/archive/2014/09/22/deploying-multiple-virtual-directories-to-a-single-azure-website.aspx

Azure web site as virtual application/directory of other Azure web site

I am looking to migrate an MVC website to Azure web sites. My current set up in IIS is as follows:
Main MVC site -> www.thesite.com (physical path = wwwroot/thesite)
WordPress blog for the site -> www.thesite.com/blog (physical path = wwwroot/thesiteblog)
These are two separate projects on my end. They exist in separate directories within wwwroot. On the Main MVC site, I configured a virtual directory to point www.thesite.com/blog to wwwroot/thesiteblog.
Is it possible to replicate this behavior using Azure web sites? I see there are configuration options for virtual applications and directories, but they only seem to allow pointing to other places withing the same web site. Ideally, Id like to create 2 Azure web sites, and have the /blog subdirectory of web site #1 point to the root of web site #2. I do not wish to incorporate the code from site #2 into site #1, but I would if I find that is my only option.
I cannot be the only one out there who has had this need before, yet I am having a hard time finding any current information about how to go about doing this. Any thoughts out there?
You can keep them in 2 separate projects and use the virtual directories and applications settings in Azure to publish the 2 different projects under the same site. They will run under the same application pool because in Azure currently there is a 1:1 mapping between websites and application pools. For how to, check my answer here

How to deploy a WebAPI application and an ASP.NET application in one web site on Azure?

I have two projects: an ASP.NET web application and a WebAPI application.
Web application uses the WebAPI application via AJAX.
To avoid cross domain problem, I want to the two projects deployed under one domain on Azure.
For example:
http://www.mycompany.com/api/products is a web api.
http://www.mycompany.com/index.html is the home page of the site, which calls the web api via AJAX.
Is it possible?
Yes, you can host multiple applications on the one site.
Go to Configuration / Virtual Applications and Directories:
Simply host your app under
/ site\wwwroot
And host your API under
/api site\wwwroot\api
And make sure your API is copied to the api sub-directory.
Make sure you tick the Application box.

Resources