======================= The server application ======================= Let's start by preparing the server application. Make sure you have a server with .NET Framework 4.7.2 and Sql Server installed (for the latter a 2016 Express or above it’s ok). The server must be reachable from any of the client you want to connect. If you want to make a "worlwide" chat, you server must have a public IP address. Create an empty database in your server’s Sql Server instance and run the script "CreateDatabase.sql" you can find in the database project contained in the TDP.ChatServer solution. Next build the TDP.ChatServer project an copy the outcome in a folder on the server. In the configuration file "TDP.ChatServer.exe.config" check the following parameters: For push library: - PushLib:ListenIPAddress: it is the IP address used by the push notification library. You have to enter an IP address which is reachable by the clients - PushLib:ListenPort: it is the TCP/IP port used by the push notification library. Check the firewall configuration, as this port must be open and reachable by the clients - PushLib:AuthenticationTokenDurationMinutes: is the the number of minutes of validity of the authentication token - PushLib:ValidateAuthenticationToken: if true the library will check the validity of the authentication token - PushLib:UseSSL: if true the library will encrypt the communication using the SSL certificate specifed in the parameter "Certificate" - PushLib:Certificate: specify here the path of the SSL certificate (.pfx, .cer, etc.) - PushLib:CertificatePassword: specify here the SSL certificate password For chat: - Chat:ListenIPAddress: it is the IP address used by the chat service. You have to enter an IP address which is reachable by the clients - Chat:ListenPort: it is the TCP/IP port used by the chat service. Check the firewall configuration, as this port must be open and reachable by the clients - Chat:AuthTokenDurationMinutes: is the the number of minutes of validity of the authentication token - Chat:UseSsl: if true the communication will be encrypted using the SSL certificate specifed in the paramter "Certificate" - Chat:Certificate: specify here the path of the SSL certificate (.pfx, .cer, etc.) - Chat:CertificatePassword: specify here the SSL certificate password - Chat:RSAKey: the RSA public/private key pair used for token validation. Take a look at the project RSAKeyGeneration to generate your own key DBConnectionString: this is the connection string that the server will use to connect to your Sql Server database, ensure it is correct As a certificate you can use a self signed certificate generated using Microsoft IIS. ======================= The client application ======================= To prepare the client application, open the solution TDP.ChatClient and build the project TDP.ChatClient. Copy the outcome on each client you want to use. In the configuration file "TDP.ChatClient.exe.config" che the following parameters: For push library: - PushLib:ConnectIPAddress: it is the IP address used by the push notification library. The IP address must match the one configured in the server parameter "PushLib:ListenIPAddress" - PushLib:ConnectPort: it is the TCP/IP port used by the push notification library. The port number must match the one configured in the server parameter "PushLib:ListenPort" - PushLib:UseSsl: if true the library will encrypt the communication using the SSL certificate specifed in the paramter "Certificate" - PushLib:SslTargetHost: must match the host name of the SSL certificate, unless "IgnoreSslErrors" is set to true - PushLib:IgnoreSslErrors: if true the client will ignore an invalid certificate For chat: - Chat:ConnectIPAddress: it is the IP address used by the chat service. The IP address must match the one configured in the server parameter "Chat:ListenIPAddress" - Chat:ConnectPort: it is the TCP/IP port used by the chat service. The port number must match the one configured in the server parameter "Chat:ListenPort" - Chat:UseSsl: if true the library will encrypt the communication using the SSL certificate specifed in the paramter "Certificate" - Chat:SslTargetHost: must match the host name of the SSL certificate, unless "IgnoreSslErrors" is set to true - Chat:IgnoreSslErrors: if true the client will ignore an invalid certificate - Chat:AuthTokenMinutesToRenew: when the validity time of the token reaches the specified number of minutes the client will request the renewal of the token from the server - Chat:AuthTokenCheckExpiringIntervalMS: the client will periodically check the validity of the token with the frequency specified in this parameter (in milliseconds) Ask a problem to: me@thedummyprogrammer.com, I will try to answer as soon as possible