![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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) |
| Guest | 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 | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2 GB dual channel vs 3 GB single channel | FrozenEclipse | Vista hardware & devices | 2 | 07-29-2008 09:52 PM |
| HP6980 will not Automatically do Duplex with Duplex Hardware | Dave | Vista print fax & scan | 1 | 07-07-2007 05:20 PM |
| Folder Creation Error On Network Drive | Ethical Loner | Vista General | 1 | 06-05-2007 09:59 AM |