私はAIF Webサービスを使用してMicrosoft Dynamics AX 2009に接続しています。VS2010のサービスに対してプロキシが生成されますが、クライアントクラスを生成してサービスに接続する場合、私はシステムで認証されていないようです。AIF webservicesを使用してMicrosoft Dynamics AX 2009に接続する
私もこのように、ドメインユーザ/パスとWindows認証を使用して追加してみました:結合
var binding = new BasicHttpBinding();
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;
binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;
binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
var address = new EndpointAddress(new Uri("http://dynamicsserver/salesorderservice.svc"));
var client = new SalesOrderServiceClient(binding, address);
client.ClientCredentials.Windows.ClientCredential = new NetworkCredential("admin", "pass", "domain);
デフォルトはHttpBindingある、と私は実行されているコンソールアプリケーションを使用して、AIFに接続しようとしています同じマシン上のNetworkCredentialで指定されているのと同じアカウントを使用します。
アプリケーションがWebサービスに接続したときに、私は次のエラーを取得する:
System.ServiceModel.FaultException: You cannot log on to Microsoft Dynamics AX.. Error details: Unable to log on to Microsoft Dynamics AX.. Check the Web server event viewer for more information, or contact your Administrator. Server stack trace: at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
を試してみて、物事は上の失敗を開始します私はwebservicesを使用して同じマシン。ビジネスコネクタが正常に動作するため、「ビジネスコネクタプロキシ」の設定は正しいです。 –