2016-10-04 12 views
0

ビジネスコネクタファイルバージョン(5.0.1500.4570)を使用してaxapta 2009に接続するASP.net Webフォームプロジェクトがあります。私はこのエラーaxapta 'Microsoft.Dynamics.BusinessConnectorNet.LogonFailedException'へのログイン時にエラーが発生しました

'Microsoft.Dynamics.BusinessConnectorNet.LogonFailedException' occurred in ******.dataaccess.dll but was not handled in user code 

     at b2b.logosoft.com.tr.dataaccess.AxaptaConnectorHelper.AxaptaObject() in d:\Projects\B2B\b2b.logosoft.com.tr.site\b2b.logosoft.com.tr.dataaccess\AxaptaConnectorHelper.cs:line 29 
    at b2b.logosoft.com.tr.dataaccess.CurrencyDataAccess.GetCurrency(String fromcurrency, String tocurrency) in d:\Projects\B2B\b2b.logosoft.com.tr.site\b2b.logosoft.com.tr.dataaccess\CurrencyDataAccess.cs:line 14 
    at b2b.logosoft.com.tr.businessmanager.CurrencyService.GetCurrencyRate(String fromcurrency, String tocurrency) in d:\Projects\B2B\b2b.logosoft.com.tr.site\b2b.logosoft.com.tr.businessmanager\CurrencyService.cs:line 17 
    at b2b.logosoft.com.tr.businessmanager.CurrencyService.GetRates() in d:\Projects\B2B\b2b.logosoft.com.tr.site\b2b.logosoft.com.tr.businessmanager\CurrencyService.cs:line 80 
    at b2b.logosoft.com.tr.site.UserControls.Header.Page_Load(Object sender, EventArgs e) in d:\Projects\B2B\b2b.logosoft.com.tr.site\b2b.logosoft.com.tr.site\UserControls\header.ascx.cs:line 34 
    at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) 
を持つ始め、突然まで、すべてがOKだった

出力は次のとおりです。

public class AxaptaConnectorHelper 
{ 
    #region Class Properties 
    public static Axapta Ax { get; set; } 
    public static string UserName { get { return AxaptaConnectionInfo.AxUserName; } } 
    public static string Password { get { return AxaptaConnectionInfo.AxPassword; } } 
    public static string Domain { get { return AxaptaConnectionInfo.AxDomain; } } 
    public static string Company { get { return AxaptaConnectionInfo.AxCompany; } } 
    public static string Aos { get { return AxaptaConnectionInfo.AxAos; } } 
    #endregion 
    public Axapta AxaptaObject() 
    { 
     try 
     { 
      var nc = new NetworkCredential(UserName, Password, Domain); 
      Ax = new Axapta(); 
      Ax.LogonAs(UserName, Domain, nc, Company, "", Aos, ""); 
     } 
     catch (Exception ex) 
     { 
      Ax = null; 
      throw ex; 
     } 
     return Ax; 
    } 
} 

私が試してみました:

ここ
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-131200350151628806): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-131200350151628806): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-131200350151628806): Loaded 'C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.8387_none_5094ca96bcb6b2bb\msvcm90.dll'. Cannot find or open the PDB file. 
'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.8387_none_5094ca96bcb6b2bb\msvcm90.dll'. Cannot find or open the PDB file. 
'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\assembly\GAC_32\Microsoft.Dynamics.BusinessConnectorNet\5.0.0.0__31bf3856ad364e35\Microsoft.Dynamics.BusinessConnectorNet.dll'. Cannot find or open the PDB file. 
A first chance exception of type 'Microsoft.Dynamics.BusinessConnectorNet.LogonFailedException' occurred in Microsoft.Dynamics.BusinessConnectorNet.dll 
A first chance exception of type 'Microsoft.Dynamics.BusinessConnectorNet.LogonFailedException' occurred in b2b.logosoft.com.tr.dataaccess.dll 
A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll 
A first chance exception of type 'Microsoft.Dynamics.BusinessConnectorNet.LogonFailedException' occurred in Microsoft.Dynamics.BusinessConnectorNet.dll 
A first chance exception of type 'Microsoft.Dynamics.BusinessConnectorNet.LogonFailedException' occurred in b2b.logosoft.com.tr.dataaccess.dll 
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-131200350151628806): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'. 
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-131200350151628806): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.DebuggerVisualizers\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.DebuggerVisualizers.dll'. Cannot find or open the PDB file. 

は、コネクタのヘルパークラスであります以下:

  1. クリーンソリューションと
  2. ビジネスコネクタの参照を削除してから
  3. が私の解決策のすべてのプロジェクト
  4. のためのビジネスコネクタの参照がためのx86のビルドプロパティのプラットフォームターゲットを変更追加しました再構築を再構築

何も問題を解決するようでないプロジェクトのためにTempフォルダをクリーンすべてのプロジェクト

  • 答えて

    1

    LogonFailedExceptionは、あなたのobjAX.Logon()またはobjAX.LogonAs()が失敗したことを意味します。これは、通常、ビルドフォルダや一時フォルダとは関係ありませんが、ホスト名/ポート/設定やユーザ名を使用してコードが実際にAOSに接続することはできません。

    ログオン/ログオンを呼び出す実際のコードは表示されませんが、コードはAOSを見つけられないか、提供したユーザー名/パスワードまたはサービス/実行アカウントを使用してログオンできません。

    サービスが稼働していることを確認してください(ファイアウォールなし)。そのユーザーは、Active Directoryで無効にされているか、またはAXでユーザーされていません。

    は私がのAxaptaデスクトップアプリを使用してのAxaptaに接続することができ、AOS(クラスタの多分一部)が接続known as draining

    +0

    を拒否することができそういえば。それは私がブロックされていないことを意味し、管理者は私のaxaptaログイン資格情報をすべて見直しました。 – iceDragon

    +0

    @iceDragonどのようにコードを投稿するのですか? –

    +0

    私はそれを追加しました。エラーは 'Ax.LogonAs'で発生します – iceDragon

    関連する問題