edited July 2010 in Photon Server

I've been staring myself blind on this problem for a good portion of the day and I keep banging my head against the wall, so I was thinking maybe I could get some input here.

I've got an Operation that looks like this:
namespace Photon.MmoDemo.Server.Operations
    using Photon.MmoDemo.Common;
    using Photon.SocketServer;
    using Photon.SocketServer.Mmo;
    using Photon.SocketServer.Rpc;
    using System;

    public class ConfirmLoginToken : Operation
        public ConfirmLoginToken(OperationRequest request)
            : base(request)

        [RequestParameter(Code = (short)ParameterCode.LoginTokenToValidate)]
        public string LoginTokenToValidate { get; set; }

        [ResponseParameter(Code = (short)ParameterCode.ValidLoginToken)]
        public bool ValidLoginToken { get; set; }

Clientside its sent using this method:
        public static void ConfirmLoginToken(Game game, string LoginToken)
            if (LoginToken == null) LoginToken = "dddddddddddddddddddddddddddddddd";

            var data = new Hashtable
                { (byte)ParameterCode.LoginTokenToValidate, LoginToken }

            game.SendOperation(OperationCode.ConfirmLoginToken, data, true, Settings.OperationChannel);

And its routed to the following method on the active operations dispatcher:
        [Operation(OperationCode = (byte)OperationCode.ConfirmLoginToken)]
        public OperationResponse OperationConfirmLoginToken(Peer peer, OperationRequest request)
            var operation = new ConfirmLoginToken(request);
            MethodReturnValue result = operation.PopulateParameters();

            if (!result)
                return new OperationResponse(request, result);


What seems to be the problem is
failing somehow, triggering
return new OperationResponse(request, result);
. This then means my client getting an invalid operation return, in this case the value of the ErrorCode returned is 52. I'm not really sure what ErrorCode 52 is, and I cant seem to figure out why PopulateParameters would fail?

Been trying to debug the PhotonSocketServer (My DLL's are debug compiled) by attaching the debugger, but symbols aren't loaded for some reason.

Am I missing something terribly obvious?

Thankful for any pointers or help. Have a nice evening!


  • BorisBoris ✭✭
    The mmo demo defines error code 52 as operationNotSupported.
    --> You aren't even entering your method.

    Connected to a wrong application?
    Forgot to dispatch your operation code?
  • Thats what I thought at first, but I double checked and as far as I can see I'm connected to the right application. All other operations being dispatched and handled correctly.

    This takes place after the client has gotten an Ok response to EnterWorld operation and the server should have changed Operation Dispatcher to MmoActor.

    from MmoActors OnOperationRequest
                switch ((OperationCode)operationRequest.OperationCode)
                    case OperationCode.ConfirmLoginToken:
                            return this.OperationConfirmLoginToken(peer, operationRequest);

    Which I think should dispatch the operation code correctly?

    EDIT: After more investigation: You are right, the operation code isn't dispatched correctly, never entering the method (Changed operation response to always return Ok to see...) Now I know what to investigate next. Thank you!
  • Well, problem solved. I'm putting this down to stupidity on my part. The SocketServer was loading the wrong version of the server DLL because of me overlooking something.. *DOH!*
Sign In or Register to comment.