Associated methods | Associated properties |
---|---|
Attach (System.String,System.Uri,bool bUseCluster)
Attach (System.String,System.Uri)
Close()
Connect (System.String,System.String,System.Uri)
Connect (System.Uri)
Connect (System.Uri, System.Boolean)
Connect (System.String,System.String,System.Uri,System.Boolean bUseCluster)
Detach()
GetConnectionInfo()
HttpLink (HostFront.EAI.Emulation,HostFront.EAI.CGIModule)
HostLink()
PushKey (HostFront.EAI.Key,System.Int32)
PushKey (HostFront.EAI.Key,HostFront.EAI.ScreenIdentifierSystem.Int32)
PushKey (HostFront.EAI.Key,HostFront.EAI.ScreenIdentifier)
PushKey (HostFront.EAI.Key)
PushKey (System.Int32,System.Int32)
PushKey (System.Int32,HostFront.EAI.ScreenIdentifier,System.Int32)
PushKey (System.Int32,HostFront.EAI.ScreenIdentifier)
TimeOut
PushKey (System.Int32)
|
CGIModule
CGIVirtualFolder
ClusterCGIVirtualFolder Credentials
IsConnected
PreAuthenticate
Proxy
TimeOut
|
• | 20 — The provided session ID is unknown, meaning that either the session has been disconnected (by the backend host or for any other reason) or that the provided session ID is a wrong one. |
• | 21 — The session exists but is already attached. |
1. | Impersonating in Web Service: In the Web.config file (in the project of Web Service) add:
<authentication mode="Windows" /> <identity impersonate="true"/> |
2. | Setting of IIS: At the virtual directory of the Web Service project, uncheck “Enable anonymous access” and check “Integrated Windows authentication”.
|
3. | Setting of IE: IE à Tools à Internet Options à Advanced à Security à check “Enable Integrated Windows Authentication (requires restart)”.
|
4. | Code snippet of impersonation in Web Service :[WebMethod] public string TestHTTP2(string sServer) { System.Security.Principal.WindowsImpersonationContext ctxt = null; try { //impersonating System.Security.Principal.WindowsIdentity identity = (System.Security.Principal.WindowsIdentity)User.Identity; ctxt = identity.Impersonate(); string s = WindowsIdentity.GetCurrent().Name; //sServer = Cluser Service ip UriBuilder builder = new UriBuilder(Uri.UriSchemeHttp, sServer, 80); HostFront.EAI.HttpLink hostFront = new HostFront.EAI.HttpLink(HostFront.EAI.Emulation.HFM3270,CGIModule.ISAPI); //connect to HostFront by specifying impersonation hostFront.Connect(builder.Uri,true); if(hostFront.IsConnected) { return hostFront.ScreenToString(); } else { return hostFront.ErrorMessage; } } catch(Exception ex) { return ex.ToString(); } finally { ctxt.Undo(); } } |
5. | Code snippet of Client of Web Service:EAI.Service1 ws = new EAI.Service1(); ws.Credentials = new System.Net.NetworkCredential(this.txtName.Text, this.txtPSW.Text); ws.PreAuthenticate = true; this.listBox1.Items.Add(ws.TestHTTP2(this.textBox1.Text)); |
• | 20 — The session could not connect to the backend host. Check the event log on the HostFront server. |
• | 24 — The session did connect but was disconnected either by the backend host or by the HostFront server. Check the event log on the HostFront server. |
Emulation | Default virtual folder |
---|---|
HFA – 5250 | HFCGI_5250 |
HFM – 3270 | HFCGI_3270 |
For version < 3.6.0 | HFCGI |