开发者

WCF: No service response from the server side

开发者 https://www.devze.com 2023-03-28 05:31 出处:网络
I just noticed the remote server accepts calls from any client but only responds to a few of them. I can telnet the same host & ip from any client.

I just noticed the remote server accepts calls from any client but only responds to a few of them. I can telnet the same host & ip from any client.

I set a breakpoint at the server side but it never trapped if I connected from unlucky client.

Another clue; I could get response if I only used ip adress instead of hostname:

C:\NET>Hello.exe remoteserver 1333

No response

C:\NET>Hello.exe 192.168.35.211 1333

Response from service: Server v3.32

You might thing it's a binding related but here is another symptom:

Client A

C:\NET>Hello.exe 192开发者_Python百科.168.35.211 1333

Response from service: Server v3.32

Client B

C:\NET>Hello.exe 192.168.35.211 1333

No response

As you see it looks very weird and I'm totally lost.

This is the client project's Pastebin code: Hello.cs

And this is the server's related section: Server.cs

Why does the server "choose" the clients? What would be the reason?


UPDATE

OK, I trapped the error at client side, during a service call:

The server has rejected the client credentials.

And the solution:

    NetTcpBinding tcpBind = new NetTcpBinding();
    tcpBind.Security.Mode = SecurityMode.None;
0

精彩评论

暂无评论...
验证码 换一张
取 消