IIS and Deployment of ASP.NET Applications

26
Svetlin Nakov Telerik Software Academy academy.telerik.com Technical Trainer http://nakov.com IIS and Deployment of ASP.NET Applications

description

IIS and Deployment of ASP.NET Applications. Svetlin Nakov. Telerik Software Academy. academy.telerik.com. Technical Trainer. http://nakov.com. Table of Contents. IIS Intro & History Installing IIS / IIS Express Deploying ASP.NET Apps in IIS Sites, Application Pools, Applications - PowerPoint PPT Presentation

Transcript of IIS and Deployment of ASP.NET Applications

Page 1: IIS and Deployment of ASP.NET Applications

Svetlin Nakov

Telerik Software Academyacademy.telerik.com

Technical Trainerhttp://nakov.com

IIS and Deployment of ASP.NET

Applications

Page 2: IIS and Deployment of ASP.NET Applications

Table of Contents1. IIS Intro & History2. Installing IIS / IIS Express3. Deploying ASP.NET Apps in IIS

Sites, Application Pools, Applications Deploying Simple ASP.NET application Deployment of Data-Driven application

4. Web Publishing from Visual Studio

2

Page 3: IIS and Deployment of ASP.NET Applications

Internet Information Services (IIS 6.0 /

7.0 / 7.5 / 8.0)

Page 4: IIS and Deployment of ASP.NET Applications

Internet Information Services

IIS is a Web server (HTTP server) Microsoft's Web server Part of Windows Server Can process static and dynamic

content (through the ISAPI interface)

Handles ASP.NET requests through the ISAPI extension for .NET Framework w3wp.exe hosts the application pools

which host the ASP.NET runtime and ASP.NET apps

ISAPI filter – aspnet_filter.dll

4

Page 5: IIS and Deployment of ASP.NET Applications

IIS – Versions IIS 5.1 (Windows XP)

10 simultaneous connections, a single Web site

IIS 6.0 (Windows Server 2003) Faster and more secure, application

pools IIS 7.0 (Windows Vista / Server 2008) Can restrict machine resources per

user / app IIS 7.5 (Windows 7 / Server 2008 R2) IIS Express – limited developer

edition IIS 8 (Windows Server 2012)

5

Page 6: IIS and Deployment of ASP.NET Applications

Installing IISTurn On / Off Windows Features, Web

PI

Page 7: IIS and Deployment of ASP.NET Applications

Installing IIS IIS is part of Windows (Win7, Win8, Windows Server 2008, Windows Server 2012, …) Installed by "Turn Windows features

on or off"

7

Page 8: IIS and Deployment of ASP.NET Applications

Installing IIS (2) Select Internet Information Services + ASP.NET 4.5 + IIS Management Console

8

Page 9: IIS and Deployment of ASP.NET Applications

Web Platform Installer Web Platform Installer (Web PI)

Installs Web servers, applications and tools

9

Page 10: IIS and Deployment of ASP.NET Applications

DeployingASP.NET Apps in IIS

Sites, Applications, Application Pools, Databases

Page 11: IIS and Deployment of ASP.NET Applications

Web Sites in IIS Sites in IIS

Instances of the Web server Hosting files and applications

Bind to some protocol + host + port E.g. http://nakov.com,

https://localhost:8443

11

Page 12: IIS and Deployment of ASP.NET Applications

Application Pools in IIS Application Pools host Web applications in IIS A process group that run the

ASP.NET runtime Can configure CPU usage, memory

limits, identity (local user that owns the processes)

12

Page 13: IIS and Deployment of ASP.NET Applications

Applications in IIS Applications in IIS:

Physical directory with files (application code)

Belong to some existing Web site Run in some existing application

pool

13

Page 14: IIS and Deployment of ASP.NET Applications

Creating an Application in IIS

14

Page 15: IIS and Deployment of ASP.NET Applications

Creating an Application in IIS (2)

15

Page 16: IIS and Deployment of ASP.NET Applications

Creating an Application in IIS (3)

16

Page 17: IIS and Deployment of ASP.NET Applications

Hosting Simple ASP.NET Application

in IISLive Demo

Page 18: IIS and Deployment of ASP.NET Applications

What Files to Deploy? Files to copy to the IIS application directory: Pages & controls: *.aspx, *.Master, *.ascx

Resources: *.jpg, *.png, *.gif , *.css, *.js

Compiled C# files: bin\*.dll Config files: Web.config, Global.asax

Don't deploy these files: Source code: *.cs, *.csproj, *.sln Databases: *.mdf / *.ldf (deploy

separately)

18

Page 19: IIS and Deployment of ASP.NET Applications

Configuring Database Permissions for SQL

Server Typically in IIS your application runs under the user "IIS APPPOOL\DefaultAppPool" It has no access to SQL Server by

default To access SQL Server DB from IIS:

Change the connection string in Web.config during the deployment

Create a user "IIS APPPOOL\DefaultAppPool" for your DB in SQL Server

Assign "db_owner" database role

19

Page 20: IIS and Deployment of ASP.NET Applications

Creating IIS user in SQL Server

Creating and configuring the "IIS APPPOOL\DefaultAppPool" in SQL Server

20

Page 21: IIS and Deployment of ASP.NET Applications

Web Publishing from VSPublish Web App from VS to IIS

Page 22: IIS and Deployment of ASP.NET Applications

Web Publishing in VS Visual Studio have a Web Publishing wizard Deploys ASP.NET apps to remote IIS

22

Page 23: IIS and Deployment of ASP.NET Applications

Web Publishing from VS

Live Demo

Page 24: IIS and Deployment of ASP.NET Applications

форум програмиране, форум уеб дизайнкурсове и уроци по програмиране, уеб дизайн – безплатно

програмиране за деца – безплатни курсове и уроцибезплатен SEO курс - оптимизация за търсачки

уроци по уеб дизайн, HTML, CSS, JavaScript, Photoshop

уроци по програмиране и уеб дизайн за ученициASP.NET MVC курс – HTML, SQL, C#, .NET, ASP.NET MVC

безплатен курс "Разработка на софтуер в cloud среда"

BG Coder - онлайн състезателна система - online judge

курсове и уроци по програмиране, книги – безплатно от Наков

безплатен курс "Качествен програмен код"

алго академия – състезателно програмиране, състезанияASP.NET курс - уеб програмиране, бази данни, C#, .NET, ASP.NET

курсове и уроци по програмиране – Телерик академия

курс мобилни приложения с iPhone, Android, WP7, PhoneGapfree C# book, безплатна книга C#, книга Java, книга C# Дончо Минков - сайт за програмиране

Николай Костов - блог за програмиранеC# курс, програмиране, безплатно

?? ? ?

??? ?

?

? ?

??

?

?

? ?

Questions?

?

IIS and Deployment of ASP.NET Applications

http://academy.telerik.com

Page 25: IIS and Deployment of ASP.NET Applications

Homework1. Deploy a simple ASPX web page

(without a database) in IIS manually (don't use any tool).

2. Create an ASP.NET Web application that displays some data from the Northwind database. Deploy the application is IIS through Visual Studio.

3. * Create a Web app in IIS which saves an empty file in C:\WINDOWS directory. Configure the IIS and directory security so that the IIS process has sufficient permissions to write in this directory. 25

Page 26: IIS and Deployment of ASP.NET Applications

Free Trainings @ Telerik Academy

"Web Design with HTML 5, CSS 3 and JavaScript" course @ Telerik Academy html5course.telerik.com

Telerik Software Academy academy.telerik.com

Telerik Academy @ Facebook facebook.com/TelerikAcademy

Telerik Software Academy Forums forums.academy.telerik.com