Download presentation
Presentation is loading. Please wait.
Published byRosaline Whitehead Modified over 6 years ago
1
Jon Galloway | Tech Evangelist Christopher Harrison | Head Geek
07 | Deploying to Windows Azure Jon Galloway | Tech Evangelist Christopher Harrison | Head Geek
2
Module Overview Deploying a Web Application
3
Lesson 1: Deploying a Web Application
16: Deploying ASP.NET MVC 4 Web Applications Demonstration: How to Create a Windows Azure Website
4
ASP.NET MVC 4 Dependencies
16: Deploying ASP.NET MVC 4 Web Applications ASP.NET MVC 4 dependencies include: The ASP.NET Framework 4.0 Common Language Runtime (CLR) The MVC 4 runtime A Database server Entity Framework Membership Providers Question: Why should we use specific mapping for IIS 6.0 or earlier or IIS 7.0 in classic mode? Answer: We should use specific mapping for IIS 6.0 or earlier, because these versions of IIS are not configured to route all request to ASP.NET engine. You can mention that mapping all requests to ASP.NET engine is a good approach, because it will not require changes to applications. This approach eliminates the need to retest the application. Different techniques for deploying such dependencies are covered later in this module.
5
Deploying Web Applications to Single Server Farms
16: Deploying ASP.NET MVC 4 Web Applications To deploy an application on a single server farm: Set up the web application in IIS Configure application pools You can run many applications in the same application pool You can install an application in a specific isolated application pool Copy the web application files to IIS Question: What is the purpose of configuring additional application pools? Answer: Configuring additional application pools allow different application configurations, such as user accounts. You can use a dedicated application pool for each application to allow dedicated IIS process to handle requests for different application to increase redundancy. Using the Visual Studio deployment tools to copy web application files to an IIS web server is covered in detail, in Lesson 2.
6
Deploying Web Applications to Multi-Server Farms
16: Deploying ASP.NET MVC 4 Web Applications Characteristics of deploying applications to multi-server farms: Multi-server web farms help increase performance, resilience, and reliability It has greater capacity than a single server farm To deploy your web application to a multi-server farm: Create IIS applications and application pools on each server Create a matching IIS configuration on each server Use external hosted session state or session affinity Configure machineKey element in the web.config file Question: What is the purpose of configuring the machineKey element in the web.config file? Answer: Configuring the machineKey element ensures that the same key is used for encrypting and decrypting content stored in the session state or configuration file.
7
Deploying Web Applications on Windows Azure
16: Deploying ASP.NET MVC 4 Web Applications To deploy an application on Windows Azure: Create a new web application in the Windows Azure management portal Download a publishing profile Start the Publish wizard and import the publishing profile Configure connection strings Observe that Microsoft Visual Studio publishes the web application on Windows Azure Question: How does Windows Azure cloud services help enhance the flexibility of the application? Answer: Windows Azure cloud services help separate user interface logic that you build in a web-role project, from business logic that you build in a worker process project. This separation provides greater flexibility, and it enables calling the business logic from other processes, such as mobile applications. You can use Microsoft Visual studio to deploy applications to Windows Azure. However, to avoid accidental deployment to Windows Azure, you may wish to avoid using Microsoft Visual Studio for deployment. Instead, They use service packages, since they provide more control over the deployment process.
8
Reviewing Configuration for Production
16: Deploying ASP.NET MVC 4 Web Applications While reviewing the configuration for production: Include the transformation elements in the following web.config transformation files for generating resultant web.config files: Web.release.config Web.debug.config Modify the web.config file by using the debug, xdt:Transform, and Insert attributes Question: How can you configure the web.config file for publishing to a production environment, without using web.config configuration files? Answer: You can edit the web.config file manually. Such a configuration will apply to production, debug and other configurations. You can add additional web.config transform files for use in different configurations.
9
Deploying to Windows Azure
16: Deploying ASP.NET MVC 4 Web Applications In the next demo, you will show the students how to publish an ASP.NET MVC web application to such a website for production. Preparation Steps Log on to the virtual machine, 20486A-SEA-DEV11, with the user name, admin, and the password, Pa$$w0rd. Note: In Hyper-V Manager, start the MSL-TMG1 virtual machine if it is not already running. Demonstration Steps 1. On the taskbar, click the Internet Explorer icon. 2. In the Address bar of the Internet Explorer window, type and then click the Go to button. 3. In the upper-right corner of the Windows Azure: Microsoft’s Cloud Platform | Cloud Hosting | Cloud Services page, click PORTAL. 4. On the Sign in to your Microsoft account page, in the Microsoft account box, type <your username>, in the Password box, type Pa$$w0rd, and then click Sign in. 5. In the left pane of the Windows Azure page, click WEB SITES. 6. In the lower-left pane of the Windows Azure page, click NEW, and then click CUSTOM CREATE. 7. In the URL box of the Create Web Site page, type <your username>operas, and then, in the REGION box, click <A region near you>. 8. In the DATABASE box of the Create Web Site page, click Create a new SQL database, in the DB CONNECTION STRING NAME box, type OperasDB, and then click the Next button. 9. In the NAME box of the Specify database settings page, type OperasDB, in the SERVER box, click New SQL Database server, and then, in the LOGIN NAME box, type <your first name>. 10. In the PASSWORD box of the Specify database settings page, type Pa$$w0rd, in the PASSWORD CONFIRMATION box, type Pa$$w0rd, and then click the Complete button. Deploying to Windows Azure (More notes on the next slide)
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.