I have created a service class that should return the same data passed to the service (for testing purposes). The idea of hosting a web service on IIS instead of AOS is that I cannot use Windows authentication, as this service will be used by different domain users.
This service has been exposed and I created an HTTP Inbound port, set up as described here (https://blogs.msdn.microsoft.com/axsupport/2013/04/23/how-to-implement-basic-authentication-with-dynamics-ax-2012-web-services/). I am able to add the service reference in a visual studio console application, and I am also asked the credentials (which is what I need). the credentials are correct and accepted.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ConsoleApplication.H5PortalService;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
TestServiceClient proxy = new TestServiceClient();
proxy.ChannelFactory.Credentials.UserName.UserName = @"username"
proxy.ChannelFactory.Credentials.UserName.Password = "password";
CallContext context = new CallContext();
try
{
proxy.processString(context, "testRequest");
Console.WriteLine();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Console.ReadLine();
}
}
}
When I call the service (proxy.processString) I get an System.ServiceModel.FaultException error. IIS is configured ok and validated.
any ideas on how to resolve the issue?
Thanks
*This post is locked for comments
I have the same question (0)