Hey all, I am trying to implement the simple password example when connecting a client to a server. Every time I tag a password string on to the ConnectToServer call I get a "RSAPublicKeyMismatch"... I have double checked that the password is correct in spelling and case in the Network.incomingPassword variable on the server instance. I have no problem connecting without the password. Any ideas? Thanks, Matt
You should only get that message when security has been enabled, its not related to the password. Have you enabled security by any chance? And did you only do it on the server, before initializing it?
Hey larus, My first iteration did include the call to InitialzeSecurity()... but when I got the RSA mismatch I took it out thinking there was more to be done on the configuration and that's why I was getting the error. But now all I have on the server instance is: Network.incomingPassword = "password"; Network.InitializeServer(maxPlayers, listenPort); And on the client: Network.Connect("myserver.net", 25000, "password"); and I'm still getting the mismatch error. Thanks, Matt
Well, the RSAPublicKeyMismatch error should not occur in relation with the password functionality. I think you have security enabled somewhere in your scripts. The password functionality is pretty simple and I've verified that it does work as it should. If you try adding it to one of the scenes in the networking example project it should work fine. You could file a bug with your project attached (minimalist scene if possible) and I'll take a look at it. PM me the case number if you do.
I created a new project with two scenes (one for client and one for server)... added a empty object and attached the following scripts: Client: function Start () { Network.Connect("myIP", 25000, "test"); } Server: function Start() { Network.incomingPassword = "test"; Network.InitializeServer(32, 25000); } I then build the server scene for the Windows platform and launched it on our webserver. I run the client scene from the dev environment and now I get "The remote system is using a password and has refused our connection because we did not set the correct password." in the console. If I take out the password argument on the client and remove the incomingPassword on the server... connects fine. Unless anyone else has ideas, I will package and file a bug report this afternoon. Thanks, Matt
Ahh, thats a known issue, you have to place the Network.incomingPassword call behind InitializeServer. I had completely forgotten about it, sorry. This is fixed in 2.0.2, which will be out soon(ish).