Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9169619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:54:15+00:00 2026-06-17T15:54:15+00:00

Here is how I run WCF host: var baseAddress = new Uri(net.tcp://localhost:2222/blah); var binding

  • 0

Here is how I run WCF host:

var baseAddress = new Uri("net.tcp://localhost:2222/blah");

var binding = new NetTcpBinding();
binding.Security.Mode = SecurityMode.Transport;

var sh = new ServiceHost(typeof(MyServiceImpl), baseAddress);
sh.AddServiceEndpoint(typeof(IMyService), binding, baseAddress);
sh.Open();

Here’s my client:

Uri uri = new Uri("net.tcp://localhost:2222/blah");
var address = new EndpointAddress(uri);
var binding = new NetTcpBinding();
binding.Security.Mode = SecurityMode.Transport;
var client = new MyServiceClient(binding, address);
client.Open();

When I execute both client and server using Mono 2.10 runtime, all works. But when server is running on .NET 4.0, I get a System.IO.IOException: Read failure ---> System.Exception: An existing connection was forcibly closed by the remote host. I also verified that with binding.Security.Mode = SecurityMode.None all works fine. Is there a possibility that I could somehow make those two runtimes interoperate with properly working security?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:54:16+00:00Added an answer on June 17, 2026 at 3:54 pm

    Unfortunately, support for NetTcpBinding is very limited in Mono and it does not support any kind of security.

    If you only look at the source of of NetTcpBinding.cs, it may appear that it does, but if you look at the actual binding elements, you’ll see a lot of methods that are not implemented.

    I actually ran into the same problem a couple of days ago while I was working on my new WCF configuration system, wanted to get NetTcpBinding working with security and when I investigated why it was not working, I realised that too much is not implemented, so it’s probably a larger task to get it working.

    Also note that by default, NetTcpBinding uses WindowsStreamSecurityBindingElement – unfortunately, I could not find any documentation on the underlying transport mechanism.

    Use BasicHttpBinding or the new BasicHttpsBinding if you’re using .NET 4.5 (it will also be available in MonoTouch shortly).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

WCF newbie here... I'm trying to self-host a WCF service using NetTcpBinding. Based on
Here's my tiny script to run celeryd: #!/bin/bash -x LOG=/home/var/log/ingest.log sudo -u apache bash
Here are my classes: http://pastebin.com/3dc5Vb1t When I try to run BookStore b = new
Here is a simplified version of something I'm trying to run: for (var i
I am trying to host a WCF service, using NetTcpBinding in a Windows service.
I run this code here <html> <script type=text/javascript src=lib/jquery-ui-1.8.21.custom.min.js></script> <script src=http://127.0.0.1:5984/_utils/script/jquery.couch.js></script> <!--<script type=text/javascript src=lib/jquery-1.7.2.js></script>-->
Here is a sample run of simple json using python2.4 version >>> >>> orig='{key1:Val,
Here is the way I test JSONP: I run XAMPP, and in folder htdocs
All Here i want to run .sh file via system call in android NDK.
Here is my Code that I'm trying to run on Mac OS X: import

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.