Dynamically Create Web App In Azure Via Code - api

Using Azure, is it possible to dynamically create a web app and copy/publish files to that new web app via an Azure API? Here's my scenario:
1] Customer signs up for services in our application
2] We want to automatically generate a subdomain for the new customer (i.e. customername.ourapplication.com)
3] We want to create a copy of our core files for our web app into a new Azure Web App that the subdomain is pointed to.
Does this type of automation exist in Azure? If not, what other services are out there that can do this? We've seen it happen with other apps across the web and were wondering where we should start.

Yes, the Azure Resource Manager (ARM) API allows your to provision and modify Azure web apps.
You can access the ARM API directly via the REST Api, via Powershell commandlets, or via the Azure CLI api

Related

Azure Functions - ASP.NET Webforms app deployment

I can't find an example code for publishing ASP.NET Webforms websites to Azure Functions. Months ago I tried to replicate the C# example but I ended up with only being able to use the precompiled batch function type.
I want to publish VB.NET web apps - any framework version, using Web Deploy...
Here are some important concepts you should know about Azure Web App and Azure Function:
Azure Web App:
Azure Web App is a sand box. The only way an Azure web app can be accessed via the internet is through the only two already-exposed HTTP (80) and HTTPS (443) TCP ports.
For Nodejs App deployed to Azure, Azure will create a named pipe for your server to listen, and pass the request from 443 port(as you use https) to the named pipe.
Azure Function:
Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. You can write just the code you need for the problem at hand, without worrying about a whole application or the infrastructure to run it. Functions can make development even more productive, and you can use your development language of choice, such as C#, F#, Node.js, Python or PHP. Pay only for the time your code runs and trust Azure to scale as needed. Azure Functions lets you develop serverless applications on Microsoft Azure.
Api apps and Web apps are pretty much the same deal. Logic Apps and Functions are the same in a sense that they allow you to do something as a response to event or on a schedule, but Functions are a way to run code (or existing app) and Logic Apps are more like a workflow constructor, where you take existing actions and chain them (so no coding, or almost no)
Deploy:
Use ftp to deploy your web form to Azure Function. There will be no problems with the deployment, but the webpage will not display.
Note:
Although Azure Function and Azure Web App are very similar in many cases. But if you choose to deploy web form app, you will still find differences. Even if you can deploy your project to Azure Web App, it won’t display any webpages.

Can I use Azure Mobile (Zumo) authentication with SPA apps on a mobile device?

I'm interested in using Azure Mobile services with SPA applications... perhaps with PhoneGap and or Kendo.UI as well.
I would like to add authentication to my app, and am looking at Azure Mobile Services. What isn't clear to me is if I can use Zumo (mobile services) to authenticate my app?
Example
User downloads app from store (or uses HTML5 caching to store the app)
The SPA app connects to Azure Mobile to get the OAUTH credentials
The Credentials secure my REST calls to the database (as secured by Azure Mobile)
Can anyone clarify if this architecture is possible?
You can definitely do this. If you go into the quickstart page after creating a new Mobile Service, you'll see one of the supported platforms is HTML/JS. You can download that quickstart application to run a local website that will connect to your Mobile Service and can set up authentication using this flow (http://www.windowsazure.com/en-us/develop/mobile/tutorials/get-started-with-users-html/). Dropping this into a PhoneGap application is very simple and just requires downloading the jQuery and Mobile Service javascript files locally (phonegap can't reference remote JS files). The bulk of the HTML can be the exact same. You'll just need to take the JS from the HTML/JS quickstart and drop it into the onReady method (I believe that's what PhoneGap calls once the device is ready for you to use). Hope that helps.

What is the difference between an Azure Web Site and an Azure Web Role (July '13 edition)

Context:
Building new multi-tenant application using Azure SQL, Azure Table Storage, EF, Web API, MVC, Azure Cache, Possibly Worker Roles -- all the usual suspects:
Please see prior question asked/answered a while back (Jun '12): What is the difference between an Azure Web Site and an Azure Web Role
Side Note:
I'm leaning towards Web Role/Worker Role for Web API and Web Site for MVC/CMS frameworks (i.e., DotNetNuke)
I understand Web Sites are out of beta and have closed the gap with the Web Role in some respects.
Question:
I'm looking for an updated answer to the following:
What are the material differences between the new Azure Web Sites and the traditional Azure Web Roles for an ASP.NET MVC and an ASP.NET Web API application? What reason would I choose a "web site" over a "web role" or vice versa?
Nowadays you have the following execution models:
-Web Sites
-Cloud Services (Worker Role / Web Role)
-Mobile Services
-Virtual Machines
What are the differences between Cloud Services and Web Sites.
-Cloud Services:
You could integrate with Team Foundation Services and allow it to publish to Azure. (Continuous Delivery). With Cloud Services (Web Role), you have two environments in Azure, staging and production. You can use Staging to validate, and with one click (swap option), apply the new deployment package to production environment.
-Web Sites:
Web Sites is the right option when you want to create a simple web site. It is also a good choice for creating a low-administration web application, even one that must be quite scalable, or moving an existing IIS web app to the public cloud.
Cloud Services, which was the initial execution model provided by
Windows Azure, is an explicitly PaaS approach. While the line between
PaaS and web hosting is blurry, Cloud Services differs in some
important ways from Web Sites, including the following:
Unlike Web Sites, Cloud Services gives you administrative access to
your application’s VMs. This lets you install arbitrary software that
your application needs, something that’s not possible with Web Sites.
Because Cloud Services offers both web roles and worker roles, it’s a
better choice than Web Sites for multi-tier applications that need
separate VMs for their business logic. Cloud Services provides
separate staging and production environments, making application
updates somewhat smoother than Web Sites. Unlike Web Sites, you can
use networking technologies such as Windows Azure Virtual Network and
Windows Azure Connect to hook on-premises computers to Cloud Services
applications. Cloud Services lets you use Remote Desktop to connect
directly to an application’s VMs, something that’s not possible with
Web Sites.
http://www.windowsazure.com/en-us/manage/windows/fundamentals/compute/
More info:
http://www.windowsazure.com/en-us/manage/services/cloud-services/how-to-create-and-deploy-a-cloud-service/

How can I seperate service on the server?

I have two services i.e. jsf web app service and android service. Both are using the same functionality like login registration etc.
Now I have to separate both the services because I have used all the functionality in web app that same functionality I want to use it for android app..
So how can I deploy it on the server?
Like on the apache server in webapp folder there will be two subfolders webapp/android and webapp/webapp so where can I store all the *.java files(Which contains the login and communicate with database) on the server so that both of them can access the existing functionality.
Thanks

Web Service on Windows Azure?

I am new to Windows Azure and I have a question.
I have:
Web site which deployed to Windows Azure - The web site manage a table (add, edit, delete). I used this guide: Deploying an ASP.NET Web Application to a Windows Azure Web Site and SQL Database
Andorid application & iOS Application (Native Code).
Now, I want the mobile applications to get data (in JSON format) from the web site (and from the DB).
What is the best practice to do that?
I tried to create a Azure (WCF) Service (the project refrenced to the web site project) but I didn't succeded. If this is the way - Is anyone knows a good tutorial to do that?
Is there another option? Maybe from the web site itself?
Thank you very much,
Yuval
If you want to integrate with non-Microsoft technologies I suggest you take a look at the ASP.NET Web API which allows you to build REST services using content negotiation. Content negotiation allows your consumer to specify the format it requires (json, xml, ...).
To host the ASP.NET Web API in a Windows Azure Web Site you should take a look at Carlos' blog, he describes in detail what you need to do to make this work: Creating ASP.NET Web APIs on Azure Web Sites
Have you given ASP.NET Web API a look-see?
http://www.asp.net/web-api