WCF SessionMod Logout issues?

it is error in the guide

you need to recreate SessionModClient proxy after call to the Login:
sessionId = sessionModClient.Login();

Something like this:
// now we need to create a new instance of the SessionModSvc client class before we can apply the
// Endpointbehavior to it, otherwise it will not pick up the new behavior.

builder.Path = instance + “/Ice/Lib/SessionMod.svc”;
sessionModClient = GetClient<SessionModSvcContractClient, SessionModSvcContract>(
builder.Uri.ToString(),
epicorUserID,
epiorUserPassword,
bindingType);

Otherwise behavior you add later is not applied. And no SessionID is sent to server for Logout

The code is already in the guide, it’s step 7 on page 15. It is missing from the full method code provided on page 18.

1 Like