Posted on

web.config Inheritance in IIS

ASP.Net

A couple of notes on IIS and how it works for virtual directories/applications and web.config inheritance and ASP.Net.

 

There is a configuration file that will automatically be inherited by an asp.net application’s web.config. This configuration file is machine.config and it defines the servers/computers asp.net schema for all of its web applications.

The root web.config files is also a server configuration file. This file resides in the same directory as the machine.config and is used to define system wide configurations.

Then you have the web site specific configuration also named web.config. From the websites root directory the web.config seems to work similar to .htaccess files.

Each directory in an asp.net may have its very own web.config file. Each virtual directory may also have its own web.config. Each virtual application has its own web.config file. Each one of these files inherit their parents web.config. This is done so you can define roles in the parent web.config file and it is enforced throughout the website.

Okay a virtual directory is the windows why of performing a soft link. It is not reflected in the file system. It is only reflected in IIS. An example:

Website = c:/intetpub/wwwroot/mysite/

Files = c/users/public/documents/

In IIS you can set a virtual directory by stating c:/inetpub/wwwroot/mysite/sharefiles/ that points to c:/users/public/documents/

You can actually add a virtual folder from another server on your network.

This is not reflected in the file system. If c:/inetpub/wwwroot/mysite/sharefiles/ directory was actually added, IIS will ignore it and point to the virtual directory. This was discovered when installing reporting for MS SQL that by default adds a ~/report virtual application. One of my applications already had an ~/report directory already and the virtual application took precedence. Applications work essentially the same as folders except in an virtual application operates in their own application pool.

If you want to stop inheritance you can the following to the site’s web.config:


    
        ...
    

If you want to not inherit certain sections of the configuration then you add a tag the child section.


    
    ...
Posted on

Logistics & Inventory Management with Alutiiq

Alutiiq recently award Cyber Sprocket a 1-year teaming agreement, making this our 4th year of working with Alutiiq on developing, supporting, & maintaining their military logistics & inventory management application.  We are very excited to be working with Alutiiq for another year.  The upcoming year will bring some exciting new possibilities for follow on projects that augment the system already in place.  We’re looking forward to being part of the design & development team and supporting our clients and our country both at home and abroad.

Technical Overview

Services Provided

  • Web Application Programming
  • Database Design
  • Database Maintenance
  • System Architecture
  • Network Support

Platform Details