There is a WCF service that works over TCP.

How can I get a login at the time of opening a connection, and not at the time of method calls?

Can I get the name of the application with which the connection is made?

If possible, with an example.

    1 answer 1

    No you can not. No, you can not.

    The format of the transmitted messages is designed in such a way that the security token is transmitted only when method calls. Well, the "application name" does not exist at all within the framework of WCF.

    Of course, to transfer the name of the application, you can use the SOAP headers - but it must be remembered that such a way to distinguish between applications is purely voluntary, it is impossible to tie the security logic to it.