SlideShare a Scribd company logo
1 of 22
• ASP.NET Applications and the Web Server
• How Web Servers Work
• The Virtual Directory
• Web Application URLs
• Internet Information Services (IIS)
• Managing Websites with IIS Manager
• Understanding Application Pools
• The ASP.NET Account
• Configuring a Website
• Deploying a Simple Site
•   A specialized piece of software that accepts requests
    over Hypertext Transport Protocol (HTTP) and
    serves content.

•   When you’re running your web application in Visual
    Studio, you use the test web server that’s built in.

•   When you deploy your website to a broader
    audience, you need a real web server, such as IIS.

•   Web servers run special software to support mail
    exchange, FTP and HTTP access, and everything
•   else clients need in order to access web content.
•   The easiest job a web server has is to provide
    ordinary HTML pages. When you request such a file,
    the web server simply reads it off the hard drive (or
    retrieves it from an in-memory cache) and sends the
    complete document to the browser.

•   When you request the ASP.NET page, the web
    server sends the request over to the ASP.NET
    engine. The ASP.NET engine loads the requested
    page, runs the code it contains, and then creates the
    final HTML document, which it passes back to IIS.
    IIS then sends the HTML document to the client.
When you deploy your web application to a web server,
it’s exposed through something called a virtual directory.

A virtual directory is simply the public face of your website
directory.

For example, your website might exist in a directory on the
server named c:MySite. To allow remote users to access
this website through their browsers, you could expose it
as a virtual directory say MySite.

When the user requests a page in a virtual directory (say,
http://WebServer/MySite/Checkout.aspx), the web server
looks for the corresponding file in the corresponding
physical directory (c:MySiteCheckout.aspx).
You can use ASP.NET applications in a variety of different
environments, including local area networks (LANs) and
over the Internet.

On an IP network, each computer is given a unique number
called an IP address. IP addresses aren’t easy to
remember web servers on the Internet usually register
unique domain names such as www.microsoft.com.

Within an internal network computers can access your
website using either the IP address of your machine the
network computer name.
http://localhost/MyWebApp

http://MyWebServer/MyWebApp

http://www.MyDomain.com/MyWebApp

http://www.MyDomain.com/MyWebApp

http://localhost:2040/MyWebApp/Default.aspx
Instead of placing web application files on a single web
server, you place a copy on several separate web
servers.

 When a request is received for your website, it’s directed
to one of these web servers (based on which one has the
lightest load).

if you decide to update your application, you need to
make sure you update each web server in the web farm
with the same version to prevent discrepancies.
IIS exists in several different versions. The version of IIS
you use depends on the operating system you’re using:

•   Windows Server 2003 uses IIS 6, which isn’t covered in
    this book.
•   Windows Vista and Windows Server 2008 use IIS 7.
•   Windows 7 and Windows Server 2008 R2 use IIS 7.5

Windows Vista and Windows 7, are fine for development
testing, but they implement a connection limit to 10 users.
When IIS is installed, it automatically creates a directory
named c:inetpubwwwroot. Any files in this directory will
appear as though they’re in the root of your web server.

If you add the file TestFile.html to this directory, you can
request it in a browser through the URL

http://localhost/TestFile.html.

You can even create subdirectories

c:inetpubwwwroot MySiteMyFile.html
can be accessed as :

http://localhost/MySite/MyFile.html.
The easiest and most flexible way to create a virtual
directory is to use the IIS Manager utility

1. To create a new virtual directory for an existing
   physical directory, expand the node for the current
   computer, and expand the Sites node underneath.
2. Right-click the Default Web Site item, and choose
   Add Application.
3. Supply the alias. For example, if your alias is MyApp
   and your computer is MyServer, you can request
   pages using URLs such as
   http://MyServer/MyApp/MyPage.aspx.
4. Next, you need to choose the physical path
5. Next, you need to specify the application pool.
The web application pool sets a small group of low-level
settings that apply only to ASP.NET applications,

Such as the maximum number of requests to put on hold
before sending a “Service Unavailable” response to new
clients (by default, it’s 1000) etc.

Application pools include two settings that are uniquely
important and may require your customization:

•   The version of ASP.NET that IIS runs to process the
    requests in your website
•   The Windows account that IIS uses to run your website
When the web server runs your web application, it performs
all its work under a specific Windows user account that has a
carefully limited set of privileges. The actual account that’s
used depends on the web server you’re using:

• If you’re using the integrated test server in Visual Studio,
  the server runs under your account.
• If you’re using IIS 7, it’s the network service account. This
  is a special account that Windows creates when you first
  install it.
• If you’re using IIS 7.5, it’s an account that’s based on the
  application pool. For example, an application pool named
  ASP.NET v4.0 will use an account named IIS
  AppPoolASP.NET v4.0, which IIS generates automatically.
The website configuration settings are split into three
broad groups, which are arranged alphabetically:
ASP.NET, IIS, and Management.
IIS supports several different protocols that it can use
when authenticating a user with Windows authentication
Before you can use any type of Windows authentication, you need to install the
appropriate support for IIS. To add support, open the Control Panel, choose
Programs and Features, and then click the link “Turn Windows features on or
off.” Head to the Internet Information Services ➤ World Wide Web Services ➤
Security group
Once you have the authentication features you need installed, you simply need
to select your website in IIS manager and double-click the Authentication icon (in
the IIS group). Now you’ll see whatever authentication options you’ve installed.
All you need to do is follow these two simple steps:

1. Create the virtual directory on the web server.
2. Copy the entire site (including subdirectories) to
the virtual directory.

This is often called zero-touch deployment,
because you don’t need to manually configure web
server resources However, some applications are
more difficult to set up on a web server.
Here are some common factors that will require additional
configuration steps:
Databases: If your web application uses a database, you’ll need
to transfer the database to the web server. You can do this by
generating a SQL script that will automatically create the
database and load it with data.
Windows account permissions: Usually, a web server will run web
page code under a restricted account. This account might not be
allowed to perform the tasks you rely on, such as writing to files or
the Windows event log, or connecting to a database. In this case,
an administrator needs to specifically grant the permissions you
need to the account that runs the ASP.NET engine for your
website.
IIS security settings: If your website uses SSL encryption or
Windows authentication the virtual directory settings will need to
be tweaked. This also requires the help of
an administrator.
A command-line tool named aspnet_compiler.exe,
which is stored in the familiar directory.

c:WindowsMicrosoft.NETFramework64[Version]

You use this compiler on your development
machine before you deploy the application.

aspnet_compiler -m metabasePath targetDirectory
Visual Studio includes features that integrate with IIS
and allow you to create virtual directories without
leaving the comfort of your design-time environment.
Visual Studio has several deployment-related features:

• You can use the Copy Web Site feature to transfer
  an existing website to a virtual directory.
• You can use the Publish Web Site feature to compile
  your website and transfer it to another location.
Select Website ➤ Copy Web Site from the menu
Select Build ➤ Publish Web Site from the menu

More Related Content

What's hot

Hosting a website on IIS Server
Hosting a website on IIS ServerHosting a website on IIS Server
Hosting a website on IIS ServerDinesh Vasamshetty
 
2009 - Microsoft IIS Vs. Apache - Who Serves More - A Study
2009 - Microsoft IIS Vs. Apache - Who Serves More - A Study2009 - Microsoft IIS Vs. Apache - Who Serves More - A Study
2009 - Microsoft IIS Vs. Apache - Who Serves More - A StudyVijay Prasad Gupta
 
Web servers (l6)
Web servers (l6)Web servers (l6)
Web servers (l6)Nanhi Sinha
 
Web Servers: Architecture and Security
Web Servers: Architecture and SecurityWeb Servers: Architecture and Security
Web Servers: Architecture and Securitygeorge.james
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1Neeraj Mathur
 
Flex Introduction
Flex Introduction Flex Introduction
Flex Introduction senthil0809
 
ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1Kumar S
 
ASP, ASP.NET, JSP, COM/DCOM
ASP, ASP.NET, JSP, COM/DCOMASP, ASP.NET, JSP, COM/DCOM
ASP, ASP.NET, JSP, COM/DCOMAashish Jain
 
IIS for Developers
IIS for DevelopersIIS for Developers
IIS for DevelopersIdo Flatow
 
How to Harden the Security of Your .NET Website
How to Harden the Security of Your .NET WebsiteHow to Harden the Security of Your .NET Website
How to Harden the Security of Your .NET WebsiteDNN
 

What's hot (20)

Hosting a website on IIS Server
Hosting a website on IIS ServerHosting a website on IIS Server
Hosting a website on IIS Server
 
2009 - Microsoft IIS Vs. Apache - Who Serves More - A Study
2009 - Microsoft IIS Vs. Apache - Who Serves More - A Study2009 - Microsoft IIS Vs. Apache - Who Serves More - A Study
2009 - Microsoft IIS Vs. Apache - Who Serves More - A Study
 
ASP.NET Web form
ASP.NET Web formASP.NET Web form
ASP.NET Web form
 
Asp .net folders and web.config
Asp .net folders and web.configAsp .net folders and web.config
Asp .net folders and web.config
 
ASP
ASPASP
ASP
 
IIS 7.0 Architecture And Integration With Asp.Net
IIS 7.0 Architecture And Integration With Asp.NetIIS 7.0 Architecture And Integration With Asp.Net
IIS 7.0 Architecture And Integration With Asp.Net
 
Web Servers (ppt)
Web Servers (ppt)Web Servers (ppt)
Web Servers (ppt)
 
Introduction to asp
Introduction to aspIntroduction to asp
Introduction to asp
 
Web servers (l6)
Web servers (l6)Web servers (l6)
Web servers (l6)
 
IIS-Settings
IIS-SettingsIIS-Settings
IIS-Settings
 
Web Servers: Architecture and Security
Web Servers: Architecture and SecurityWeb Servers: Architecture and Security
Web Servers: Architecture and Security
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1
 
Flex Introduction
Flex Introduction Flex Introduction
Flex Introduction
 
Learn ASP
Learn ASPLearn ASP
Learn ASP
 
Web server
Web serverWeb server
Web server
 
ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1
 
ASP, ASP.NET, JSP, COM/DCOM
ASP, ASP.NET, JSP, COM/DCOMASP, ASP.NET, JSP, COM/DCOM
ASP, ASP.NET, JSP, COM/DCOM
 
IIS for Developers
IIS for DevelopersIIS for Developers
IIS for Developers
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
How to Harden the Security of Your .NET Website
How to Harden the Security of Your .NET WebsiteHow to Harden the Security of Your .NET Website
How to Harden the Security of Your .NET Website
 

Viewers also liked (8)

Chapter 23
Chapter 23Chapter 23
Chapter 23
 
Chapter 25
Chapter 25Chapter 25
Chapter 25
 
Next step job board (Assignment)
Next step job board (Assignment)Next step job board (Assignment)
Next step job board (Assignment)
 
Chapter 19
Chapter 19Chapter 19
Chapter 19
 
C# question answers
C# question answersC# question answers
C# question answers
 
Assignment
AssignmentAssignment
Assignment
 
C sharp and asp.net interview questions
C sharp and asp.net interview questionsC sharp and asp.net interview questions
C sharp and asp.net interview questions
 
C# interview questions
C# interview questionsC# interview questions
C# interview questions
 

Similar to Chapter 26 (20)

01 asp.net session01
01 asp.net session0101 asp.net session01
01 asp.net session01
 
01 asp.net session01
01 asp.net session0101 asp.net session01
01 asp.net session01
 
Opr089 xx
Opr089 xxOpr089 xx
Opr089 xx
 
A comprehensive software infrastructure of .Net
A comprehensive software infrastructure of .Net  A comprehensive software infrastructure of .Net
A comprehensive software infrastructure of .Net
 
Chapter13 Administering Web Resources
Chapter13      Administering  Web  ResourcesChapter13      Administering  Web  Resources
Chapter13 Administering Web Resources
 
Rutgers - Active Server Pages
Rutgers - Active Server PagesRutgers - Active Server Pages
Rutgers - Active Server Pages
 
01 asp.net session01
01 asp.net session0101 asp.net session01
01 asp.net session01
 
Asp.net Project
Asp.net Project Asp.net Project
Asp.net Project
 
Asp.netrole
Asp.netroleAsp.netrole
Asp.netrole
 
WSS And Share Point For Developers
WSS And Share Point For DevelopersWSS And Share Point For Developers
WSS And Share Point For Developers
 
Windows Hosting Documentation
Windows Hosting DocumentationWindows Hosting Documentation
Windows Hosting Documentation
 
Web techh
Web techhWeb techh
Web techh
 
Web tech
Web techWeb tech
Web tech
 
Web tech
Web techWeb tech
Web tech
 
Web tech
Web techWeb tech
Web tech
 
Iis it-slideshares.blogspot.com
Iis it-slideshares.blogspot.comIis it-slideshares.blogspot.com
Iis it-slideshares.blogspot.com
 
Lect02_Asp.NET.pptx
Lect02_Asp.NET.pptxLect02_Asp.NET.pptx
Lect02_Asp.NET.pptx
 
Asp.net
Asp.netAsp.net
Asp.net
 
Asp interview Question and Answer
Asp interview Question and Answer Asp interview Question and Answer
Asp interview Question and Answer
 
Domain and hostion
Domain and hostionDomain and hostion
Domain and hostion
 

More from application developer (20)

Chapter 18
Chapter 18Chapter 18
Chapter 18
 
Chapter 17
Chapter 17Chapter 17
Chapter 17
 
Chapter 16
Chapter 16Chapter 16
Chapter 16
 
Week 3 assignment
Week 3 assignmentWeek 3 assignment
Week 3 assignment
 
Chapter 15
Chapter 15Chapter 15
Chapter 15
 
Chapter 14
Chapter 14Chapter 14
Chapter 14
 
Chapter 13
Chapter 13Chapter 13
Chapter 13
 
Chapter 12
Chapter 12Chapter 12
Chapter 12
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
 
C # test paper
C # test paperC # test paper
C # test paper
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
 
Chapter 8 part2
Chapter 8   part2Chapter 8   part2
Chapter 8 part2
 
Chapter 8 part1
Chapter 8   part1Chapter 8   part1
Chapter 8 part1
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
 
Week 1 Assignment Q2 Solution
Week 1 Assignment Q2 SolutionWeek 1 Assignment Q2 Solution
Week 1 Assignment Q2 Solution
 
Week 1 assignment q2
Week 1 assignment q2Week 1 assignment q2
Week 1 assignment q2
 
Week 1 Assignment Q1 Solution
Week 1 Assignment Q1 SolutionWeek 1 Assignment Q1 Solution
Week 1 Assignment Q1 Solution
 
C# for beginners
C# for beginnersC# for beginners
C# for beginners
 

Recently uploaded

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Recently uploaded (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Chapter 26

  • 1. • ASP.NET Applications and the Web Server • How Web Servers Work • The Virtual Directory • Web Application URLs • Internet Information Services (IIS) • Managing Websites with IIS Manager • Understanding Application Pools • The ASP.NET Account • Configuring a Website • Deploying a Simple Site
  • 2. A specialized piece of software that accepts requests over Hypertext Transport Protocol (HTTP) and serves content. • When you’re running your web application in Visual Studio, you use the test web server that’s built in. • When you deploy your website to a broader audience, you need a real web server, such as IIS. • Web servers run special software to support mail exchange, FTP and HTTP access, and everything • else clients need in order to access web content.
  • 3. The easiest job a web server has is to provide ordinary HTML pages. When you request such a file, the web server simply reads it off the hard drive (or retrieves it from an in-memory cache) and sends the complete document to the browser. • When you request the ASP.NET page, the web server sends the request over to the ASP.NET engine. The ASP.NET engine loads the requested page, runs the code it contains, and then creates the final HTML document, which it passes back to IIS. IIS then sends the HTML document to the client.
  • 4. When you deploy your web application to a web server, it’s exposed through something called a virtual directory. A virtual directory is simply the public face of your website directory. For example, your website might exist in a directory on the server named c:MySite. To allow remote users to access this website through their browsers, you could expose it as a virtual directory say MySite. When the user requests a page in a virtual directory (say, http://WebServer/MySite/Checkout.aspx), the web server looks for the corresponding file in the corresponding physical directory (c:MySiteCheckout.aspx).
  • 5. You can use ASP.NET applications in a variety of different environments, including local area networks (LANs) and over the Internet. On an IP network, each computer is given a unique number called an IP address. IP addresses aren’t easy to remember web servers on the Internet usually register unique domain names such as www.microsoft.com. Within an internal network computers can access your website using either the IP address of your machine the network computer name.
  • 7. Instead of placing web application files on a single web server, you place a copy on several separate web servers. When a request is received for your website, it’s directed to one of these web servers (based on which one has the lightest load). if you decide to update your application, you need to make sure you update each web server in the web farm with the same version to prevent discrepancies.
  • 8. IIS exists in several different versions. The version of IIS you use depends on the operating system you’re using: • Windows Server 2003 uses IIS 6, which isn’t covered in this book. • Windows Vista and Windows Server 2008 use IIS 7. • Windows 7 and Windows Server 2008 R2 use IIS 7.5 Windows Vista and Windows 7, are fine for development testing, but they implement a connection limit to 10 users.
  • 9. When IIS is installed, it automatically creates a directory named c:inetpubwwwroot. Any files in this directory will appear as though they’re in the root of your web server. If you add the file TestFile.html to this directory, you can request it in a browser through the URL http://localhost/TestFile.html. You can even create subdirectories c:inetpubwwwroot MySiteMyFile.html can be accessed as : http://localhost/MySite/MyFile.html.
  • 10. The easiest and most flexible way to create a virtual directory is to use the IIS Manager utility 1. To create a new virtual directory for an existing physical directory, expand the node for the current computer, and expand the Sites node underneath. 2. Right-click the Default Web Site item, and choose Add Application. 3. Supply the alias. For example, if your alias is MyApp and your computer is MyServer, you can request pages using URLs such as http://MyServer/MyApp/MyPage.aspx. 4. Next, you need to choose the physical path 5. Next, you need to specify the application pool.
  • 11. The web application pool sets a small group of low-level settings that apply only to ASP.NET applications, Such as the maximum number of requests to put on hold before sending a “Service Unavailable” response to new clients (by default, it’s 1000) etc. Application pools include two settings that are uniquely important and may require your customization: • The version of ASP.NET that IIS runs to process the requests in your website • The Windows account that IIS uses to run your website
  • 12. When the web server runs your web application, it performs all its work under a specific Windows user account that has a carefully limited set of privileges. The actual account that’s used depends on the web server you’re using: • If you’re using the integrated test server in Visual Studio, the server runs under your account. • If you’re using IIS 7, it’s the network service account. This is a special account that Windows creates when you first install it. • If you’re using IIS 7.5, it’s an account that’s based on the application pool. For example, an application pool named ASP.NET v4.0 will use an account named IIS AppPoolASP.NET v4.0, which IIS generates automatically.
  • 13. The website configuration settings are split into three broad groups, which are arranged alphabetically: ASP.NET, IIS, and Management.
  • 14. IIS supports several different protocols that it can use when authenticating a user with Windows authentication
  • 15. Before you can use any type of Windows authentication, you need to install the appropriate support for IIS. To add support, open the Control Panel, choose Programs and Features, and then click the link “Turn Windows features on or off.” Head to the Internet Information Services ➤ World Wide Web Services ➤ Security group
  • 16. Once you have the authentication features you need installed, you simply need to select your website in IIS manager and double-click the Authentication icon (in the IIS group). Now you’ll see whatever authentication options you’ve installed.
  • 17. All you need to do is follow these two simple steps: 1. Create the virtual directory on the web server. 2. Copy the entire site (including subdirectories) to the virtual directory. This is often called zero-touch deployment, because you don’t need to manually configure web server resources However, some applications are more difficult to set up on a web server.
  • 18. Here are some common factors that will require additional configuration steps: Databases: If your web application uses a database, you’ll need to transfer the database to the web server. You can do this by generating a SQL script that will automatically create the database and load it with data. Windows account permissions: Usually, a web server will run web page code under a restricted account. This account might not be allowed to perform the tasks you rely on, such as writing to files or the Windows event log, or connecting to a database. In this case, an administrator needs to specifically grant the permissions you need to the account that runs the ASP.NET engine for your website. IIS security settings: If your website uses SSL encryption or Windows authentication the virtual directory settings will need to be tweaked. This also requires the help of an administrator.
  • 19. A command-line tool named aspnet_compiler.exe, which is stored in the familiar directory. c:WindowsMicrosoft.NETFramework64[Version] You use this compiler on your development machine before you deploy the application. aspnet_compiler -m metabasePath targetDirectory
  • 20. Visual Studio includes features that integrate with IIS and allow you to create virtual directories without leaving the comfort of your design-time environment. Visual Studio has several deployment-related features: • You can use the Copy Web Site feature to transfer an existing website to a virtual directory. • You can use the Publish Web Site feature to compile your website and transfer it to another location.
  • 21. Select Website ➤ Copy Web Site from the menu
  • 22. Select Build ➤ Publish Web Site from the menu