.NET Framework secure .NET remoting tcp channel fails after upgrade W11 client PC to 24H2

Henk van der Vaart 20 Reputation points
2024-10-10T11:12:46.7933333+00:00

Problem

Since upgrading to Windows 11 24H2 on their client PC’s, our customers complain that they cannot use our C# client application (DTC) anymore.
The DTC application was running fine on a previous Windows 11 version (and on any other OS).
Our DTC application is in place for a long time with multiple released versions where the latest is released in June 2024 without any issues.
DTC is a C# application using .NET Remoting from .NET Framework 4.8 to communicate with a Server using a secure TCP-client-channel.
When running DTC on W11-24H2 execution of any .NET remoting method (defined on the interface) results in a security exception:
“Description: Either the target name is incorrect or the server has rejected the client credentials”

It seems related to the credentials (username/password) used in the client channel properties.
In our case the client attempts to connect to the server as an anonymous (empty username/password) user (NT AUTHORITY\ANONYMOUS LOGON).
We looked on the internet (and asked Copilot) for solutions but could not find a satisfy
Note that the DTC application did run correctly before upgrading to Windows 11 24H2 !!

Question

Is there any setting (registry/policy etc.) within Windows 11 24H2 to resolve this and get DTC operational again?
Maybe another approach to use (anonymous) credentials in setting up a secure Client-TCP-channel?
An answer is very appreciated and would solve our customers issues on short terms.

Additional Info

The DTC C# code snippet creating the secure client channel:

IDictionary sinkProperties = new Hashtable();
sinkProperties["typeFilterLevel"] = "Full";
BinaryClientFormatterSinkProvider binaryClientFormatterSinkProvider = new BinaryClientFormatterSinkProvider(sinkProperties, providerData: null);
IDictionary channelProperties = new Hashtable();
channelProperties["timeout"] = timeoutSeconds * 1000;
channelProperties["username"] = "";
channelProperties["password"] = "";
channelProperties["name"] = "secured";
_clientTcpChannelSecured = new TcpClientChannel(channelProperties, binaryClientFormatterSinkProvider);
ChannelServices.RegisterChannel(_clientTcpChannelSecured, ensureSecurity: true);

The configuration file on server side contains:

  <system.runtime.remoting>
    <application name="RemotingService">
      <lifetime leaseTime="20D" sponsorshipTimeout="1H" renewOnCallTime="1D" leaseManagerPollTime="1H" />
      <service>
        <wellknown type="RemotingService.ClientRemote, RemotingService.WinService" objectUri="ClientRemote" mode="SingleCall" displayName="Remoting Service" />
      </service>
      <channels>
        <channel name="secured" ref="tcp" secure="true" port="8087">
          <serverProviders>
            <formatter ref="binary" typeFilterLevel="Full" />
          </serverProviders>
        </channel>
      </channels>
    </application>
  </system.runtime.remoting>

Regards,

Henk van der Vaart - NEC Nederland B.V.

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,972 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,750 questions
{count} votes

Accepted answer
  1. Jiale Xue - MSFT 45,971 Reputation points Microsoft Vendor
    2024-10-21T02:33:56.44+00:00

    Hi @Henk van der Vaart , Welcome to Microsoft Q&A,

    So the solution for this case:

    In the short term, you can choose to use unsecured .NET remoting as a fallback.

    When using unsecured channels, encrypt/decrypt data during transmission

    In the medium to long term, you should replace .NET remoting with secure WCF.

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.