Error while using Compositeweb.interfaces.IPermissionsCatalog

Oct 7, 2008 at 3:52 AM
<title>Service Microsoft.Practices.CompositeWeb.Interfaces.IPermissionsCatalog is not available in the current context.</title> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } </style>

Why does the following error occur in <Module>ModuleInitializer class?



Server Error in '/DevelopmentWebsite' Application.

Service Microsoft.Practices.CompositeWeb.Interfaces.IPermissionsCatalog is not available in the current context.

<title>Service Microsoft.Practices.CompositeWeb.Interfaces.IPermissionsCatalog is not available in the current context.</title> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } </style> 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: Microsoft.Practices.CompositeWeb.ServiceMissingException: Service Microsoft.Practices.CompositeWeb.Interfaces.IPermissionsCatalog is not available in the current context.
Line 39: RegisterSiteMapInformation(moduleContainer.Services.Get(Of ISiteMapBuilderService)(True)) Line 40: RegisterRequiredPermissions(moduleContainer.Services.[Get](Of IPermissionsCatalog)(True))

Stack Trace:

[ServiceMissingException: Service Microsoft.Practices.CompositeWeb.Interfaces.IPermissionsCatalog is not available in the current context.]
Microsoft.Practices.CompositeWeb.Collections.ServiceCollection.Get(Type serviceType, Boolean ensureExists) +266
Microsoft.Practices.CompositeWeb.Collections.ServiceCollection.Get(Type serviceType, Boolean ensureExists) +214
Microsoft.Practices.CompositeWeb.Collections.ServiceCollection.Get(Boolean ensureExists) +87
PHSPL.AgentIncentive.BusinessOfficer.BusinessOfficerModuleInitializer.Load(ICompositionContainer moduleContainer) in D:\Borland\StarTeam Cross-Platform Client 2006\Working\BPM\08 SourceCode\AgentIncentive\Modules\BusinessOfficer\BusinessOfficerModuleInitializer.vb:40
Microsoft.Practices.CompositeWeb.Services.ModuleLoaderService.Load(ICompositionContainer compositionContainer, IModuleInfo[] modules) +621
Microsoft.Practices.CompositeWeb.WebClientApplication.LoadModules() +182
Microsoft.Practices.CompositeWeb.WebClientApplication.Application_Start(Object sender, EventArgs e) +126