Copyright © 2011 Pearson Addison-Wesley Web Servers and Projects Deployment Chapter 11 – Slide 1.

Slides:



Advertisements
Similar presentations
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
Advertisements

 2004 Prentice Hall, Inc. All rights reserved. Chapter 21 – Web Servers (IIS and Apache) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3 System.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 21 – Web Servers (IIS and Apache) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3 System.
Web App Development with ASP.NET. Introduction In this chapter, we introduce web-app development with Microsoft’s ASP.NET technology. Web-based apps create.
1 Chapter 12 Working With Access 2000 on the Internet.
XP Browser and Basics1. XP Browser and Basics2 Learn about Web browser software and Web pages The Web is a collection of files that reside.
Introduction to Web Database Processing
Web Servers How do our requests for resources on the Internet get handled? Can they be located anywhere? Global?
Introduction to Web Interface Technology (CSE2030)
1 Software Testing and Quality Assurance Lecture 32 – SWE 205 Course Objective: Basics of Programming Languages & Software Construction Techniques.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
 2008 Pearson Education, Inc. All rights reserved Web Servers (IIS and Apache)
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Hands-On Microsoft Windows Server 2008 Chapter 8 Managing Windows Server 2008 Network Services.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
17 Web Servers (Apache and IIS)
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
1 Web Servers (IIS and Apache) Outline 9.1 Introduction 9.2 HTTP Request Types 9.3 System Architecture 9.4 Client-Side Scripting versus Server-Side Scripting.
CSCI 323 – Web Development Chapter 1 - Setting the Scene We’re going to move through the first few chapters pretty quick since they are a review for most.
INTRODUCTION TO WEB DATABASE PROGRAMMING
9-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Bookstore Web Application Introducing Visual Web Developer 2008 Express and the.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 29.1 Multi-Tier Architecture 29.2 Web Servers.
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
1 Web Server Concepts Dr. Awad Khalil Computer Science Department AUC.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Chapter 1: Introduction to Web
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
2013Dr. Ali Rodan 1 Handout 1 Fundamentals of the Internet.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
CIM6400 CTNW (04/05) 1 CIM6400 CTNW Lesson 6 – More on Windows 2000.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
E-Commerce: Introduction to Web Development 1 Dr. Lawrence West, Management Dept., University of Central Florida Topics What is a Web.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 21 - Web Servers (IIS, PWS and Apache) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3.
Tutorial 1: Browser Basics.
Course ILT Internet/intranet support Unit objectives Use the Internet Information Services snap-in to manage IIS, Web sites, virtual directories, and WebDAV.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
 2004 Prentice Hall, Inc. All rights reserved. 1 Segment – 6 Web Server & database.
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Chapter.
1 Welcome to CSC 301 Web Programming Charles Frank.
1 Web Servers (Chapter 21 – Pages( ) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3 System Architecture.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2 Revised by Dr. T. Tran for CSI3140.
 2008 Pearson Education, Inc. All rights reserved. Chapter 17 Web Servers (Apache and IIS) Internet & World Wide Web How to Program, 5/e.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Fundamentals.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Introduction and Principles Web Server Scripting.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Website Design, Development and Maintenance ONLY TAKE DOWN NOTES ON INDICATED SLIDES.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Web Technology Seminar
Web Development Web Servers.
E-commerce | WWW World Wide Web - Concepts
E-commerce | WWW World Wide Web - Concepts
IS333D: MULTI-TIER APPLICATION DEVELOPMENT
17 Web Servers (Apache and IIS)
17 Web Servers (Apache and IIS)
Web Servers (IIS and Apache)
Presentation transcript:

Copyright © 2011 Pearson Addison-Wesley Web Servers and Projects Deployment Chapter 11 – Slide 1

Copyright © 2011 Pearson Addison-Wesley Web Servers &Projects Deployment HTTP Transactions Multitier Application Architecture Client-Side Scripting versus Server-Side Scripting Accessing Web servers Deploying ASP.NET Web Developer Express Deploying MVC Sites and Web Applications IIS Chapter 11 – Slide 2

Copyright © 2011 Pearson Addison-Wesley A web server responds to client requests (typically from a web browser) by providing resources such as HTML documents. When users enter a Uniform Resource Locator (URL) address, such as into a web browser, they’re requesting a specific document from a web server. The web server maps the URL to a resource on the server (or to a file on the server’s network) and returns the requested resource to the client. A web server and a client communicate using the platform- independent Hypertext Transfer Protocol (HTTP), a protocol for transferring requests and files over the Internet or an intranet. 3 Introduction © by Pearson Education, Inc. All Rights Reserved.

Copyright © 2011 Pearson Addison-Wesley URIs (Uniform Resource Identifiers) identify resources on the Internet. URIs that start with are called URLs (Uniform Resource Locators). Common URLs refer to files, directories or server- side code that performs tasks, such as database lookups, Internet searches and business-application processing. A URL contains information that directs a browser to the resource that the user wishes to access. indicates that the HyperText Transfer Protocol (HTTP) should be used to obtain the resource. 4 HTTP Transactions © by Pearson Education, Inc. All Rights Reserved.

Copyright © 2011 Pearson Addison-Wesley Next in the URL is the server’s fully qualified hostname – the name of the web-server computer on which the resource resides. A hostname is translated into an IP (Internet Protocol) address—a numerical value that uniquely identifies the server – An Internet domain name system (DNS) server maintains a database of hostnames and their corresponding IP addresses and performs the translations automatically The remainder of the URL after the hostname specifies the resource’s location (/books) and name on the web server For security reasons the path location is typically a virtual directory. The web server translates the virtual directory into a real location on the server, thus hiding the true location of the resource 5 HTTP Transactions (Cont.) © by Pearson Education, Inc. All Rights Reserved.

Copyright © 2011 Pearson Addison-Wesley When given a web page URL, a web browser uses HTTP to request and display the web page found at that address. HTTP method get indicates that the client wishes to obtain a resource from the server. The remainder of the request provides the path name of the resource (e.g., an HTML5 document) and the protocol’s name and version number ( HTTP/1.1 ). Any server that understands HTTP can receive a get request and respond appropriately. HTTP status code 200 indicates success. Status code 404 informs the client that the web server could not locate the requested resource. A complete list of numeric codes indicating the status of an HTTP transaction can be found at 6 HTTP Transactions (Cont.) © by Pearson Education, Inc. All Rights Reserved.

Copyright © 2011 Pearson Addison-Wesley Next, the server sends one or more HTTP headers, which provide additional information about the data that will be sent. The Multipurpose Internet Mail Extensions (MIME) standard specifies data formats, which programs can use to interpret data correctly. The MIME type text/plain indicates that the sent information is text that can be displayed directly. The MIME type image/jpeg indicates that the content is a JPEG image. When the browser receives this MIME type, it attempts to display the image. The header or set of headers is followed by a blank line, which indicates to the client browser that the server is finished sending HTTP headers. 7 HTTP Transactions (Cont.) © by Pearson Education, Inc. All Rights Reserved.

8

9

Copyright © 2011 Pearson Addison-Wesley Web-based applications are often multitier applications that divide functionality into separate tiers. Although tiers can be located on the same computer, the tiers of web-based applications typically reside on separate computers. The bottom tier (also called the data tier or the information tier) maintains the application’s data. The middle tier implements business logic, controller logic and presentation logic to control interactions between the application’s clients and its data. Business logic in the middle tier enforces business rules and ensures that data is reliable before the server application updates the database or presents the data to users. Business rules dictate how clients can and cannot access application data, and how applications process data. The top tier, or client tier, is the application’s user interface. In response to user actions, the client tier interacts with the middle tier to make requests and to retrieve data from the information tier. The client tier then displays the data retrieved for the user. The client tier never directly interacts with the information tier. 10 Multitier Application Architecture © by Pearson Education, Inc. All Rights Reserved.

11

Copyright © 2011 Pearson Addison-Wesley Client-side scripting can be used to validate user input, to interact with the browser, to enhance web pages, and to add client/server communication between a browser and a web server. Client-side scripting does have limitations, such as browser dependency; the browser or scripting host must support the scripting language and capabilities. Client-side scripts can be viewed by the client by using the browser’s source-viewing capability. Sensitive information, such as passwords or other personally identifiable data, should not be stored or validated on the client. 12 Client-Side Scripting versus Server-Side Scripting © by Pearson Education, Inc. All Rights Reserved.

Copyright © 2011 Pearson Addison-Wesley Placing large amounts of JavaScript on the client can open web applications to security issues. Code executed on the server often generate custom responses for clients. Server-side scripting languages have a wider range of programmatic capabilities than their client-side equivalents. 13 Client-Side Scripting versus Server-Side Scripting (Cont.) © by Pearson Education, Inc. All Rights Reserved.

Copyright © 2011 Pearson Addison-Wesley To request documents from web servers, users must know the hostnames on which the web server software resides. Users can request documents from local web servers or remote web servers. Local web servers can be accessed through your computer’s name or through the name localhost —a hostname that references the local machine and normally translates to the IP address (also known as the loopback address). 14 Accessing Web Servers © by Pearson Education, Inc. All Rights Reserved.

Copyright © 2011 Pearson Addison-Wesley Deploying ASP.NET Websites Difficulties of deploying your application ASP.NET is. – First, unlike many traditional scripting languages such as PHP or classic ASP, ASP.NET is compiled. – Second, SQL Server databases are not as easily transportable – Third, the complex nature of the framework may lead that work in development on your local machine fail on your remote web server, still possible to deploy ASP.NET applications quite easily using Visual Web Developer Express and the SQL Server Hosting Toolkit. Chapter 11 – Slide 15

Copyright © 2011 Pearson Addison-Wesley Using Visual Web Developer Express to Deploy ASP.NET Websites The principal tool that Visual Web Developer Express offers to help you deploy your website is the Copy Website feature. It can be found through the Solution Explorer (it’s the second button from the left) or via the Website menu’s Copy Website… item. The deployment tools also support the deployment of the file system, a local IIS instance, a remote IIS instance using Front Page Server extensions, and/or a remote server via FTP. Chapter 11 – Slide 16

Copyright © 2011 Pearson Addison-Wesley Using Visual Web Developer Express to Deploy ASP.NET Websites 1. Click on the Website menu and select Copy Website… to open the website copy tool. 2. Click on the Connect button and leave File System selected. It’s here that, when transferring your website to a remote host, you’d choose FTP and configure the connection using the credentials provided by your host or your network administrator. For now, we’ll practice the process using the local file system. 3. Select a folder to deploy to. Since we’re just practicing, and we’ll remove it later, let’s create a temporary folder for the time being. Type C:\mywebsiteTemp 4. into the Folder field and click Open. Click Yes when prompted, to create the folder. Your screen should now look like Figure Chapter 11 – Slide 17

Copyright © 2011 Pearson Addison-Wesley Using Visual Web Developer Express to Deploy ASP.NET Websites Chapter 11 – Slide Select all the files in your Source Web site panel and click on the double arrow button to synchronize all selected files. There should now be an identical list in both panes of the display

Copyright © 2011 Pearson Addison-Wesley Using Visual Web Developer Express to Deploy ASP.NET Websites To update any file after editing Save the file and open the Copy Website tool again. Note that there is now a blue arrow next to the Default.aspx file icon and the status is now listed as Changed. Select everything and click the double-arrow button again. Since we’re working locally, the action will be a little too quick for us to catch, but if we click the View Log… button, we should see that, even though we had all the files selected, only the Default.aspx has been updated: Chapter 11 – Slide 19

Copyright © 2011 Pearson Addison-Wesley Deploying MVC Sites and Web Applications One of the main differences between websites and web applications is how they are deployed. Websites will deploy all the code files, including the source code, to your hosting server. – The first browser request for a page on your site will cause IIS to compile your.cs files. Subsequent requests don’t have this compilation step unless your code files have changed. – If you need to make a change on the server, you can do so quite quickly. You do not have an App_Code folder as part of Web Applications, as your project is compiled into a single DLL for deployment, along with only your designer.aspx files. One of the newer features of Visual Web Developer 2010 is the ability to publish these web applications automatically to the server or to a file system. This is will include the step for compiling your site into the DLL and copying the views only. To do right-click on the project and select Publish. You will see a similar screen Chapter 11 – Slide 20

Copyright © 2011 Pearson Addison-Wesley Deploying MVC Sites and Web Applications Chapter 11 – Slide 21

Copyright © 2011 Pearson Addison-Wesley Deploying using IIS Chapter 11 – Slide 22 Installing IIS in Windows The process for enabling IIS 7.5 (in Windows 7) or IIS 7 (in Windows Vista) is the same. In both versions of Windows, IIS is included but not initially installed. To switch it on, you need to follow these steps: 1. Click Start, and then click Control Panel. 2. Choose Programs and Features. 3. In the task list (on the left), click the “Turn Windows features on or off” link. Now you’ll need to wait while Windows examines your system. 4. Find the Internet Information Services item near the top of the list (see Figure 26-2), and click it (so that the square next to the item becomes filled in).

Copyright © 2011 Pearson Addison-Wesley IIS in the same way you need to add the following Chapter 11 – Slide 23

Copyright © 2011 Pearson Addison-Wesley Chapter 11 – Slide 24 How to Deploy ASP. Net Websites on IIS 7.0 From now onwards, I will describe one example to deploy your ASP.NET websites on IIS 7.0. Step 0: change web.config file to Step 1: From Visual Studio, publish your Web application. Step 2: Copy the published application folder to "C:\intepub\wwwroot" [default] folder. Step 3: From Control Panel  Administrative tool  Internet Information Services (IIS) 6.0 The following screen will come.

Copyright © 2011 Pearson Addison-Wesley Chapter 11 – Slide 25 Step 4: We need to convert it to an application, just right click and then Click on "ConvertToApplication" as shown in the following picture:

Copyright © 2011 Pearson Addison-Wesley IIS Chapter 11 – Slide 26 In case you got the following error when loading the asp page HTTP Error Internal Server Error Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

Copyright © 2011 Pearson Addison-Wesley Refrences Chapter 11 – Slide 27 Deitel & Deitel (2011), Internet and World Wide Web How to Program, 5th Edition, Harvey & Paul Deitel& Associates.