New Posts New Posts RSS Feed: Push Notification Configuration
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Push Notification Configuration

 Post Reply Post Reply
Author
JamesM View Drop Down
Newbie
Newbie


Joined: 28-Sep-2011
Posts: 11
Post Options Post Options   Quote JamesM Quote  Post ReplyReply Direct Link To This Post Topic: Push Notification Configuration
    Posted: 30-Sep-2011 at 7:21am
Thank you for your response, one of the developers here came up with the idea of manually setting the bindings, apparantly thats the right route because it is your suggested solution as well.

making a change to the BOS's web.config to set the bindings manually:
---------------------------------------
<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">
          <gzipMessageEncoding>
            <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" />
          </gzipMessageEncoding>
          <httpTransport maxReceivedMessageSize="2147483647" />
        </binding>
 
      </customBinding>
 
      <wsDualHttpBinding>
        <binding name="dualBinding" messageEncoding="Mtom"  maxReceivedMessageSize="2147483647"  >
          <security mode="None"  />
        </binding>
      </wsDualHttpBinding> 
    </bindings> 
    <extensions>
      <bindingElementExtensions>
        <add name="gzipMessageEncoding" type="IdeaBlade.Core.Wcf.Extensions.GZipMessageEncodingElement, IdeaBlade.Core"/>
      </bindingElementExtensions>
 
    </extensions>
  </system.serviceModel>
---------------------------------------

as well as commenting out "System.Web.Hosting.HostingEnvironment.RegisterVirtualPathProvider(new IdeaBlade.EntityModel.Web.ServiceVirtualPathProvider());" in the global.asax file

we are currently testing this setup but it seems to be working,  however I am curious on the need to manually set up the bindings when switching the BOS over to port 80 from the demo 9009 port.  I may go as far as agree with your suspicious that it is a bug.
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 29-Sep-2011 at 5:50pm
Hi James,

Do you actually intend to use the Push Service over https?
If not, you could try creating a new web site on IIS only binding http to it, and deploy your app there.

Or, if you intend to use https or just don't want to create a new web site on IIS, then you could try setting the endpoint bindings manually. You will find sample N-Tier config files in the DevForce Resource Center.

I am investigating the problem you stated and suspect it might be a bug with the default config. 
I will keep you updated.

Regards,
   Silvio.


Edited by sbelini - 29-Sep-2011 at 5:54pm
Back to Top
JamesM View Drop Down
Newbie
Newbie


Joined: 28-Sep-2011
Posts: 11
Post Options Post Options   Quote JamesM Quote  Post ReplyReply Direct Link To This Post Posted: 29-Sep-2011 at 10:16am
Update:

I used the demo application and got it working on port 9009 (using 9012 as notification port) and from the debug.log on the server it spits back these messages:
-----------------
IdeaBlade.EntityModel.Server EntityServerHostFactory::CreateServiceHost EntityServer listening on http://MyDomain:9009/WpfApplication1Web_deploy/EntityServer.svc

 IdeaBlade.EntityModel.Server EntityServerHostFactory::CreateServiceHost EntityServer listening on http://MyDomain:9009/WpfApplication1Web_deploy/EntityServer.svc/sl
------------------

and then once i make a subscription call it posts

---------
 IdeaBlade.EntityModel.Server EntityServerHostFactory::CreateServiceHost EntityServer listening on http://MyDomain:9009/WpfApplication1Web_deploy/EntityServer.svc/NotificationService
------------------

and send notifications just fine.

but when I switch the boss over to port 80 (still using 9012 as notification port) the debug.log spits back:
-----------------
IdeaBlade.EntityModel.Server EntityServerHostFactory::CreateServiceHost EntityServer listening on http://MyDomain/WpfApplication1Web_deploy/EntityServer.svc 

IdeaBlade.EntityModel.Server EntityServerHostFactory::CreateServiceHost EntityServer listening on http://MyDomain/WpfApplication1Web_deploy/EntityServer.svc/sl 

IdeaBlade.EntityModel.Server EntityServerHostFactory::CreateServiceHost EntityServer listening on https://MyDomain/WpfApplication1Web_deploy/EntityServer.svc 

IdeaBlade.EntityModel.Server EntityServerHostFactory::CreateServiceHost EntityServer listening on https://MyDomain/WpfApplication1Web_deploy/EntityServer.svc/sl 

IdeaBlade.EntityModel.Server EntityServerHostFactory::CreateServiceHost EntityServer listening on http://MyDomain/WpfApplication1Web_deploy/EntityServer.svc/NotificationService 

IdeaBlade.EntityModel.Server EntityServerHostFactory::CreateServiceHost EntityServer listening on http://MyDomain/WpfApplication1Web_deploy/EntityServer.svc/NotificationService
-----------------

And then throws the exception from my first post.  both in the demo and in my actually application I am using the default Global.asax:
System.Web.Hosting.HostingEnvironment.RegisterVirtualPathProvider(new IdeaBlade.EntityModel.Web.ServiceVirtualPathProvider()); 


Edited by JamesM - 29-Sep-2011 at 10:17am
Back to Top
JamesM View Drop Down
Newbie
Newbie


Joined: 28-Sep-2011
Posts: 11
Post Options Post Options   Quote JamesM Quote  Post ReplyReply Direct Link To This Post Posted: 28-Sep-2011 at 2:52pm
I am using 6.0.6.0

While attempting to set up Push notifications on our existing BOS I recieve the following error message when trying to connect my entitymanger to the BOS.  Specific details such and namespaces/connection strings redacted.

------------------------
IdeaBlade.EntityModel.EntityServerConnectionException: Unable to start EntityServer.svc service: The service '/MyDomain.BOS.Internal/EntityServer.svc' cannot be activated due to an exception during compilation.  The exception message is: A binding instance has already been associated to listen URI 'http://Localhost/MyDomain.BOS.Internal/EntityServer.svc/NotificationService'. If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config. . ---> System.ServiceModel.FaultException`1[IdeaBlade.EntityModel.EntityServerFault]: Unable to start EntityServer.svc service: The service '/MyDomain.BOS.Internal/EntityServer.svc' cannot be activated due to an exception during compilation.  The exception message is: A binding instance has already been associated to listen URI 'http://Localhost/MyDomain.BOS.Internal/EntityServer.svc/NotificationService'. If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config. .

Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   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.IEntityServiceContract.GetEntityServerName(String dataSourceExtension, String compositionContextName)
   at IdeaBlade.EntityModel.RemoteEntityServiceProxy.GetEntityServerName(String dataSourceExtension, String compositionContextName)
   at IdeaBlade.EntityModel.RemoteEntityServerProxyBase.Connect(ConnectAction action)
   --- End of inner exception stack trace ---
   at IdeaBlade.EntityModel.EntityManager.HandleEntityServerException(Exception ex, Boolean tryToHandle, PersistenceOperation operation, Boolean throwOnError)
   at IdeaBlade.EntityModel.EntityManager.Connect()
   at IdeaBlade.EntityModel.EntityManager.ConnectImplicit()
   at IdeaBlade.EntityModel.EntityManager..ctor(EntityManagerContext context)
   at IdeaBlade.EntityModel.EntityManager..ctor(Boolean shouldConnect, String dataSourceExtension, EntityServiceOption entityServiceOption, String compositionContextName)
   at MyNameSpace.DomainModel.MyNameSpaceEntities..ctor(Boolean shouldConnect, String dataSourceExtension, EntityServiceOption entityServiceOption, String compositionContextName) in E:\MyNameSpace\Working\Projects\MyNameSpace.DomainModel\MyNameSpaceEntities.IB.Designer.cs:line 34
   at MyNameSpace.DomainModel.Helper_Objects.ManagerSingleton.Nested..ctor(EventHandler`1 LookupInfoCompleted, Boolean loadsLookups) in E:\MyNameSpace\Working\Projects\MyNameSpace.DomainModel\Helper Objects\ManagerSingleton.cs:line 47
   at MyNameSpace.Client.WPF.Module.ViewModels.DashboardViewModel.MakeSingleton() in E:\MyNameSpace\Working\Projects\MyNameSpace.Client.WPF.Module\ViewModels\DashboardVMLogic.cs:line 67
------------------------

my configuration for my client is as follows:
-----------------------------
<configuration>
  
  <configSections>
    <section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core, Version=6.0.4.0, Culture=neutral, PublicKeyToken=287b5094865421c0"/>
 
  </configSections>
  <connectionStrings>
    <add name="CS_InstanceStore" connectionString="....."/>
  </connectionStrings>
 
  <ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig">
 
    <logging logFile="DebugLog.xml"/>
 
    
    <objectServer
      remoteBaseURL="http://localhost"
      serverPort="80"
      serviceName="MyDomain.BOS.Internal\EntityService.svc"
      >
      <clientSettings isDistributed="true" />
    </objectServer>
 
    <notificationService clientPort="9012"/>
 
  </ideablade.configuration>
 
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
</configuration>
---------------------------------

my configuration for my bos is as follows
------------------------------------------------
<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core"/>
  </configSections>
 
  <connectionStrings>
 
    <add name="MyDomainEntities" connectionString="..." />
 
  </connectionStrings>
 
  <ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig" >
 
    <logging logFile="log\DebugLog.xml"
              archiveLogs="true"/>
 
    <notificationService enabled="false"/>
 
  </ideablade.configuration>
 
  <system.serviceModel>
 
    <serviceHostingEnvironment aspNetCompatibilityEnabled="false"
                               multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
 
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
 
</configuration>
------------------------------------------------


The app builds runs and im able to do normal operations, until I switch <notificationService enabled="false"/> to <notificationService enabled="True"/> then I get the above error message and stacktrace. 

I'm sure I have just missed a small piece of configuration somewhere.

Thankyou in advance.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down