Your SlideShare is downloading. ×
0
Deploying ASP.NET and MVC
applications to Azure

Glyn Darkin, Solutions Architect
18/04/2013

Our Awards:
What should you be mindful of as a developer if you are
considering Azure as a hosting platform?
Outside the scope of this discussion

•

Building for the Cloud

•

Cloud Service Worker Roles

•

Big Data

•

Mobile Ser...
Microsoft Azure for ASP.Net

SaaS

Websites

Media

Add-Ons

PaaS

Cloud
Services

Service
Bus

Distributed
Cache

IaaS

V...
Azure Website vs. Cloud Service Web Role
Comparison Matrix
Feature
Access to services like Caching, Service Bus, Storage, ...
Is Azure the only PaaS that can host ASP.NET?

•

There will be others

•

It’s a race to the bottom

•

Our Solutions sho...
Websites
Plain Vanilla Website
•

Replicates a Shared Hosting Platform but with elastic scalability

•

Can deploy a plain...
Cloud Service
Web Role
•

1 Cloud Service represents a single virtual machine

•

Part of a Cloud Solution

•

Requires th...
Things you need to keep in mind
Part 1
•

You need to use the Session State provider for Windows Azure Caching
–

•

You d...
Things to keep in mind
Part 2
•

There is no SMTP server in Azure
–
–

•

User a Service link SendGrid or MailGun
User Mes...
Deployment

Website

Cloud Service

Direct from TFS

Yes

Yes

Git, Mercurial, FTP

Yes

No

MSBuild, Powershell

Yes

Yes...
Demo
The default MVC website
•

Windows Azure Website
– http://version1.azurewebsites.net/

•

Windows Azure Cloud Service...
Comparison of the file structures
Windows Azure SQL
Same Same but different
•

Fully managed database environment

•

Not all T-SQL supported in Azure

•

S...
Conclusion
Recommendations
•

Websites uses everything you already know

•

CloudServices you have to learn new stuff

•

...
Q&A

&
Links

•

Azure Storage Explorer
– Blob, Table, Queue

•

CloudBerry Storage Explorer
– Blob with Sync
Upcoming SlideShare
Loading in...5
×

Deploying asp.net and mvc applications to azure

5,614

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
5,614
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Deploying asp.net and mvc applications to azure"

  1. 1. Deploying ASP.NET and MVC applications to Azure Glyn Darkin, Solutions Architect 18/04/2013 Our Awards:
  2. 2. What should you be mindful of as a developer if you are considering Azure as a hosting platform?
  3. 3. Outside the scope of this discussion • Building for the Cloud • Cloud Service Worker Roles • Big Data • Mobile Services
  4. 4. Microsoft Azure for ASP.Net SaaS Websites Media Add-Ons PaaS Cloud Services Service Bus Distributed Cache IaaS VMs Storage Network Hyper-V
  5. 5. Azure Website vs. Cloud Service Web Role Comparison Matrix Feature Access to services like Caching, Service Bus, Storage, SQL Azure Database Support for ASP.NET, classic ASP, Node.js, PHP Shared content and configuration Deploy code with GIT, FTP Near-instant deployment Multiple deployment environments (production and staging) Network isolation Remote desktop access to servers Ability to run programs with elevated permissions Ability to define/execute start-up tasks Ability to use unsupported frameworks or libraries Support for Windows Azure Connect/ Windows Azure Network Reference MSDN Blog Web Sites Web Roles Yes Yes Yes Yes Yes No Yes No Yes No No Yes No Yes No Yes No Yes No Yes No Yes No Yes
  6. 6. Is Azure the only PaaS that can host ASP.NET? • There will be others • It’s a race to the bottom • Our Solutions should be portable
  7. 7. Websites Plain Vanilla Website • Replicates a Shared Hosting Platform but with elastic scalability • Can deploy a plain vanilla ASP.NET website • No SDK dependencies • No IDE dependencies • You can deploy your site to other hosting providers – AWS, AppHarbour, Rackspace • 10 free sites with the domain http://seotools.azurewebsites.net • Entity framework is fully supported with migrations
  8. 8. Cloud Service Web Role • 1 Cloud Service represents a single virtual machine • Part of a Cloud Solution • Requires the Azure SDK & tools to be installed • Uses a VIP to switch between a Staging & Production instance – • Your code needs to reference the Azure SDK – • Staging DNS creation & resolution can be SLOW Therefore your product is not portable Local development emulator – – Learn to hack using shared resources – • Very slow code, test, debug cycle Is not the same as Azure, there are differences so be warned!!!! No local disk access
  9. 9. Things you need to keep in mind Part 1 • You need to use the Session State provider for Windows Azure Caching – • You don’t have write access to the file system – • TempData uses Session State You will need to store uploaded files in either Blob storage or SQL You are running behind a load balancer – Requests that last longer than 60secs are killed
  10. 10. Things to keep in mind Part 2 • There is no SMTP server in Azure – – • User a Service link SendGrid or MailGun User Message Bus to send message on premise and email from there Logging/Trace output – Websites: Tracing output is stored against the website on disk & can be accessed via FTP • – Cloud: Tracing has to be coded & configured & is stored in Table Storage • • Or Streamed into Visual Studio Output Window!!! It can be queried in Visual Studio Configuration – – • Websites: Web.config with transformations Cloud: ServiceDefinition.csdef and ServiceConfiguration.environment.cscfg Images – Push your images to the Azure CDN
  11. 11. Deployment Website Cloud Service Direct from TFS Yes Yes Git, Mercurial, FTP Yes No MSBuild, Powershell Yes Yes Visual Studio* Yes Yes Deployment Pipeline No Yes * You should never be deploying from Visual Studio
  12. 12. Demo The default MVC website • Windows Azure Website – http://version1.azurewebsites.net/ • Windows Azure Cloud Service – http://version2.cloudapp.net/
  13. 13. Comparison of the file structures
  14. 14. Windows Azure SQL Same Same but different • Fully managed database environment • Not all T-SQL supported in Azure • SQL Management Studio not fully supported • SQL Server replication not supported • Backup strategy is a little different – SYNC instead • Full-Text Search not supported • Full list of unsupported features • If you want to scale your database then KISS • BCP from the command line is fastest way to get all your data in • MS SQL Server Migration Wizard - http://sqlazuremw.codeplex.com/ http://msdn.microsoft.com/en-us/library/windowsazure/ff394115.aspx
  15. 15. Conclusion Recommendations • Websites uses everything you already know • CloudServices you have to learn new stuff • Start with Websites and migrate to a Cloud Service when you need to • Keep in mind that Azure is a moving target • Windows Azure SQL requires a very simple approach – Great for developers, not so much for the SQL DBA • You can always just spin up a VM for a legacy app
  16. 16. Q&A &
  17. 17. Links • Azure Storage Explorer – Blob, Table, Queue • CloudBerry Storage Explorer – Blob with Sync
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×