WwwRoot

The WwwRoot directory can be used to serve additional static content for your IntraWeb application.

Usage

If a file named People.png exists in your WwwRoot directory and your application URL is http://127.0.0.1/, then you can reference the image as http://127.0.0.1/People.png, or simply /People.png from within the application.

Location

The location of the WwwRoot is normally based off the location of your .exe or .dll file. Hereafter referred to as <AppDir>.

ServerController.ContentPath

ServerController.ContentPath property can be used to override the defaults that IntraWeb will use. This property if set must be set to an absolute path on disk. If a value exists, this value will be used and no other paths will be tried.

If set, it must be set in code during the ServerController initialization and cannot be changed after.

<AppDir>\WwwRoot

If WwwRoot exists in <AppDir>, it will be used.

Debugging

If neither of the previous two cases apply, and <AppDir> ends with \Debug\ or \Release\, then IntraWeb will look for:

<AppDir>\..\..\WwwRoot

During debugging this is normally the project source directory which is a more convenient location for WwwRoot for access and source control purposes.