Ich habe das Spiel einfach über localhost mit diesen Konfigurationen getestet:
Client-Winapp-Anwendung:
App.Config-Datei
Code: Select all
Code: Select all
ChannelFactory remoteFactory= new ChannelFactory("CommandBoard");
ICommandBoardService proxy = remoteFactory.CreateChannel();
Die App.config ist einfach. Ich habe nichts geändert, nur am eigentlichen Code.
Code: Select all
Code: Select all
static void Main(string[] args)
{
using (ServiceHost host = new ServiceHost(typeof(CommandBoardServiceLibrary.CommandBoardService)))
{
host.AddServiceEndpoint(typeof(
CommandBoardServiceLibrary.ICommandBoardService),
new NetTcpBinding(),
"net.tcp://localhost:9000/commandboard");
host.Open();
Console.ReadLine();
}
}
Wenn ich jetzt die App.Config des Clients in
ändere
Code: Select all
Code: Select all
System.ServiceModel.Security.SecurityNegotiationException: The server has rejected the client credentials. ---> System.Security.Authentication.InvalidCredentialException: The server has rejected the client credentials. ---> System.ComponentModel.Win32Exception: The logon attempt failedBEARBEITEN: Web.config für den WCF-Dienst
Code: Select all
Mobile version