Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. PollingDuplexBindingElement -- Exceptions

PollingDuplexBindingElement -- Exceptions

Scheduled Pinned Locked Moved WCF and WF
csharplinqregexhelptutorial
2 Posts 2 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maifs
    wrote on last edited by
    #1

    Hi.. I am using PollingDuplexBindingElement . From the usage of this class, i am getting three exceptions. Kindly guide me what should i do to run my application. i ma using .Netframework4.0 ==============code behind===================== using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ServiceModel; using System.ServiceModel.Channels; using System.Configuration; namespace LiveChatService { public class LiveChatServiceHost : ServiceHost { public LiveChatServiceHost(params System.Uri[] addresses) { base.InitializeDescription(typeof(LiveChatService),new UriSchemeKeyedCollection(addresses)); } protected override void InitializeRuntime() { string pollTimeout = ConfigurationManager.AppSettings["PollTimeout"]; string inactivityTimeout = ConfigurationManager.AppSettings["InactivityTimeout"]; PollingDuplexBindingElement pdbe = new PollingDuplexBindingElement() { ClientPollTimeout = TimeSpan.Parse(pollTimeout), InactivityTimeout = TimeSpan.Parse(inactivityTimeout) }; AddServiceEndpoint(typeof(ILiveChatService), new CustomBinding( pdbe, new TextMessageEncodingBindingElement(MessageVersion.Soap11,System.Text.Encoding.UTF8), new HttpsTransportBindingElement()),""); base.InitializeRuntime(); } } } ==========================Exception============================Error 3 Argument 1: cannot convert from 'System.ServiceModel.Channels.PollingDuplexBindingElement' to 'System.ServiceModel.Channels.BindingElement' E:\facebook chat\SilverlightApplication1\LiveChatService\LiveChatServiceHost.cs 31 77 LiveChatService Error 2 The best overloaded method match for 'System.ServiceModel.Channels.CustomBinding.CustomBinding(params System.ServiceModel.Channels.BindingElement[])' has some invalid arguments E:\facebook chat\SilverlightApplication1\LiveChatService\LiveChatServiceHost.cs 31 58 LiveChatService Error 1 The type 'System.ServiceModel.Channels.BindingElement' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ServiceModel, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. E:\facebook chat\SilverlightApplication1\LiveChatService\Liv

    T 1 Reply Last reply
    0
    • M maifs

      Hi.. I am using PollingDuplexBindingElement . From the usage of this class, i am getting three exceptions. Kindly guide me what should i do to run my application. i ma using .Netframework4.0 ==============code behind===================== using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ServiceModel; using System.ServiceModel.Channels; using System.Configuration; namespace LiveChatService { public class LiveChatServiceHost : ServiceHost { public LiveChatServiceHost(params System.Uri[] addresses) { base.InitializeDescription(typeof(LiveChatService),new UriSchemeKeyedCollection(addresses)); } protected override void InitializeRuntime() { string pollTimeout = ConfigurationManager.AppSettings["PollTimeout"]; string inactivityTimeout = ConfigurationManager.AppSettings["InactivityTimeout"]; PollingDuplexBindingElement pdbe = new PollingDuplexBindingElement() { ClientPollTimeout = TimeSpan.Parse(pollTimeout), InactivityTimeout = TimeSpan.Parse(inactivityTimeout) }; AddServiceEndpoint(typeof(ILiveChatService), new CustomBinding( pdbe, new TextMessageEncodingBindingElement(MessageVersion.Soap11,System.Text.Encoding.UTF8), new HttpsTransportBindingElement()),""); base.InitializeRuntime(); } } } ==========================Exception============================Error 3 Argument 1: cannot convert from 'System.ServiceModel.Channels.PollingDuplexBindingElement' to 'System.ServiceModel.Channels.BindingElement' E:\facebook chat\SilverlightApplication1\LiveChatService\LiveChatServiceHost.cs 31 77 LiveChatService Error 2 The best overloaded method match for 'System.ServiceModel.Channels.CustomBinding.CustomBinding(params System.ServiceModel.Channels.BindingElement[])' has some invalid arguments E:\facebook chat\SilverlightApplication1\LiveChatService\LiveChatServiceHost.cs 31 58 LiveChatService Error 1 The type 'System.ServiceModel.Channels.BindingElement' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ServiceModel, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. E:\facebook chat\SilverlightApplication1\LiveChatService\Liv

      T Offline
      T Offline
      thatraja
      wrote on last edited by
      #2

      Found your threads somewhere PollingDuplexBindingElement - exceptions @ asp.net[^] PollingDuplexBindingElement - exceptions @ MSDN[^]

      thatraja


      FREE Code Conversion VB6 ASP VB.NET C# ASP.NET C++ JAVA PHP DELPHI | Nobody remains a virgin, Life screws everyone :sigh:

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups