Geeks With Blogs
Prasanna's Blog BizTalk, WCF, C# and Software Factories

No one expects this kinda issues first thing in the morning :-(, things were undercontrol till last nite before i hit the bed

Here is the exception while exposing service from WSSF Host project

 

Microsoft.Practices.RecipeFramework.ActionExecutionException: An exception occurred during the binding of reference or execution of recipe ExposeWCFService. Error was: Action SetServiceModelEntryAction failed to execute:

The type 'Consensus.Net.PolicyInjectionBehaviors.PolicyInjectionEndpointBehavior, Consensus.Net.PIBehaviors, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' registered for extension 'PolicyEndPointBehavior' could not be loaded. (C:\Documents and Settings\Administrator\Desktop\CoreBooking\Consensus\Tests\Consensus.Net.Host\web.config line 182).

You can remove the reference to this recipe through the Guidance Package Manager. ---> System.Configuration.ConfigurationErrorsException: The type 'Consensus.Net.PolicyInjectionBehaviors.PolicyInjectionEndpointBehavior, Consensus.Net.PIBehaviors, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' registered for extension 'PolicyEndPointBehavior' could not be loaded. (C:\Documents and Settings\Administrator\Desktop\CoreBooking\Consensus\Tests\Consensus.Net.Host\web.config line 182)

   at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)

   at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)

   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)

   at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)

   at System.Configuration.ConfigurationSectionCollection.Get(String name)

   at System.Configuration.ConfigurationSectionCollection.get_Item(String name)

   at System.ServiceModel.Configuration.ServiceModelSectionGroup.get_Services()

   at Microsoft.Practices.SoftwareFactories.ServiceFactory.WCF.Configuration.ServiceModelConfigurationManager..ctor(Configuration configuration)

   at Microsoft.Practices.ServiceFactory.WCF.Actions.Configuration.SetServiceModelEntryAction.Execute()

   at Microsoft.Practices.RecipeFramework.Recipe.Microsoft.Practices.RecipeFramework.Services.IActionExecutionService.Execute(String actionName, Dictionary`2 inputValues)

   at Microsoft.Practices.RecipeFramework.Recipe.Microsoft.Practices.RecipeFramework.Services.IActionExecutionService.Execute(String actionName)

   at Microsoft.Practices.RecipeFramework.Extensions.Coordinators.ConditionalCoordinator.Run(Dictionary`2 declaredActions, XmlElement coordinationData)

   at Microsoft.Practices.RecipeFramework.Recipe.ExecuteActions(IDictionaryService readOnlyArguments, IDictionaryService arguments, ITypeResolutionService resolution)

   --- End of inner exception stack trace ---

   at Microsoft.Practices.RecipeFramework.Recipe.UndoExecutedActionsAndRethrow(Exception ex)

   at Microsoft.Practices.RecipeFramework.Recipe.ExecuteActions(IDictionaryService readOnlyArguments, IDictionaryService arguments, ITypeResolutionService resolution)

   at Microsoft.Practices.RecipeFramework.Recipe.Execute(Boolean allowSuspend)

   at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(String recipe, IAssetReference reference, IDictionary arguments)

   at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(IAssetReference reference)

   at Microsoft.Practices.RecipeFramework.RecipeReference.OnExecute()

   at Microsoft.Practices.RecipeFramework.AssetReference.Execute()

   at Microsoft.Practices.RecipeFramework.VisualStudio.RecipeMenuCommand.OnExec()

   at Microsoft.Practices.RecipeFramework.VisualStudio.AssetMenuCommand.Invoke()

Solution :

Open the solution in Notepad and scroll down till the end to check the config entries

GlobalSection(ExtensibilityGlobals) = postSolution
  ServiceContractNamespace = http://Consensus.Net.ServiceContracts/Organisation/2007/12
  FaultContractNamespace = http://Consensus.Net.FaultContracts/2007/09
  DataContractNamespace = http://Consensus.Net.DataContracts/2007/09
  UnLocked = True
  Locked = False
  ISWCFSolution = True

 EndGlobalSection

if missing then manually add the same to the .sln file

Issue with the config entry

an additional tag was added up in the config entry

 <endpointBehaviors>
        <behavior name=" Consensus.Net.PolicyInjectionBehaviors.PolicyInjectionEndpointBehavior">
          <PolicyEndPointBehavior />
        </behavior>
      </endpointBehaviors>

remove the "<PolicyEndPointBehavior />", it should work fine

Note: re-compile the solution before exposing the service again

Happy programming !!!

Posted on Wednesday, January 30, 2008 10:17 PM | Back to top


Comments on this post: Error while exposing WCF service from web service software factory + Policy Injection Application Block

# re: Error while exposing WCF service from web service software factory + Policy Injection Application Block
Requesting Gravatar...
Great Work Prasanna!!!!


Regards,
Kiran Patil
Left by Kiran Patil on Jan 31, 2008 1:46 AM

# re: Error while exposing WCF service from web service software factory + Policy Injection Application Block
Requesting Gravatar...
It works...Thanks!
Left by Waheed on May 30, 2010 1:35 PM

Your comment:
 (will show your gravatar)


Copyright © Prasanna Krishnan | Powered by: GeeksWithBlogs.net