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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Error on production but not on development

(0) ShareShare
ReportReport
Posted on by 140

Hi there, 

We have functionality that resets a password for a webuser. We use the class CryptoServiceProvider to generate salt and generate secure password hash codes. 

All our environments were recently updated to Platform release Update29, Application release 10.0.5.

When I run the code in our development environment, the password is reset and no error is thrown. 

When I run the same functionality in Production and UAT, it throws an error: 

Error executing code: Wrong type of argument for conversion function.

The code is very simple: 

this.UserPasswordIterations = 1000;
this.UserPasswordSalt = CryptoServiceProvider::generateSalt();
this.UserPasswordHash = CryptoServiceProvider::computeSaltedHash(_newPassword,this.UserPasswordSalt,this.UserPasswordIterations);

The catch is that it runs through the complete code and updates the password correctly. We just need the error to go away because the same functionality is used with integration. When integrating, integration sends back a fail response because of this error. 

All the code is exactly the same across all environments as we are using Azure DevOps for code and deployment. 

Does anyone have any idea how I can narrow down what causes this error? 

  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    This functionality is used in the standard application in a couple of places, for example on HCMWorker form (Human Resources - Workers- Workers - Time registration tab page), to set PIN code of the worker.

    I suggest you try to reproduce it in the standard application, and create a support request for Microsoft.

  • Sukrut Parab Profile Picture
    71,741 Moderator on at

    Try to reproduce it in UAT environment . There might be some difference the way it works in UAT , PROD vs Dev machines . If you can reproduce it in UAT ,  you should be able to debug it by connecting your dev VM to UAT environment.

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 August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 515 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
CU10121822-0 Profile Picture

CU10121822-0 360

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans