Microsoft – Internet Information Server (IIS) – Include Files

Preclude

Here is a follow-up post to an earlier one titled “Microsoft – Internet Information Server – Error – An error occurred on the server when processing the URL. Please contact the system administrator”  ( https://danieladeniji.wordpress.com/2014/08/22/microsoft-internet-information-server-error-an-error-occurred-on-the-server-when-processing-the-url-please-contact-the-system-administrator/ )

 

Error Message

Error

Th error message read:

Text:

An error occurred on the server when processing the URL. Please contact the system administrator.

Image:

An error occurred on the server when processing the URL

 

Failed Request Tracing Rules

Here is the important data we uncovered through “Failed Request Tracing Rules”.

 

IncludeFileNotFound

 

 

 

Source Code

 

We can resolve the problem by replacing “include virtual” with “include file”.

 

header.inc

Here is our included file.

 

<%
	
	Const CompanyName = "Dell"
	Const VersionNumber = "v 1"
	
%>

 

IncludeVirtual.asp

 

Here is the Source Code that unsuccessfully attempts to incorporate the included file using “include virtual

 

<!-- #include virtual ="/customize/header.inc" -->

<%

	Response.Write "Hello - My name is Sam"
	
%>

 

IncludeFile.asp

 

Here is the Source Code that successfully incorporates the included file using “include file“.

 

<!-- #include file = "customize/header.inc" -->

<%

	Response.Write "Company Name:  " + CompanyName + "</BR>"
	
%>	
Version #: <%= VersionNumber %>

 

 

Top Level Web Site

 

We can also address the problem by making our web site a top level web site.

And, so we create the site as a top level web site.

In the image below that site is known as LabVDIR.

WebSites

 

Site Bindings

Once we create a new top level website, we will likely have conflicts with our existing web site.

To address let us change the new site’s bindings.

To do so, please follow the following sequence:

  • Select the web site
  • Right click on your selection and from the drop-down menu select “Edit Bindings”

 

EditSiteBindings

 

 

As we will like to keep using the default HTTP port of 80, we will avoid conflicts by invoking a unique “Host name“.

The usual path is that one chooses an host name and then create corresponding aliases name using DNS or host file entries.

But, we will go with the new novel thoughts that have public DNS domain names that point to localhost.

The public DNS name that came by via Goggling is localtest.me.  Please visit http://readme.localtest.me/ and read more.

Here is where we arrive:

 

 

Summary

 

Include File” works, but it is a bit restrictive as one has to maintain strict folder structures.

Top Level Web Site” works, as well.  But, keep in mind that you are essentially creating a distinct web site and duplicating some configuration changes.

ASP.Net uses web.config files and so hopefully some of the configurations will carry over.

 

 

References

 

References – LocalHost

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s