3.1.5.1 Logon Failure or Connection Failure

If the server returns the value ecWrongServer (section 3.2.5.1.3) in the ReturnValue field of the RopLogon redirect response (section 2.2.1.1.2), then the client SHOULD create a new Session Context with the server that is specified by the ServerName field in the ROP response. Using that connection, the client then re-attempts the logon. For more details about creating a new Session Context, see [MS-OXCRPC] and [MS-OXCMAPIHTTP]. For more details about logging on to a message store, see section 3.1.4.1.

If the server returns either ecUnknownUser (section 3.2.5.1.3) or ecLoginFailure (section 3.2.5.1.3) in the ReturnValue field of the RopLogon ROP redirect response (section 2.2.1.1.2), then the client SHOULD use the Autodiscover HTTP Service protocol, as specified in [MS-OXDISCO], to attempt to retrieve updated user and server information. If successful, the client attempts to log on again by releasing the previous Session Context and creating a new Session Context with the information supplied by the Autodiscover HTTP Service protocol. If the client is not successful at retrieving updated information or if no changes are detected, then the client MUST fail the logon.

If the server returns the value ecMailboxInTransit (section 3.2.5.1.3) in the ReturnValue field of the RopLogon redirect response (section 2.2.1.1.2), then the mailbox being moved is locked for client access for the entire duration of the move. Any attempt to establish a new Store object for such a mailbox results in the ecMailboxInTransit error code.

If the client is unable to establish a Session Context to a public folder message store, then it can request a redirection to an alternative public folder message store from the private message store. The client can use an existing Session Context to the private message store, or create a new one. To request a redirection to an alternative public folder message store, the client issues a RopLogon request (section 2.2.1.1.1) to the private message store. The client MUST set the ALTERNATE_SERVER flag in the OpenFlags field of the RopLogon request. The logon request returns ecWrongServer and redirects the client to an alternate server. When issuing the logon request to the alternate server, the client MUST clear the ALTERNATE_SERVER flag and set the IGNORE_HOME_MDB flag in the OpenFlags field.

If the RPC session to the server is lost and then reconnected, then the existing logon is invalid. The client MUST log on again by calling RopLogon (the client can reuse the existing LogonID). Additionally, all objects (folders, messages, and tables) that were opened on the original logon are now invalid and MUST be re-opened. The new REPLGUID returned by RopLogon MUST be compared to the cached value. If the GUIDs are different, then the client MUST dispose of all local caches of server information. This includes any open Server objects, caches of data mappings, or caches of special FIDs. The effect MUST be similar to actually exiting the client application and restarting from the beginning of the process.