Search code examples
c1-cms

Composite C1 IIS Virtual Directory Setup


I am trying to setup Composite C1 site inside a virtual directory but seems like Composite doesn't like it and i am getting C1PageRouting Errors.

We are implementing some parts of our existing sites into Composite so the requirement is to keep existing sites running and replace changed modules with their composite replacements. So the only way i found to do that is through IIS virtual directories.

Below is the IIS Directory structure i am trying to implement:

IIS_Sites [Level 0]

 >>**NonC1WebSite** [Level 1]

    >>**ca** (Virtual Directory) [Level 2]

         >>**en** (Virtual Directory) [Level 3]

               >>**CompositeWebSite** (IIS Application) [Level 4]

                  + App_Browsers [Level 4]

                  + App_Code [Level 4]

                  + Composite [Level 4]

                  + .......etc........ [Level 4]

+ NonC1WebSite Folder1 [Level 1]

+ NonC1WebSite Folder2 [Level 1]

And Below is the error i am getting:

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.] Composite.Core.Routing.Pages.C1PageRouteHandler..cctor() +200

[TypeInitializationException: The type initializer for 'Composite.Core.Routing.Pages.C1PageRouteHandler' threw an exception.] Composite.Core.Routing.Pages.C1PageRouteHandler..ctor() +0 Composite.Core.Routing.Pages.C1PageRoute.GetRouteData(HttpContextBase context) +968 System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +355 System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +75 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +270

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237

Please help if something shoots your mind.

Also i would request mawtex to let me know if i need some special settings to make it working.

Thanks.


Solution

  • I resolved the problem by upgrading to latest composite 3.0 RC. Thanks.