InstantKB & IIS7 + Integrated Application Pool

InstantKB Question
I migrated my site to a new server that is using IIS7 and was getting 404s for every sub page I clicked on, obviously suggesting that the URLRewriting wasn't working. I looked at the web.config and noticed that <system.webserver> was essentially empty, so I found this article:

I used that web.config and updated my connection string and now I get the following error:

NET Runtime version: 2.0.50727.4200Application Domain: 
/LM/W3SVC/11/ROOT-2-129254048952489772Assembly Codebase: 
D:/Inetpub/wwwroot/ Full
Name:  InstantASP.InstantKB, Version=, Culture=neutral,
PublicKeyToken=nullAssembly Version: Build Date:
8/4/2010 10:14:56 AMException Type:   System.NullReferenceExceptionException Message:
 Object reference not set to an instance of an object.Exception Source: 
InstantASP.InstantKBException Target Site: GetCurrentUser---- Stack Trace ----

Now, I could have stuck with Classic, but it wasn't even working with that as I was getting 404s. At least with Integrated, it seems to be getting somewhere. I have the source code and can't seem see anything that would be wrong in that GetCurrentUser method.

Have you experienced this before or do you have any suggestions?

The server is x86 Server 2008.
InstantKB Question

Hi there,

Hope your ver ywell. Many thanks for your post. I'm sorry to hear of hte trouble.

I tested the web.config today from that article within an IIS7 Integrated Application Pool and it appears to work for me both logged in and as an anonymous user.

The error your receiveing appears to be around the GetCurrentUser method. This would suggest to me it's related to authentnication.

A few quick things to check.

1. Are you using forms authentication within your web.config...

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

2. Do you have any parent web.config files that could be conflicting with the authentication. For example a parent web.config with the authentication mode set to "Windows" for example.

3. Ensure you include the Security HTTP Module for InstantKB.NET so we can populate the HttpContext objects. For IIS7 this would be...

            <add name="EmailModule" type="InstantASP.Common.HttpModule.EmailModule" preCondition="managedHandler" />
            <add name="ExceptionModule" type="InstantASP.Common.HttpModule.ExceptionModule" />
            <add name="SecurityModule" type="InstantASP.Common.HttpModule.SecurityModule" />
            <add name="ServiceModule" type="InstantASP.Common.HttpModule.ServiceModule" />
            <add name="KBServiceModule" type="InstantASP.InstantKB.HttpModule.ServiceModule" />
            <add name="URLRewrittingModule" type="InstantASP.InstantKB.HttpModule.URLRewritterModule" />

If InstantKB.NET is a child of a prent web application you may need to add these settings to your root web.config also.

Please let me know if any of these suggestions help. I look forward to your response and assisting further,

Edit: This issue has since been resolved and newer versions of InstantKB support both classic & integration application pools within IIS.
Kindest Regards,

Ryan Healey
Blog | Community | Docs

Ryan,Thank you for your response. I took the stock web.config for IIS7 as recommended by your team in the following KB article:

So, I have all of the items configured as you suggested (Forms Authentication, SecurityModule) and the site is it's own separate site with it's own Application Pool. 

I do agree that this is an issue is the GetCurrentUser and seems to be security related, but I'm not exactly sure how or why it's been caused. Do you have any further suggestions? 

Your help is much appreciated! 

Existing Account
Email Address:


Social Logins

Select a Forum....

InstantASP Forums