For all of you looking for a new D365 VHD Microsoft has just released the VHD with version 10.0.24
05 April 2022
19 October 2021
Call Dynamics AX2012 AIF Webservice from Postman
Lately I was forced to call a Dynamics AX2012 webservice from Postman. The service is deployed as an HTTP service inbound port in AX on the IIS instance.
First of all I had to authenticate against AX to get around "IIS 8.5 Detailed Error - 401.1 - Unauthorized" - there are some posts in the WWW suggesting to use Fiddler as a supporting tool for the authentication. In my case I was able to use NTLM authentication from postman:
Even though this is still beta it is working quite well for me.
After that I did some tests with GET and POST. In the header it is important to set
Content-Type = text/xml; charset=UTF-8
SOAPAction = http://tempuri.org/AXService/ProcessWhatever
In the POST scenario I was facing "400 Bad request". This is quite chalanging cause it just means that there is something wrong within the Body. In my case I finally wrote a working XMLwhich looks something like this:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:CallContext xmlns:h="http://schemas.microsoft.com/dynamics/2010/01/datacontracts"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<h:Company>ABC</h:Company>
<h:Language i:nil="true"/>
<h:LogonAsUser i:nil="true"/>
<h:MessageId i:nil="true"/>
<h:PartitionKey i:nil="true"/>
<h:PropertyBag i:nil="true"
xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/> </h:CallContext>
</s:Header>
<s:Body>
<ABCServiceRequest xmlns="http://tempuri.org">
<data>123</data>
</ABCServiceRequest >
</s:Body>
</s:Envelope>
The last error I saw was "500 internal server error" - Unexpected character encountered while parsing value. This was due to a wrong value within the body of the XML.
After all that was solved I now can try the AX interface through postman and I'm happy to see "200 Ok" and the response from the service
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<ABCServiceRequest xmlns="http://tempuri.org">
<response>processed :) </response>
</ABCServiceRequest >
</s:Body>
</s:Envelope>
08 March 2021
AX2012 Aos start error: Server terminated unexpectedly with 110 exitcode.
22 July 2020
D365 F&O SSRS Report drillthrough links
25 June 2020
D365 EventLog error ID1014: The signature is not valid. The data may have been tampered with.
exceptionMessage | ID1014: The signature is not valid. The data may have been tampered with. |
exceptionSource | System.IdentityModel |
exceptionStackTrace | at System.IdentityModel.RsaSignatureCookieTransform.Decode(Byte[] encoded) at System.IdentityModel.Tokens.SessionSecurityTokenHandler.ApplyTransforms(Byte[] cookie, Boolean outbound) at System.IdentityModel.Tokens.SessionSecurityTokenHandler.ReadToken(XmlReader reader, SecurityTokenResolver tokenResolver) at System.IdentityModel.Tokens.SessionSecurityTokenHandler.ReadToken(Byte[] token, SecurityTokenResolver tokenResolver) at System.IdentityModel.Services.SessionAuthenticationModule.ReadSessionTokenFromCookie(Byte[] sessionCookie) at System.IdentityModel.Services.SessionAuthenticationModule.TryReadSessionTokenFromCookie(SessionSecurityToken& sessionToken) at System.IdentityModel.Services.SessionAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs eventArgs) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) |
url | / |
Method | GET |
httpStatusCode | 500 |
userGuid | {00000000-0000-0000-0000-000000000000} |
31 March 2020
Parameter _reportName cannot be null or empty - in D365 F&O
06 February 2020
Get security protocal in D365 x++ code
This line is used to set the level:
System.Net.ServicePointManager::set_SecurityProtocol(System.Net.SecurityProtocolType::Tls12);
and this piece of code will show you what protocol is enabled
int secProtocol = System.Net.ServicePointManager::get_SecurityProtocol();
boolean ssl3 = secProtocol == enum2int(System.Net.SecurityProtocolType::Ssl3);
boolean tls = secProtocol == enum2int(System.Net.SecurityProtocolType::Tls);
boolean tls11 = secProtocol == enum2int(System.Net.SecurityProtocolType::Tls11);
boolean tls12 = secProtocol == enum2int(System.Net.SecurityProtocolType::Tls12);
boolean tls13 = secProtocol == 12288;
info(strFmt("SSL3 enabled: '%1' | TLS enabled: '%2' | TLS1.1 enabled: '%3' | TLS1.2 enabled: '%4' | TLS1.3 enabled: '%5'", ssl3, tls, tls11, tls12, tls13));
Values:
- Ssl3 48
Specifies the Secure Socket Layer (SSL) 3.0 security protocol. SSL 3.0 has been superseded by the Transport Layer Security (TLS) protocol and is provided for backward compatibility only. - SystemDefault 0
Allows the operating system to choose the best protocol to use, and to block protocols that are not secure. Unless your app has a specific reason not to, you should use this value. - Tls 192
Specifies the Transport Layer Security (TLS) 1.0 security protocol. The TLS 1.0 protocol is defined in IETF RFC 2246. - Tls11 768
Specifies the Transport Layer Security (TLS) 1.1 security protocol. The TLS 1.1 protocol is defined in IETF RFC 4346. On Windows systems, this value is supported starting with Windows 7. - Tls12 3072
Specifies the Transport Layer Security (TLS) 1.2 security protocol. The TLS 1.2 protocol is defined in IETF RFC 5246. On Windows systems, this value is supported starting with Windows 7. - Tls13 12288
Specifies the TLS 1.3 security protocol. The TLS protocol is defined in IETF RFC 8446.