This is a continuation of the this post: "http://www.ideablade.com/forum/forum_posts.asp?TID=3237&title=notification-service-subscription-timeout-exception"
While we had thought we had resolved the issues with our subscription to the notification service, we continued to see VERY sporadic instances of the error. We had been able to reproduce the error in development once, we were able to capture error is three locations. Windows event viewer, BOS debug log, and in the client exception handling.
Windows Event Viewer
WebHost failed to process a request.
Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/12547953
Exception: System.ServiceModel.ServiceActivationException: The service '/[Redacted]/EntityServer.svc' cannot be activated due to an exception during compilation. The exception message is: Object reference not set to an instance of an object.. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at IdeaBlade.EntityModel.Server.EntityServerHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
--- End of inner exception stack trace ---
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
Process Name: w3wp
BOS Debug Log
IdeaBlade.EntityModel.Server -->
NotificationServiceManager::AsyncNotify -->
Removing subscriber after error The message could not be transferred within the allotted timeout of 00:01:00. There was no space available in the reliable channel's transfer window. The time allotted to this operation may have been a portion of a longer timeout.
Client Exception Capture
IdeaBlade.EntityModel.EntityServerException: Unable to subscribe to service. Make sure the EntityServer is listening for INotificationService operations. ---> IdeaBlade.Core.IdeaBladeException: Unable to subscribe to service. Make sure the EntityServer is listening for INotificationService operations. ---> System.ServiceModel.CommunicationException: The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at IdeaBlade.EntityModel.INotificationService.Subscribe(SessionBundle sessionBundle, SubscribeWorkState workstate)
at IdeaBlade.EntityModel.NotificationCallbackManagerBase.Subscribe(SessionBundle sessionBundle, SubscribeWorkState workstate)
--- End of inner exception stack trace ---
at IdeaBlade.EntityModel.RemoteEntityServerProxyBase.CheckConnection(Exception pException)
at IdeaBlade.EntityModel.EntityServerProxy.RegisterCallback(SessionBundle sessionBundle, SubscribeWorkState workstate)
at IdeaBlade.EntityModel.EntityManager.<RegisterCallbackAsyncCore>b__68(RegisterCallbackOperation op)
--- End of inner exception stack trace ---
at IdeaBlade.EntityModel.AsyncProcessor`1.<>c__DisplayClass2.<.ctor>b__0(TArgs args)
at IdeaBlade.EntityModel.AsyncProcessor`1.Signal()
at IdeaBlade.EntityModel.AsyncProcessor`1.<Execute>b__5(Object x)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
-----------------------
Here is our config for server
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core"/>
</configSections>
<connectionStrings>
[Redacted]
</connectionStrings>
<ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig" >
<logging logFile="log\DebugLog.xml"
archiveLogs="true"/>
<notificationService enabled="true"/>
</ideablade.configuration>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="false"
multipleSiteBindingsEnabled="true" />
<services>
<service name="EntityService">
<endpoint address=""
binding="customBinding" bindingConfiguration="compressedBinaryBinding"
contract="IdeaBlade.EntityModel.IEntityServiceContract" />
</service>
<service name="IdeaBlade.EntityModel.Server.EntityServer">
<endpoint address=""
binding="customBinding" bindingConfiguration="compressedBinaryBinding"
contract="IdeaBlade.EntityModel.IEntityServerContract" />
<endpoint address="NotificationService"
binding="wsDualHttpBinding" bindingConfiguration="dualBinding"
contract="IdeaBlade.EntityModel.INotificationService" />
</service>
</services>
<bindings>
<customBinding>
<binding name="compressedBinaryBinding" sendTimeout="00:05:00" receiveTimeout="00:05:00">
<gzipMessageEncoding>
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" />
</gzipMessageEncoding>
<httpTransport maxReceivedMessageSize="2147483647" />
</binding>
</customBinding>
<wsDualHttpBinding>
<binding name="dualBinding" messageEncoding="Mtom"
receiveTimeout="00:10:00"
maxReceivedMessageSize="2147483647"
maxBufferPoolSize="2147483647">
<reliableSession inactivityTimeout="01:00:00" />
<security mode="None" />
</binding>
</wsDualHttpBinding>
</bindings>
<extensions>
<bindingElementExtensions>
<add name="gzipMessageEncoding" type="IdeaBlade.Core.Wcf.Extensions.GZipMessageEncodingElement, IdeaBlade.Core"/>
</bindingElementExtensions>
</extensions>
</system.serviceModel>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<appSettings>
<add key="NotificationPollTimeSpan" value="00:00:05"/>
</appSettings>
</configuration>
And our Client Config
<ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig">
<logging logFile="DebugLog.xml"/>
<objectServer
remoteBaseURL="[Redacted]"
serverPort="80"
serviceName="[Redacted]\EntityService.svc"
>
<clientSettings isDistributed="true" />
</objectServer>
<notificationService clientPort="39199"/>
</ideablade.configuration>
The full stack trace of the exception thrown server side appears to be hidden somewhere in "NotificationServiceManager::AsyncNotify" perhaps there is a way of capturing more of what is happening there, we are unaware of how that is being captured and logged.
Our client is a WPF and we have explicitly declared the server side configuration for notification service and provided explicit files for EntityServer.svc and EntityService.svc in our BOS project.
Is there there explicit configuration that needs to be handled to allow for a load balanced environment?