1

I am trying to connect to an AX-based web service through ASP.Net and C# but, when I publish my application, querying the web service results in "System.ServiceModel.FaultException: You cannot log on to Microsoft Dynamics AX." However, when I connect to the same web service through a C# console application, the querying works fine. I have copied the code from the console application into the ASP.Net application so that I have ensured that I have done nothing different.

I cannot figure out what the problem could be. I'm sure it's simple but I am at a loss. Any help?

1
  • Can you share the relevant code and configuration blocks? Commented Sep 9, 2013 at 19:13

1 Answer 1

2

This should be a permissions problem. When you launch the console app it executes through the current user (you, probably you have permissions to connect). When the asp.net site connects it uses an IIS user that needs to have permissions on AX too.

Sign up to request clarification or add additional context in comments.

1 Comment

It was a permissions/user problem. We had to use a CallContext object with a known user name in the method call to fill our data. This allowed us into the front door of AX but would fail because the user name did not match the user name calling the method. However, this error would be logged with the two user names. By then adding the other user name to the AX system, the CallContext object could be removed and page worked fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.