Contents

Documentation

Installing InstantForum.NET in a standard child directory


If your installing InstantForum.NET on a shared hosting account you may not have the option to install InstantForum.NET within a dedicated IIS web application. Your hosting company may only allow one IIS web application for the root of your web site.

This article only applies if your not able to install InstantForum.NET within the root of a IIS web application / virtual directory also sometimes referred to as application starting point.

To install InstantForum.NET in a standard child directory of a IIS web site or web application you'll need to follow the steps below.

Our Example

We'll use the InstantForum.NET Single Sign-On example as a basis for this article. This example offers a single IIS web application with InstantForum.NET installed in a standard child directory / folder called "InstantForum". You can see this below…

As you can see the "InstantForum2010SSOSample" folder is our IIS web application / web site root and InstantForum.NET is installed in a standard child directory called "InstantForum". The name of the child folder you choose to install InstantForum.NET to is important as we'll need to use this to update our URLRewrite.config & web.config file.

If your using InstantForum.NET 2010-2 or below you'll need to ensure you also copy the "App_Code" folder from the InstantForum.NET folder into the root of your web site.  This is not required for InstantForum.NET 2010-3 or above however you will still need to follow the steps bel;ow.

1. Copy the InstantForum.NET DLL files into your web site root "bin" directory

You'll need to copy the InstantForum.NET assemblies shown below into the bin directory under the root of your web site….



InstantASP_Licenses.config

Ennsure you leave the "InstantASP_Licenses.config" file within the InstantForum2010SSOSample\InstantForum\Bin folder.

2. Add the following entries to your web.config within your web site root

Application Settings

You'll need to add the virtualpath application setting as shown below. This should be the relative path to your InstantForum.NET folder from the root of your webs site. For exmple we've installed InstantForum.NET to a child folder called "InstantForum" so we simply enter this name...

<add key="InstantASP_VirtualPath" value="InstantForum"/>
This will ensure our HTTP modules are able to find the configuration & localization files.

IMPORTANT: You should leave the InstantForum.NET web.config file within the "InstantForum" standard child folder. You should remove completely the InstantASP_VirtualPath  application setting from the InstantForum.NET web.config. This will ensure the InstantASP_VirtualPath setting in your root web.config as defined above is always used. 

You can optionally add the InstantForum.NET database connection string to your web sites web.config file.This is only needed if you wish to references our assemblies from your web site code and use our .NET API to query data objects from your own web application.

<add key="InstantASP_ConnectionString" value="server=localhost;trusted_connection=true;database=InstantForum20102"/>

HttpModules

You'll need to add the following HTTP Modules to your root web sites web.config file. This should be placed inside the <System.Web> element.

<httpModules>
<add type="InstantASP.Common.HttpModule.SecurityModule, InstantASP.Common" name="SecurityModule"/>
<add type="InstantASP.Common.HttpModule.ServiceModule, InstantASP.Common" name="ServiceModule"/>
<add type="InstantASP.Common.HttpModule.EmailModule, InstantASP.Common" name="EmailModule"/>
<add type="InstantASP.Common.HttpModule.ExceptionModule, InstantASP.Common" name="ExceptionModule"/>
<add type="InstantASP.InstantForum.HttpModule.URLRewritterModule, InstantASP.InstantForum" name="RewriterModule"/>
<add type="InstantASP.InstantForum.HttpModule.ForumModule, InstantASP.InstantForum" name="ForumModule"/>
</httpModules>

Or if your using IIs 7 "Integrated" application pools you'll need to add the same HTTP modules to your <System.WebServer> element as shown below…

<modules>
<add name="SecurityModule" preCondition="managedHandler" type="InstantASP.Common.HttpModule.SecurityModule, InstantASP.Common"/>
<add name="ServiceModule" preCondition="managedHandler" type="InstantASP.Common.HttpModule.ServiceModule, InstantASP.Common"/>
<add name="EmailModule" preCondition="managedHandler" type="InstantASP.Common.HttpModule.EmailModule, InstantASP.Common"/>
<add name="RewriterModule" preCondition="managedHandler" type="InstantASP.InstantForum.HttpModule.URLRewritterModule, InstantASP.InstantForum"/>
<add name="ForumModule" preCondition="managedHandler" type="InstantASP.InstantForum.HttpModule.ForumModule, InstantASP.InstantForum"/>
</modules>

3. Ensure you only have 1 <authentication> element in your root web.config

You may need to remove the following tag from the forum web.config file if the forum is installed in a standard child folder.

<authentication mode="Forms">
<forms name="InstantASP" cookieless="UseUri" loginUrl="Logon.aspx" protection="All" slidingExpiration="true" path="/" />
</authentication>

You should ensure this tag is present in your root web.config. InstantForum.NET requires forms authentication to be enabled.

That's It!

I hope this information has been helpful. As always if you have any questions please don't hesitate to contact us.

Attachments


RootWebAoo.zip RootWebAoo.zip (21.59 KB, 130 views)

© 2013 InstantASP Ltd. All Rights Reserved.
Documentation powered by InstantKB 2011