Building an N-Tier Application: IIS Virtual Directories, Authentication, and Authorization, Study notes of Information Technology

An overview of creating virtual directories in iis, configuring authentication and authorization using the web.config file, and creating an n-tier application using the northwind solution. It covers topics such as accessing documents in iis, creating virtual directories, advantages of virtual directories, xml formatting in web.config, and configuring authentication and authorization modes.

Typology: Study notes

Pre 2010

Uploaded on 08/04/2009

koofers-user-ycl-1
koofers-user-ycl-1 🇺🇸

10 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ITEC 4770 - Chapter 2 Building an N-Tier Application
IIS
1. IIS Virtual Directories (a.k.a. URL mapping)
a. Accessing documents in IIS
i. if there were a directory in your IIS directory named myApplication and there was a web page
in that directory named index.html it would be accessed as follows:
http://localhost/myApplication/index.html
b. Physical location of a directory in IIS
i. default directory is C:\Inetpub\wwwroot
ii. The location can be different if the directory is a virtual directory
c. Creating a virtual directory
i. Control Panel / Administrative Tools / Internet Information Services
ii. In IIS you will add a virtual directory (right-click the Default Web Site entry)
iii. Choose an alias
1. The alias will appear in IIS as a child to Default Web Site
2. The alias will also be used in the URL:
http://localhost/virtualDirectoryAlias
in order to access the files in your virtual directory.
iv. Browse to the new directory and select the directory containing your files
v. right-click / Properties / Directory Security / Edit . Uncheck ‘Anonymous access’ and check
‘Integrated Windows authentication’.
d. Advantages of virtual directories
i. Provide a simple URL to the end user
ii. Store content in different locations
iii. Easier to change location of and manage the served content
2. web.config file
a. XML (eXtensible Markup Language) file
i. uses XML formatting to group different settings together
ii. open and close tags for each setting
b. uses
i. application, ASP.NET, remoting settings
1. appSettings: configurations settings for the application: database connection string
2. system.web: configure ASP.NET applications and control how the applications behave
a. authentication
b. authorization
3. system.runtime.remoting
a. configuration for remote objects
3. Authentication
a. The process of confirming the identity of the user
b. Modes
i. Window (default)
1
pf3
pf4

Partial preview of the text

Download Building an N-Tier Application: IIS Virtual Directories, Authentication, and Authorization and more Study notes Information Technology in PDF only on Docsity!

IIS

  1. IIS Virtual Directories (a.k.a. URL mapping) a. Accessing documents in IIS i. if there were a directory in your IIS directory named myApplication and there was a web page in that directory named index.html it would be accessed as follows: http://localhost/myApplication/index.html b. Physical location of a directory in IIS i. default directory is C:\Inetpub\wwwroot ii. The location can be different if the directory is a virtual directory c. Creating a virtual directory i. Control Panel / Administrative Tools / Internet Information Services ii. In IIS you will add a virtual directory (right-click the Default Web Site entry) iii. Choose an alias 1. The alias will appear in IIS as a child to Default Web Site 2. The alias will also be used in the URL: http://localhost/virtualDirectoryAlias in order to access the files in your virtual directory. iv. Browse to the new directory and select the directory containing your files v. right-click / Properties / Directory Security / Edit. Uncheck ‘Anonymous access’ and check ‘Integrated Windows authentication’. d. Advantages of virtual directories i. Provide a simple URL to the end user ii. Store content in different locations iii. Easier to change location of and manage the served content
  2. web.config file a. XML (eXtensible Markup Language) file i. uses XML formatting to group different settings together ii. open and close tags for each setting b. uses i. application, ASP.NET, remoting settings 1. appSettings: configurations settings for the application: database connection string 2. system.web: configure ASP.NET applications and control how the applications behave a. authentication b. authorization 3. system.runtime.remoting a. configuration for remote objects
  3. Authentication a. The process of confirming the identity of the user b. Modes i. Window (default)
  1. All users are authenticated against the same domain
  2. Good for internal applications ii. Forms based
  3. User is authenticated using a username and password
  4. Useful for web applications iii. Passport
  5. Centralized authentication service provided by Microsoft that offers a single logon and core profile services for member sites iv. None c. Setting or adding authentication via web.config d.
  6. Authorization a. The process of determining whether or not the authenticated user has sufficient rights to perform the requested tasks b. You can define users or roles in your web.config file i. Default setting is
  7. This allows users to access everything Example <system.web> </system.web> <system.web> </system.web> <system.web>

Northwind solution

  1. Create the solution Northwind and 4 projects: NorthwindTraders (Windows Application), NorthwindUC (Class Library), NorthwindDC(Class Library), NorthwindShared (Class Library) a. DC = data centric, UC=user centric
  2. Create references: a. NorthwindTraders -> System.Runtime.Remoting, NorthwindShared, NorthwindUC b. NorthwindDC -> NorthwindShared, System.Runtime.Remoting c. NorthwindUC-> NorthwindShared
  3. Set the RootNamespace for each project a. NorthwindTraders b. NorthwindTraders.NorthwindDC c. NorthwindTraders.NorthwindUC d. NorthwindTraders.NorthwindShared