Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
3
Answers
Is DuplexChannelFactory not supported on Windows 10??
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Steven Wong
9y
768
1
Reply
I am new on WCF and I am writing a universal app with WCF callback but got a exception 'Operation is not supported on this platform.'
My code is
In client side:
Uri addr = new Uri("net.tcp://localhost:8733/Service1/");
EndpointAddress endpoint = new EndpointAddress(addr);
Service1CallbackService scbs = new Service1CallbackService();
InstanceContext callback = new InstanceContext(scbs);
NetTcpBinding binding = new NetTcpBinding();
NetTcpSecurity ntSecurity = new NetTcpSecurity();
ntSecurity.Mode = SecurityMode.None;
binding.Security = ntSecurity;
// throw exception in here
DuplexChannelFactory<IService1> channelFactory = new DuplexChannelFactory<IService1>(callback, binding, endpoint);
In WCF Service
[ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(IMyContractCallBack))]
public interface IService1
{
[OperationContract(IsOneWay = true)]
void SendMessage(string ID, string message);
}
public interface IMyContractCallBack
{
[OperationContract(IsOneWay = true)]
void NotifyPCReceivedMessage(string ID, string message);
}
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
Binding
debugging of wcf service