I am consuming this AIF web service in D365. I have already written the code to consume the AIF web service in C#. also my app.config is also created. but when i try to push the data
i am getting below error :
"The provided URI scheme 'https' is invalid; expected 'http'. Parameter name: via"
For your reference i am using below url : In the name of Xyz.. i have my server name information..this is just a sample. for you guys
Please suggest me the solution for this..where i have to change exactly and what needs to be change?
If you're consuming an AIF service in D365, does it mean that your D365FO environment talks to an older version of AX. If so, which version?
If you mean that you're consuming a service provided by Fin&Ops, please tell us which type of service. AIF as such doesn't exist there anymore.
I am consuming AX2009 version's documented service..I have mentioned the format of URL. It was working for me for http and data was getting pushed to AX2009 from D365. But, when i made that url to https:// it was giving that above error.
You can't just change the URL. You would have to obtain an SSL certificate and reconfigure your AX 2009 service to use HTTPS.
So martin you are saying that I need to obtain SSL certificate from third party vendor (AX2009). and need to install in my D365 VM.
This is what you are trying to say. Correct me if i am wrong. Please confirm!!!
No. Imagine that you're accessing a web page (such as this one) via HTTPS. Is it you who buy and install an SSL certificate? No, it's done by the web master, you as an user doesn't have to do anything.
It's the same if D365FO is a client accessing web server on AX 2009. The certificate would have to be installed (and web server configured) on AX 2009.
That third party from AX2009 side they have done that this things already..They have installed the SSL certificate and also done the configuration from there side...but why i am not able to access through C# that is not understanding. I will share you the code...of C#
where i have consume the URL.
var binding = new System.ServiceModel.WSHttpBinding(); var endpointAddress = new EndpointAddress("">https://xyz.svc"); AX.GTESpendMgmtServiceClient sc = new AX.GTESpendMgmtServiceClient(binding, endpointAddress);
sc.ClientCredentials.UserName.UserName = userid sc.ClientCredentials.UserName.Password = pwd sc.ChannelFactory.Credentials.UserName.UserName = userid sc.ChannelFactory.Credentials.UserName.Password = "pwd; sc.ChannelFactory.Credentials.Windows.ClientCredential.Domain = "domain; sc.ChannelFactory.Credentials.Windows.ClientCredential.UserName = "userid"; sc.ChannelFactory.Credentials.Windows.ClientCredential.Password = "pwd"; sc.ClientCredentials.Windows.ClientCredential.Domain = "domain"; sc.ClientCredentials.Windows.ClientCredential.UserName = "userid"; sc.ClientCredentials.Windows.ClientCredential.Password = "pwd";
Below is the app.config
<?xml version="1.0" encoding="utf-8" ?><configuration> <system.serviceModel> <bindings> <wsHttpBinding> <binding name="TransportSecurity"> <security mode="Transport"> <transport clientCredentialType="None" /> </security> </binding> </wsHttpBinding> </bindings> <client> <endpoint address="">https://xyz.svc" binding="wsHttpBinding" bindingConfiguration="TransportSecurity" contract="AX.GTESpendMgmtService" name="MetadataExchangeHttpsBinding_GTESpendMgmtService"> <identity> <userPrincipalName value="" /> </identity> </endpoint> </client> </system.serviceModel></configuration>
this is my code..please suggest where i need to do change exactly to access https:// url....because this works good for http
Do I understand correctly that all the binding setup in app.config is ignored because you create a new binding in code? You code doesn't show what you with the binding variable - whether you set any properties (such as the security mode) and whether you use it at all when creating the service client.
Now i have put
binding.Security.Mode = SecurityMode.Transport; in my C# code.
but now i am getting below error.
The Application Integration Framework Web service cannot determine the Windows login of the user calling the Web service. Check the Web server Event Viewer for more information, or contact your Administrator.
Shouldn't you set clientCredentialType = "Windows" (binding.Security.Message.ClientCredentialType = MessageCredentialType.Windows)?Have you done what the error message told you to do?
Still I have added what you said but still no luck...It is giving me same error.
Is there anything to be checked from Ax2009 (Third party side, so that i can initiate with them)