web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Warehouse Mobile App – Login Redirection and Session Reset Issue

(0) ShareShare
ReportReport
Posted on by

Hi All,

Currently, I am working on a Warehouse Mobile Application customization. The requirement is that if any error occurs during the container closing process, the session should be logged out and the user should be redirected to the login page.

For this, I am working with the ProcessGuideExceptionHandler class, which handles errors in the Warehouse Mobile Application. When an error occurs, I am changing the mode and step to redirect the user to the login page.

The redirection to the login page is working as expected, but I am facing an issue when trying to log in again.

During debugging, I observed the following behavior:

  1. After the error occurs, the session is redirected to the login page.
  2. When I enter the username and password for the first time, the container is not retaining the entered username and password.
  3. It proceeds to validate the username and password, but since the values are empty, it builds the login page again.
  4. When I enter the username and password for the second time, the values are stored in the container correctly.
  5. It then validates the username and password successfully.
  6. After successful validation, the mode is changed from Login to Menu.

Additionally, if I enter an incorrect username or password, the process method is called and the execution flow appears to be correct. However, instead of handling the invalid credentials properly, it returns a "Root element is missing" error.

So, the main issues I am currently facing are:

  • Username and password are not retained in the container during the first login attempt after redirecting from the error-handling process.
  • When incorrect credentials are entered, the execution flow is correct, but it results in a "Root element is missing" error.

Could anyone please advise on what might be causing these issues or suggest the correct approach to reset the session and redirect the user to the login page?

I have the same question (0)
  • Suggested answer
    AS-21081411-0 Profile Picture
    38 on at

    The issue happens because redirecting to the Login page from inside ProcessGuideExceptionHandler doesn’t reset the WMA session. The session container still holds the previous workflow state, so the first login attempt drops the username/password, and invalid credentials produce the “Root element is missing” XML error.

    You can follow the OOTB pattern Microsoft uses for session teardown. The framework handles expired/invalid sessions through:

    WHSWorkExecuteSessionExpiredException

    WHSWorkExecuteDisplay::sessionExpired()

    WHSWorkExecuteDisplay::clearSession(context)

    These show the correct way to wipe the session and rebuild the login page cleanly.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 92 Super User 2026 Season 2

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 66 Super User 2026 Season 2

#2
Paolo Cecchelli Profile Picture

Paolo Cecchelli 66 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans