When developing VS studio components in AX2012 You might experience the following error trying to run the code:
When You build your vs project You will have to decide whether to publish to either client or server or maybe even both. This is where You need to keep in mind, that the server is quite certain to run as a 64 bit application where the client runs in 32 bit mode. So when building your dll for either server or client, You need specifically target the right cpu architecture. If You are deploying to both client and server You need to build using the “AnyCPU” option.
Using the AnyCPU option will cause a warning when compilling – just ignore it…
If You need to test your component on both server and client an easy way could be to:
- create a class with a new method and instantiate your dll in that method.
- Set the class to run on client
- Create a job and run the method.
- Switch the class properties to run on server and perform the same test again.
- If no errors occur You are good to go…
Today I spent quite some time struggling how to figure out was wrong with my client implementation of an AIF webservice. I kept getting the error “The HTTP request is unauthorized with client authentication scheme ‘Basic’. The authentication header received from the server was ‘Basic realm="some_domain_name"’.”
It was the realm part I didn’t understand. I had configured the service in AX to use basic authentication. From a reference environment, I knew the configuration had been working.
It turned out that my focus on the realm part was wrong because the reason to the error was invalid login credentials. How invalid login credentials can trigger the above error message is not for me to say. I would have expected a message like “Failed to log in to Microsoft Dynamics AX” instead. Just thought I would share my experience…
If you have been working with enterprise portal development, you will probably have gone through the same levels of frustration as I because error messages are not good in adding usable information into these messages. Over time I have collected some sites with suggestions on how to troubleshoot these more or less cryptric messages.
Error: Enterprise Portal Web Parts show "Unable to render content" error
Error: Unable to render content due to an error. Please contact your system administrator.
Generel troubleshooting: https://msdn.microsoft.com/en-us/library/cc554278.aspx