I have a WCF service hosted on a Windows Server with IIS, and is set to Windows Authentication (the users inside the company must use domain authentication to login their desktop). I want to call this WCF service from a linux (ubuntu) with Mono. We uses netTcp protocol, but it can be change. I create the service as:
var s = new WebTestService.TestServiceClient();
s.ClientCredentials.UserName.UserName = "mydomain\\myuser";
s.ClientCredentials.UserName.Password = "myPassword";
But it still does not enable the communication.
Does anyone have an idea where to fix this error? Does it possible to resolve?Thanks in advance.
Unhandled Exception: System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer. ---> System.Net.Sockets.SocketException: Connection reset by peer at System.Net.Sockets.Socket.Receive (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Net.Sockets.SocketFlags socketFlags) [0x00052] in :0 at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x000b4] in :0
--- End of inner exception stack trace --- at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_remoting_wrapper (intptr,intptr)
at (wrapper remoting-invoke) MonoTest.WebTestService.ITestService:GetIdentity () at MonoTest.WebTestService.TestServiceClient.GetIdentity () [0x00007] in <27f805f676fd42ad978ebb382e24c2d7>:0 at MonoTest.Program.Main (System.String[] args) [0x00050] in <27f805f676fd42ad978ebb382e24c2d7>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer. ---> System.Net.Sockets.SocketException: Connection reset by peer at System.Net.Sockets.Socket.Receive (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Net.Sockets.SocketFlags socketFlags) [0x00052] in :0 at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x000b4] in :0 --- End of inner exception stack trace --- at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_remoting_wrapper (intptr,intptr)
at (wrapper remoting-invoke) MonoTest.WebTestService.ITestService:GetIdentity () at MonoTest.WebTestService.TestServiceClient.GetIdentity () [0x00007] in <27f805f676fd42ad978ebb382e24c2d7>:0 at MonoTest.Program.Main (System.String[] args) [0x00050] in <27f805f676fd42ad978ebb382e24c2d7>:0