pichamp
Guest
|
Posted:
Wed May 11, 2005 2:26 pm Post subject:
Exception 2166 |
|
|
Hi,
I'm trying to execute this c# code to execute a transaction
try
{
TILibrary.IEmployeur empl = new TILibrary.IEmployeur();
System.Data.DataTable dt = new DataTable();
object[] rgCtxt = null;
string password = "*****";
string userid = "*****";
Microsoft.HostIntegration.TI.ClientContext cc = new
Microsoft.HostIntegration.TI.ClientContext();
cc.WriteContext("USERID", userid, ref rgCtxt);
cc.WriteContext("PASSWORD", password, ref rgCtxt);
cc.WriteContext("IMS_LTERM", "userid", ref rgCtxt);
empl.GetEmployeurs("30",out dt,ref rgCtxt);
this.dataGrid1.DataSource = dt;
}
catch(Exception exc)
{
Console.WriteLine(exc.Message);
}
but I have this error in the Event Viewer:
Exception description:
(2166) The TCP transport, using IMS Connect or OTMA, received a
Request Status Message; Return Code=8, Reason Code=40. IP Address:
*.*.*.*, port: ****, transid: ******.
The Remote Environment Security is 'Required client provided security'.
I have no idea where that can come from. Is someone have an idea? |
|
Aaron Grady [MSFT]
Guest
|
Posted:
Thu May 19, 2005 12:47 am Post subject:
Re: Exception 2166 |
|
|
pichamp-
Return code 8, Reason code 40 would indicate a security violation. Have you
double checked that you are putting the right USERID and PASSWORD into the
context? Is the host expecting upper case and you're sending lower case?
You could use a protocol analyzer such as Microsoft Network Monitor or
Ethereal to watch the packet that is sent to the host and see exactly which
USERID and PASSWORD are being sent. This would help you determine if this is
a problem with the ClientContext not being used, or simply the values you
have put in for USERID and PASSWORD being not correct.
HTH,
--
Aaron Grady
MCSE + Internet, MCDBA, MCSD
SNA Server/Host Integration Server 2000
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"pichamp" <fgavray@skynet.be> wrote in message
news:1115803593.800014.154110@g43g2000cwa.googlegroups.com...
| Quote: | Hi,
I'm trying to execute this c# code to execute a transaction
try
{
TILibrary.IEmployeur empl = new TILibrary.IEmployeur();
System.Data.DataTable dt = new DataTable();
object[] rgCtxt = null;
string password = "*****";
string userid = "*****";
Microsoft.HostIntegration.TI.ClientContext cc = new
Microsoft.HostIntegration.TI.ClientContext();
cc.WriteContext("USERID", userid, ref rgCtxt);
cc.WriteContext("PASSWORD", password, ref rgCtxt);
cc.WriteContext("IMS_LTERM", "userid", ref rgCtxt);
empl.GetEmployeurs("30",out dt,ref rgCtxt);
this.dataGrid1.DataSource = dt;
}
catch(Exception exc)
{
Console.WriteLine(exc.Message);
}
but I have this error in the Event Viewer:
Exception description:
(2166) The TCP transport, using IMS Connect or OTMA, received a
Request Status Message; Return Code=8, Reason Code=40. IP Address:
*.*.*.*, port: ****, transid: ******.
The Remote Environment Security is 'Required client provided security'.
I have no idea where that can come from. Is someone have an idea?
|
|
|