Object reference not set to an instance of an object: CommunityServer.CSHttpModule.Application_BeginRequest(Object source, EventArgs e) +112

Object reference not set to an instance of an object: CommunityServer.CSHttpModule.Application_BeginRequest(Object source, EventArgs e) +112

  • Hi,

    I've just installed the latest CS 2.0 for testing purposes on my laptop (XP SP2, IIS 6, SQL Server Express 2005). When connecting to the server, I'm getting the following error:

    Server Error in '/cs' Application.
    --------------------------------------------------------------------------------
    
    Object reference not set to an instance of an object. 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    
    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
    
    Source Error: 
    
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  
    
    Stack Trace: 
    
    
    [NullReferenceException: Object reference not set to an instance of an object.]
       System.Web.Hosting.ISAPIWorkerRequestInProc.GetServerVariable(String name) +1098
       System.Web.Hosting.ISAPIWorkerRequest.GetServerName() +13
       System.Web.HttpRequest.get_Url() +284
       CommunityServer.CSHttpModule.CheckWWWStatus(CSConfiguration config, HttpContext context) +29
       CommunityServer.CSHttpModule.Application_BeginRequest(Object source, EventArgs e) +112
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +157
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +65
    
     
    
    
    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
    
     
    I understand the error, but not how to fix it. Has anyone encountered this error before?
    Any help would be appreciated.
     
    -Fabien.
  • Probably the same problem as here: http://forums.asp.net/thread/1256394.aspx

    Try doing as the last poster says.  Open a command prompt, go to \Windows\Microsoft.NET\Framework\v2.0.50727 and run "aspnet_regiis.exe -i".
  • Hi Ken.

    Actually, it's not quite the same issue.

    I indeed had to run aspnet_regiis.exe -ga for IUSR_LAPTOP and IWAM_LAPTOP as the IIS metabase was not ACL'ed properly. Once I got past that hurdle, I bumped into the issue described in my post.

  • Have you tried just running aspnet_regiis -i?  Doing a quick google search "ISAPIWorkerRequestInProc GetServerVariable" turns up quite a few results, and they all say to rerun aspnet_regiis -i.
  • I'll try "aspnet_regiis -i" alone tonight and I'll post my findings back here.

    Thanks!

    -Fabien.

  • "aspnet_regiis -i" did the trick Smile [:)]

    Thank you for your help. It's much appreciated!

    Regards,

    -Fabien.