We are developing an online CRM Saas product in .Net Framework. Now we want to provide this service to anyone.
Any user wants to use or try our service they just need to put a few basic details and click on Sign up.
There is one best example of my above statement is confluence, as soon as I sign up with some site name my confluence portal is stared.
https://www.atlassian.com/try/cloud/signup?bundle=confluence
Now how to do the same in Azure, I have only files and folder of my application. How to create separate websites for multiple users with a single domain name. If I programmatically created multiple azure apps using Azure ARM then it becomes very difficult to maintain our product. How to do achieve this functionality.
To host multiple apps under a single domain, if you’re leveraging Azure Web App and deploy your web applications to each virtual directory with the name which could identify your web application.
You could keep your web sites in separate projects and use the ‘virtual directories and applications’ settings in Azure to publish the two different projects under the same site.
Go to WebApp -> Settings -> Application Settings -> Virtual applications and directories.
In Web Apps, each site and its child applications run in the same application pool. If your site has multiple child applications utilizing multiple application pools, consolidate them to a single application pool with common settings or migrate each application to a separate web app.
You may want to check the blog post Deploying multiple virtual directories to a single Azure Website for more details.
Also, you could also use Application Gateway infront of your app since you can do path based routing with app gateway i.e testing.com/one points to one web app and testing.com/another points to the other app. You could start out with the example below the modify the back end to use path-based routing. Kindly refer the links below one that covers the basics of configuring the App Gateway with a WebApp and one discussing path based routing:
https://blogs.msdn.microsoft.com/waws/2017/11/21/setting-up-application-gateway-with-an-app-service-that-uses-azure-active-directory-authentication/
https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-create-url-route-portal#create-a-path-based-routing-rule
Related
Background
I have two separate projects in my solution. One of them (the web application project) is responsible to show the landing page (on the root of the domain, say www.example.com) and a documentation for the API (say www.example.com/documentation).
The other project is responsible for the API itself. It's path must be www.example.com/api/v1/ to ensure compatibility with our previous software.
We made this way to be able to publish updates to any of the projects without the need to publish the entire solution, and of course, for organization.
Problem
I don't get how to configure the applications to run on Azure on the same domain with different routes, and I'm stating to fear that it is not possible.
I already tried to configure a subdomain (say api.example.com/v1), but it can't be done because we will break the compatibility with our current clients.
This question is almost what I'm looking for, but it does not show how to do on Azure, and this one is on Azure but using subdomains.
First: you have to create 2 folders, 1 for your web api and the
second for your web app
second: you have to set the two folders as an application.
after doing those two steps you can acces to the two folder by puting:
www.yourdomaine.com(or another)/nameofyourfolder
good luck
It's been incredible exhausting for me, after passing a week to deploy MVCForum (Source Code) to my Azure Web App. I've read that it was possible if you selected a different path when publishing, something that I did. But when I tried running, my main app and the MVC Forum were conflicting between them.
I'd like to use Azure's Web Apps instead of Azure's Cloud Services because of the simplicity and the possibility of only uploading the files that have changed. I have seen that it is possible to upload Web Api and MVC in that fashion, but I have not found an example that sends 2 different MVC apps into a same Web App.
Is it possible to do it with 2 different MVC apps? (Note: Areas are not an option, since the MVC Forum Source Code resides on a completely different solution)
Thanks!
Given your comment that you are trying to work with separate deployments:
A Web App under the same name (e.g. myapp.azurewebsites.net) is going to be managed by a single deployment. That is, if you have two github repo's (or two dropbox folders, or two of anything) and try to push up new content from deployment B, you'll effectively wipe out deployment A.
You can certainly have multi-path apps running in the same deployment, but they'd need to be part of a single distribution (e.g. single github repo). Otherwise, you'd need multiple deployment slots (e.g. app-a.azurewebsites.net and app-b.azurewebsites.net).
Maybe you can use virtual directory to upload multiple app projects in single webapp, this article explained it
Create projects
Assign virtual directory
Publish the root project
Set up virtual directory in azure portal
Publish the child projects
In my organization, there is a process where in for every new website/application to be added into the IIS, we have to go through a 6 weeks complex process and waiting. Even after the process completes the team will not have access to IIS. We can only deploy the build files using TFS, web deploy etc.
I have initiated the process for my first application/site in the IIS. I wanted to know if there is a way I can avoid future request/process for new application, by making this upcoming application an application of applications :). Something like child applications. But remember I do not have IIS access. I still have access to my application's web config. I also have the freedom to manage URL structures/patterns.
Either by using multiple routes, multiple projects etc. Just thinking loud. My applications will be of type web api, mvc etc
Any crazy ideas? Thanks in advance.
You can have several application roots in IIS, which can be virtual or real directories, under the same site.
Those separate applications will have separate configs and will not inherit each other's settings.
You can access your apps under the same domain, or to be configured to use different domains
http://www.domain.com/app1, http://www.domain.com/app2
They can share the same app pool or be configured to use different.
Since you don't have an access to IIS, I'm not sure how would you configure the app pool or domain, but perhaps Microsoft.Web.Administration namespace will help doing this from code. It contains managed classes to manage all aspects of IIS, including the configuration . It can be used from .Net or from PowerShell.
Creating Sites and Virtual Directories Using System.DirectoryServices
Using IIS Programmatic Administration
My goal is to create a service that will allow someone to register their own domain (so, many domains being used), and have that domain point to a specific service/template within a single web application.
Is this possible using URL rewriting or some other method? I want to have a vanity domain that would essentially act as the unique identifier within my application...
So instead of www.myapplicationdomain.com/site/1 and www.myapplicationdomain.com/site/2, i could allow a vanity domain that my application would utilize.
www.customwdomain.com = application/site/1
www.bettercustomwdomain.com = application/site/2
Is this possible, or would i essentially have to dynamically create new websites in IIS and drop files in those folders that the domain would point to? I know IIS can support multiple websites on the same host, but I was trying to take it a step further.
I guess my question is very similar to this question:
IIS with multiple domains on one single web application
Some considerations:
Trying to make this work on Azure shared hosting
I don't want to use sub-domains
I want the vanity domain to always be in use (e.g. not a redirect)
It is possible.
We have an Ecommerce web application that has many web domains being pointed to it, each with their own unique interface. This is entirely dependent on technologies of the Apache software foundation, and I'm not aware of a way to do this without a web server sorting out domains for the application.
We rely on Apache HTTP server for Virtualhost configurations (the listener & configs for each domain), and for serving static content.
We rely on Apache Tomcat for the single Java app that displays most of the interface and functionality. The Apache HTTP server is configured to pass relevant traffic to the Java app.
Configure multiple custom domains to an web-app and then add application gateway at the front of the application. Now based on the application url redirect to the updated url of the website.
I wanted to host my WebApi project on azure. But I am not getting sure which way should i use to run it on azure. Like there are Websites, Cloud Services that contain Web role and Worker role. Then which one should i choose. If cloud service is the option then which one out of Web role and worker role is good?
Any help is appreciated.
For hosting a simple web API (that you can scale according to usage, etc.) you'll want to use Websites. Assuming you're not looking for more complex / heavy-weight features (network configuration, more complex architectures e.g. offloading background processing different instances via queueing mechanisms, RDP into the host machine, etc.), then Websites are becoming the de-facto way to host websites on Azure.
The following page from the Azure documentation will give you a full feature comparison between the two:
http://azure.microsoft.com/en-us/documentation/articles/choose-web-site-cloud-service-vm/, but in short, if you simply have a web API project in VS that you want to host in Azure without worrying about the underlying infrastructure, then use Websites.
If you only want to host a Headless (No Web Interface) Web API, I recommend you using Azure Web Service - Web Role.
For Worker Role, it is like a console application that you want to use it to process background task. Normally, we use it to process from Message Queue (Azure Service Bus - Queue).
Azure create a Optimize VM to run those two type of Roles with no unnecessary junks. So you will get the most of it.
However, I still suggest you to read more detail document from azure website to see what environment which is best fit for your long term plan.
You need to login in Azure (https://manage.windowsazure.com) -> Web Sites -> Create New
After that you will find the Name of the Web Site Under the Web Sites.
Click Web Sites -> Select New Created Web Site -> Go TO -> Deployement
In Deployement -> Find -> Integrate source control
Select Appropriate Option i.e GitHub or Dropbox etc..
Using Dropbox => Now Publish your WebApi Project and Paste that Data into Dropbox Folder With the same name of your New Created Web Site in Azure
After Upload Go To -> Azure -> Select Web Site -> Deployement -> Sync.
It will take all the data from Dropbox and You can run your WebApi Project From Azure
More Details Link, Link2, Link3