2016-12-06 1 views
0

TN3270からスクリーンスクレーピング用の新しいWebアプリケーションを開発しようとしています。私たちは、Visual Studio 2015を使用していて、HIS 2016Microsoft Host Integration Server 2013/2016およびASP.Netを使用したTN3270からのスクリーンスクラブ

次のコードは、我々は、コンソールまたはWindowsアプリケーションからそれを実行すると、コードが正常に動作しているTN3270に

 var display = new SessionDisplay(); 
     var connection = new SessionConnectionDisplay(); 
     connection.DeviceType = TNDeviceType.IBM3278Model2; 
     connection.Transport = SessionDisplayTransport.TN3270; 
     connection.TN3270Port = 23; 
     connection.TN3270Server = "server name"; 
     connection.HostCodePage = 37; 
     display.Connect(connection); 

を接続するために書かれています。我々は、Webアプリケーションから呼び出すしようとする。しかし、私は次のエラーを取得しています:私はこの上の任意の助けをいただければ幸いです

at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.HostIntegration.SNA.Session.SessionConnectionDisplay.CreateSessionConnection()
at Microsoft.HostIntegration.SNA.Session.SessionConnectionDisplay.ConnectToSessionDisplay(SessionDisplay connectedSession)
at Microsoft.HostIntegration.SNA.Session.SessionDisplay.Connect(SessionConnectionDisplay connection)

An exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.HostIntegration.SNA.Session.dll but was not handled in user code

Additional information: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

のStackTrace。

+0

Visual StudioまたはIISでWebアプリケーションが実行されていますか? –

+0

ビジュアルスタジオ2015 –

答えて

0

connection.Implementation = ImplementationDetail.ManagedTn;

このプロパティを設定すると問題が解決します。

関連する問題