On system1, Web Service has been installed.
In this Web Service, LoginToWorkSite webmethod is specified.
Here TrustedLogin2(AccessToken) method of IManage.IManSession object is used to login as Trusted login to WorkSite.
WebConfig details
authentication mode="Windows"
trust level="Full"
identity impersonate="true"
Configuration:
Anonymous access is unchecked.
Integrated Windows Authentication is checked.
--------------------------------------------
On system2, Web Application has been installed.
In this Web app, LoginToWorkSite method is called and AccessToken is passed to the LoginToWorkSite webmethod of WebService.
Using below given code, Logged-in AccessToken is retrieved.
Dim AccessToken As Long = 0
AccessToken = System.Security.Principal.WindowsIdentity.GetCurrent().Token.ToInt32
WebConfig details
authentication mode="Windows"
trust level="Full"
identity impersonate="true"
add key="WebService.LoginService" value="
http://system1/WebRS/LoginService.asmx"
Configuration:
Anonymous access is unchecked.
Integrated Windows Authentication is checked.
Web Service access system1 web service url is specified in WebConfig XML.
From Web Application, Window logged in user Accesstoken is passed as input parameter (data type long) to LoginToWorkSite webmethod of Web Service.
--------------------------------------------
Problem:
Using IE, Web Application url is accessed.
When user tries to login using Trusted Login, it fails exception is [NRTSession ][TrustedLogin ] The handle is invalid.
We get Exception in Web Service web method LoginToWorkSite, when TrustedLogin2(AccessToken) is used.
But normal username & password login works fine.
We have tried with every possible configuration, still Trusted login never works.
Note:
If Web Service and Web Application are installed on same machine say System 1.
Both Trusted Login and normal username & password login works fine without any error.
We have set up WorkSite Web application, it works fine with Trusted login.
We are not sure whether that is problem with IManage.IManSession TrustedLogin2() or with Configuration settings both in Web Server and Web application installed on different machines.