![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Duplex Channel Creation Error I'm attempting to programmatically create a client channel (the IXRingDhtMembershipinterface implements IClientChannel) and am receiving the following exception: "System.ArgumentException: Credentials specified in the SecurityBehavior are not sufficient to carry requested operation.\r\n at System.ServiceModel.Channels.PeerExceptionHelper.ThrowArgument_InsufficientCredentials()\r\n at System.ServiceModel.Channels.PeerSecurityManager.Create(PeerAuthenticationMode authenticationMode, Boolean messageAuthentication, PeerCredential credential)\r\n at System.ServiceModel.Channels.PeerSecurityManager.Create(PeerSecuritySettings security, BindingContext context)\r\n at System.ServiceModel.Channels.PeerChannelFactory`1..ctor(PeerTransportBindingElement bindingElement, BindingContext context, PeerResolver peerResolver)\r\n at System.ServiceModel.Channels.PeerTransportBindingElement.BuildChannelFactory[TChannel](BindingContext context)\r\n at System.ServiceModel.Channels.BindingContext.BuildInnerChannelFactory[TChannel]()\r\n at System.ServiceModel.Channels.MessageEncodingBindingElement.InternalBuildChannelFactory[TChannel](BindingContext context)\r\n at System.Ser viceModel.Channels.BinaryMessageEncodingBindingElement.BuildChannelFactory[TChannel](BindingContext context)\r\n at System.ServiceModel.Channels.BindingContext.BuildInnerChannelFactory[TChannel]()\r\n at System.ServiceModel.Channels.PeerCustomResolverBindingElement.BuildChannelFactory[TChannel](BindingContext context)\r\n at System.ServiceModel.Channels.BindingContext.BuildInnerChannelFactory[TChannel]()\r\n at System.ServiceModel.Channels.Binding.BuildChannelFactory[TChannel](BindingParameterCollection parameters)\r\n at System.ServiceModel.Channels.ServiceChannelFactory.BuildChannelFactory(ServiceEndpoint serviceEndpoint)\r\n at System.ServiceModel.ChannelFactory.CreateFactory()\r\n at System.ServiceModel.ChannelFactory.OnOpening()\r\n at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)\r\n at System.ServiceModel.Channels.CommunicationObject.Open()\r\n at System.ServiceModel.ChannelFactory.EnsureOpened()\r\n at System.ServiceModel.DuplexChannelFactory`1.CreateChan nel(InstanceContext callbackInstance)\r\n at System.ServiceModel.DuplexChannelFactory`1.CreateChannel()\r\n at IDynamics.Framework.P2P.Dht.XRing.Mrl.InitializeDuplexChannel() in C:\\Projects\\IDynamics\\Framework\\System\\Engineering\\Source\\IDynamics Framework\\IDynamics.Framework\\P2P\\Dht\\XRing\\Mrl.cs:line 254\r\n at IDynamics.Framework.P2P.Dht.XRing.Mrl..ctor(DhtNodeId id, String meshId) in C:\\Projects\\IDynamics\\Framework\\System\\Engineering\\Source\\IDynamics Framework\\IDynamics.Framework\\P2P\\Dht\\XRing\\Mrl.cs:line 213\r\n at IDynamics.Framework.P2P.Dht.XRing.XRingDhtNode..ctor(DhtNodeId id, String meshId, XRingDhtNodeFlags flags) in C:\\Projects\\IDynamics\\Framework\\System\\Engineering\\Source\\IDynamics Framework\\IDynamics.Framework\\P2P\\Dht\\XRing\\XRingDhtNode.cs:line 242\r\n at ConsoleApplication1.Program.CreateNodes() in C:\\Projects\\IDynamics\\Framework\\System\\Engineering\\Source\\IDynamics Framework\\ConsoleApplication1\\Program.cs:line 97\r\n at ConsoleApplication1.P rogram.Main(String[] args) in C:\\Projects\\IDynamics\\Framework\\System\\Engineering\\Source\\IDynamics Framework\\ConsoleApplication1\\Program.cs:line 43" Here's is a code snippet: <snippet> InstanceContext instanceContext = new InstanceContext(this); // // Create the contract. // ContractDescription contract = ContractDescription.GetContract(typeof(IXRingDhtMembership)); // // Create a peer binding with a custom resolver, which is required // since the current operating system is the Windows 2003 Server family. // NetPeerTcpBinding binding = new NetPeerTcpBinding(); binding.Port = _id.Url.Port; binding.Resolver.Custom.Address = new EndpointAddress(KEY_PeerResolverAddress); binding.Resolver.Custom.Binding = new NetTcpBinding(SecurityMode.None, true); binding.Resolver.Custom.Resolver = new CustomPeerResolver(); binding.Resolver.Mode = PeerResolverMode.Custom; // // Create the address. // EndpointAddress address = new EndpointAddress(_id.Url.ToString()); ServiceEndpoint endpoint = new ServiceEndpoint(contract, binding, address); using (DuplexChannelFactory<IXRingDhtMembershipChannel> factory = new DuplexChannelFactory<IXRingDhtMembershipChannel>(_instanceContext, endpoint)) { // // ERROR: The following line is throwing the error. // using (IXRingDhtMembershipChannel participant = factory.CreateChannel()) { } } </snippet> Any help is appreciated. Kindest regards, Michael |
My System Specs![]() |
| | #2 (permalink) |
| | SOLVED: Duplex Channel Creation Error The solution was to specify (at least in development) the binding security mode to "None". binding.Security.Mode = SecurityMode.None; "Michael Primeaux" <mjprimeaux@msn.com> wrote in message news:Op5FJzFcGHA.536@TK2MSFTNGP02.phx.gbl... > I'm attempting to programmatically create a client channel (the > IXRingDhtMembershipinterface implements IClientChannel) and am receiving > the following exception: > > "System.ArgumentException: Credentials specified in the SecurityBehavior > are not sufficient to carry requested operation.\r\n at > System.ServiceModel.Channels.PeerExceptionHelper.ThrowArgument_InsufficientCredentials()\r\n > at > System.ServiceModel.Channels.PeerSecurityManager.Create(PeerAuthenticationMode > authenticationMode, Boolean messageAuthentication, PeerCredential > credential)\r\n at > System.ServiceModel.Channels.PeerSecurityManager.Create(PeerSecuritySettings > security, BindingContext context)\r\n at > System.ServiceModel.Channels.PeerChannelFactory`1..ctor(PeerTransportBindingElement > bindingElement, BindingContext context, PeerResolver peerResolver)\r\n > at > System.ServiceModel.Channels.PeerTransportBindingElement.BuildChannelFactory[TChannel](BindingContext > context)\r\n at > System.ServiceModel.Channels.BindingContext.BuildInnerChannelFactory[TChannel]()\r\n > at > System.ServiceModel.Channels.MessageEncodingBindingElement.InternalBuildChannelFactory[TChannel](BindingContext > context)\r\n at System.Ser > viceModel.Channels.BinaryMessageEncodingBindingElement.BuildChannelFactory[TChannel](BindingContext > context)\r\n at > System.ServiceModel.Channels.BindingContext.BuildInnerChannelFactory[TChannel]()\r\n > at > System.ServiceModel.Channels.PeerCustomResolverBindingElement.BuildChannelFactory[TChannel](BindingContext > context)\r\n at > System.ServiceModel.Channels.BindingContext.BuildInnerChannelFactory[TChannel]()\r\n > at > System.ServiceModel.Channels.Binding.BuildChannelFactory[TChannel](BindingParameterCollection > parameters)\r\n at > System.ServiceModel.Channels.ServiceChannelFactory.BuildChannelFactory(ServiceEndpoint > serviceEndpoint)\r\n at > System.ServiceModel.ChannelFactory.CreateFactory()\r\n at > System.ServiceModel.ChannelFactory.OnOpening()\r\n at > System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan > timeout)\r\n at > System.ServiceModel.Channels.CommunicationObject.Open()\r\n at > System.ServiceModel.ChannelFactory.EnsureOpened()\r\n at > System.ServiceModel.DuplexChannelFactory`1.CreateChan > nel(InstanceContext callbackInstance)\r\n at > System.ServiceModel.DuplexChannelFactory`1.CreateChannel()\r\n at > IDynamics.Framework.P2P.Dht.XRing.Mrl.InitializeDuplexChannel() in > C:\\Projects\\IDynamics\\Framework\\System\\Engineering\\Source\\IDynamics > Framework\\IDynamics.Framework\\P2P\\Dht\\XRing\\Mrl.cs:line 254\r\n at > IDynamics.Framework.P2P.Dht.XRing.Mrl..ctor(DhtNodeId id, String meshId) > in > C:\\Projects\\IDynamics\\Framework\\System\\Engineering\\Source\\IDynamics > Framework\\IDynamics.Framework\\P2P\\Dht\\XRing\\Mrl.cs:line 213\r\n at > IDynamics.Framework.P2P.Dht.XRing.XRingDhtNode..ctor(DhtNodeId id, String > meshId, XRingDhtNodeFlags flags) in > C:\\Projects\\IDynamics\\Framework\\System\\Engineering\\Source\\IDynamics > Framework\\IDynamics.Framework\\P2P\\Dht\\XRing\\XRingDhtNode.cs:line > 242\r\n at ConsoleApplication1.Program.CreateNodes() in > C:\\Projects\\IDynamics\\Framework\\System\\Engineering\\Source\\IDynamics > Framework\\ConsoleApplication1\\Program.cs:line 97\r\n at > ConsoleApplication1.P > rogram.Main(String[] args) in > C:\\Projects\\IDynamics\\Framework\\System\\Engineering\\Source\\IDynamics > Framework\\ConsoleApplication1\\Program.cs:line 43" > > Here's is a code snippet: > > <snippet> > InstanceContext instanceContext = new InstanceContext(this); > > // > // Create the contract. > // > ContractDescription contract = > ContractDescription.GetContract(typeof(IXRingDhtMembership)); > > // > // Create a peer binding with a custom resolver, which is required > // since the current operating system is the Windows 2003 Server family. > // > NetPeerTcpBinding binding = new NetPeerTcpBinding(); > binding.Port = _id.Url.Port; > binding.Resolver.Custom.Address = new > EndpointAddress(KEY_PeerResolverAddress); > binding.Resolver.Custom.Binding = new NetTcpBinding(SecurityMode.None, > true); > binding.Resolver.Custom.Resolver = new CustomPeerResolver(); > binding.Resolver.Mode = PeerResolverMode.Custom; > > // > // Create the address. > // > EndpointAddress address = new EndpointAddress(_id.Url.ToString()); > > ServiceEndpoint endpoint = new ServiceEndpoint(contract, binding, > address); > using (DuplexChannelFactory<IXRingDhtMembershipChannel> factory = > new DuplexChannelFactory<IXRingDhtMembershipChannel>(_instanceContext, > endpoint)) > { > // > // ERROR: The following line is throwing the error. > // > using (IXRingDhtMembershipChannel participant = > factory.CreateChannel()) > { > } > } > </snippet> > > Any help is appreciated. > > Kindest regards, > Michael > |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Channel 9 to swallow Channel 8, Channel 10, and Coding4Fun | Vista News | |||
| 2 GB dual channel vs 3 GB single channel | Vista hardware & devices | |||
| HP6980 will not Automatically do Duplex with Duplex Hardware | Vista print fax & scan | |||