PollingDuplexBindingElement -- Exceptions
-
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
-
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
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: