November Happy Hour will be moved to Thursday December 5th.

WCF Service Error

Vote:
 

Released commerce to a staging environment but our WCF services (both IndexingService/IndexingService.svc for FTS and Services/EventService.svc for Commerce) are giving this error:

Exception details: 

FileLoadException: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

Stack trace:

[FileLoadException: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)]
   at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
   at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
   at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
   at System.Web.Configuration.HandlerFactoryCache.GetHandlerType(String type)
   at System.Web.Configuration.HandlerFactoryCache..ctor(String type)
   at System.Web.HttpApplication.GetFactory(String type)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
#64204
Dec 12, 2012 22:05
Vote:
 

As always make sure you have wcf correct installed on the machins also have a look in web.config and if you do not have endpoints for your service add them. I think you should have something under <system.servicemodel..>. Most of the time the installation of .net is not done correctly on the server. Also maker sure the dll:s are there as well. :)

#64211
Dec 13, 2012 9:13
Vote:
 

Yes the installation for WCF has been conducted on the machine. I have done a 'beyond compare' comparison of the dlls on that environment against my dev.

The following is the extract from the web.config of the CMS

<system.serviceModel>
<client>
<!--Client configuration for the ImageEditor, the client name has to be "ImageServiceClientEndPoint"-->
<!-- Only uncomment if the Image Service is hosted in an external application
<endpoint
name="ImageServiceClientEndPoint"
address="the address of the hosting application"
binding="the binding the hosting application is using"
bindingConfiguration="ImageServiceBinding"
contract="EPiServer.ImageLibrary.IImageService" />
-->
<!-- Uncomment this endpoint and the "RemoteEventServiceEndPoint" to enable remote events
<endpoint name="RemoteEventServiceClientEndPoint"
address="soap.udp://239.255.255.19:5000/RemoteEventService"
binding="customBinding"
bindingConfiguration="RemoteEventsBinding"
contract="EPiServer.Events.ServiceModel.IEventReplication" />-->
</client>
<bindings>
<!-- Only uncomment if the Image Service is hosted in an external application
<binding type used by the Image Service>
<binding name="ImageServiceBinding" maxReceivedMessageSize="20000000">
<readerQuotas maxArrayLength="20000000" />
<security mode="None" />
</binding>
</binding type used by the Image Service>
-->
<customBinding>
<binding name="RemoteEventsBinding">
<binaryMessageEncoding />
<udpTransport multicast="True" />
</binding>
</customBinding>
<webHttpBinding>
<binding name="IndexingServiceCustomBinding" maxBufferPoolSize="1073741824" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
<readerQuotas maxStringContentLength="10000000" />
</binding>
</webHttpBinding>
</bindings>
<extensions>
<bindingElementExtensions>
<add name="udpTransport" type="Microsoft.ServiceModel.Samples.UdpTransportElement, EPiServer.Events" />
</bindingElementExtensions>
</extensions>
<services>
<!-- In order to get fault information from the server for debug purposes, add behaviorConfiguration="DebugServiceBehaviour" to the endpoint "RemoteEventServiceEndPoint" -->
<service name="EPiServer.Events.Remote.EventReplication">
<!-- Uncomment this endpoint and the "RemoteEventServiceClientEndPoint" to enable remote events
<endpoint name="RemoteEventServiceEndPoint"
contract="EPiServer.Events.ServiceModel.IEventReplication"
binding="customBinding"
bindingConfiguration="RemoteEventsBinding"
address="soap.udp://239.255.255.19:5000/RemoteEventService" />-->
</service>
<service behaviorConfiguration="EPiServer.Cmo.Core.WebServices.GenericKpiServiceBehavior" name="EPiServer.Cmo.Core.WebServices.GenericKpiService">
<endpoint address="" binding="basicHttpBinding" contract="EPiServer.Cmo.Core.WebServices.IGenericKpiService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<service behaviorConfiguration="EPiServer.Trace.Services.TraceServiceBehavior" name="EPiServer.Cmo.Cms.Trace.Services.CmoTraceService">
<endpoint address="" binding="basicHttpBinding" contract="EPiServer.Trace.Services.ITraceService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<service name="EPiServer.Business.Commerce.EventService" behaviorConfiguration="EPiServer.Business.Commerce.EventServiceBehavior">
<endpoint address="" binding="webHttpBinding" contract="EPiServer.Business.Commerce.IEventService" behaviorConfiguration="EventServiceEndpointBehavior" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<service name="EPiServer.Business.Commerce.Services.ProductRating" behaviorConfiguration="CommerceSiteBehavior">
<endpoint address="" binding="webHttpBinding" contract="EPiServer.Business.Commerce.Services.IProductRating" behaviorConfiguration="CommerceSiteBehavior" />
</service>
<service name="EPiServer.Business.Commerce.Services.ProductComment" behaviorConfiguration="CommerceSiteBehavior">
<endpoint address="" binding="webHttpBinding" contract="EPiServer.Business.Commerce.Services.IProductComment" behaviorConfiguration="CommerceSiteBehavior" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="DebugServiceBehaviour">
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
<behavior name="EPiServer.Cmo.Core.WebServices.GenericKpiServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
<behavior name="EPiServer.Trace.Services.TraceServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
<behavior name="EPiServer.Business.Commerce.EventServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
<behavior name="CommerceSiteBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="CommerceSiteBehavior">
<webHttp />
</behavior>
<behavior name="EventServiceEndpointBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>

and the following in the Web.Config of CommerceManager

<system.serviceModel>
<client>
<endpoint name="eventSvcEndpoint" address="http://{TESTURL}/Services/EventService.svc" binding="webHttpBinding" behaviorConfiguration="EventServiceEndpointBehavior" contract="EPiServer.Business.Commerce.IEventService" />
</client>
<behaviors>
<endpointBehaviors>
<behavior name="EventServiceEndpointBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>

#64237
Edited, Dec 13, 2012 22:49
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.