Anonymous_User Absent Member.
Absent Member.
551 views

Thread Aborted Exception


Hi,

I'm using LDAP with Active Directory.
When I run a query, the very first time, results are correctly
populated. Every successive query then fails, with a thread aborted
exception:

Message: Thread was being aborted.
Stack Trace:
at System.Net.UnsafeNclNativeMethods.OSSOCK.recv(IntPtr
socketHandle, Byte* pinnedBuffer, Int32 len, SocketFlags socketFlags)
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset,
Int32 size, SocketFlags socketFlags, SocketError& errorCode)
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset,
Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32
offset, Int32 size)
at System.IO.Stream.ReadByte()
at Novell.Directory.Ldap.Asn1.Asn1Identifier..ctor(Stream
in_Renamed)
at Novell.Directory.Ldap.Connection.ReaderThread.Run()

Could anyone help with why this is happening?

Thanks,
Nedar


--
nedar
------------------------------------------------------------------------
nedar's Profile: http://forums.novell.com/member.php?userid=78416
View this thread: http://forums.novell.com/showthread.php?t=401581

Labels (1)
0 Likes
10 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Thread Aborted Exception


nedar;1932275 Wrote:
> Hi,
> Could anyone help with why this is happening?
>


Can you tell us what language, SDK, platform, version, .... or any
other salient details about the environment you are using? Also can
you please post a code snipet which triggers this?

Based on absolutely nothing, my suspicion is either an older version of
the SDK / libraries is being used, as this exception should have been
handled - OR - you have code written designed for async operation used
for sync or the reverse. But thats based on nothing... so more details
will help.

-- Bob


--
Bob Mahar -- Novell Knowledge Partner
Do you do what you do at a .EDU? http://novell.com/ttp
"Programming is like teaching a jellyfish to build a house."
http://twitter.com/BobMahar http://vimeo.com/boborama
------------------------------------------------------------------------
Bob-O-Rama's Profile: http://forums.novell.com/member.php?userid=5269
View this thread: http://forums.novell.com/showthread.php?t=401581

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Thread Aborted Exception


Hi Bob,

We're using the v2.1.3.0 dlls. Code is written in c#.

I have sent you further details in a message.

Please let me know if you need any other information.

Thanks,
Nedar


--
nedar
------------------------------------------------------------------------
nedar's Profile: http://forums.novell.com/member.php?userid=78416
View this thread: http://forums.novell.com/showthread.php?t=401581

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Thread Aborted Exception


nedar;1932282 Wrote:
> Hi Bob,
>
> We're using the v2.1.3.0 dlls. Code is written in c#.
>
> I have sent you further details in a message.
>
> Please let me know if you need any other information.
>
> Thanks,
> Nedar


If using v2.1.3.0 you are coding to a 5 year old version. which has
all manner of defects in it.

Can you see if 'v2.1.11.0 '
(ftp://forgeftp.novell.com/ldapcsharp/ldapcsharp/CsharpLDAP-v2.1.11/)
resolves this issue. IIRC, this was an issues for a prior release.
Download the source and you can see the ChanegLog.txt

Not sure if this is just a .dll swap or something more in your code,
but worth a try, for sure.

-- Bob


--
Bob Mahar -- Novell Knowledge Partner
Do you do what you do at a .EDU? http://novell.com/ttp
"Programming is like teaching a jellyfish to build a house."
http://twitter.com/BobMahar http://vimeo.com/boborama
------------------------------------------------------------------------
Bob-O-Rama's Profile: http://forums.novell.com/member.php?userid=5269
View this thread: http://forums.novell.com/showthread.php?t=401581

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Thread Aborted Exception


Hi,

Is there a workaround to this?

Thanks,
Nedar


--
nedar
------------------------------------------------------------------------
nedar's Profile: http://forums.novell.com/member.php?userid=78416
View this thread: http://forums.novell.com/showthread.php?t=401581

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Thread Aborted Exception


nedar;1933210 Wrote:
> Hi,
>
> Is there a workaround to this?
>
> Thanks,
> Nedar


A workaround to using 5 years old libraries? That would be using
newer libraries.

Or are you saying that you see the same behavior with the newer
libraries?

-- Bob


--
Bob Mahar -- Novell Knowledge Partner
Do you do what you do at a .EDU? http://novell.com/ttp
"Programming is like teaching a jellyfish to build a house."
http://twitter.com/BobMahar http://vimeo.com/boborama
------------------------------------------------------------------------
Bob-O-Rama's Profile: http://forums.novell.com/member.php?userid=5269
View this thread: http://forums.novell.com/showthread.php?t=401581

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Thread Aborted Exception


Hi Bob,

How do I go about upgrading to the new version you've pointed me to? Is
there an upgrade installer I could use? Are there any licensing issues I
should look out for?

Thanks a bunch.
Nedar


--
nedar
------------------------------------------------------------------------
nedar's Profile: http://forums.novell.com/member.php?userid=78416
View this thread: http://forums.novell.com/showthread.php?t=401581

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Thread Aborted Exception


I did try simply replacing the dll, but that did not help.


--
nedar
------------------------------------------------------------------------
nedar's Profile: http://forums.novell.com/member.php?userid=78416
View this thread: http://forums.novell.com/showthread.php?t=401581

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Thread Aborted Exception


nedar;1936674 Wrote:
> I did try simply replacing the dll, but that did not help.


Can you encapsulate the failure into a test harness and post the code
some place? If you are running latest libraries... and you do get a
correct run the first time through... perhaps the issue is in the way
you are using them.

Also, have you seen 'similar'
(http://developer.cisco.com/web/cuae/forums/-/message_boards/message/105446316CEF7)
error? Seems to involve the FQN / BaseDN being used... same stack
traces, essentially. Specifically:

> DC=cisco,DC=com is reproducing the same error on my side. "o=cisco.com"
> is working fine.
>
> Basically, the correct format of BaseDN for your specific ldap server
> is needed to make the Query work. You may be able to look at your ldap
> server to figure correct format.
>


-- Bob


--
Bob Mahar -- Novell Knowledge Partner
Do you do what you do at a .EDU? http://novell.com/ttp
"Programming is like teaching a jellyfish to build a house."
http://twitter.com/BobMahar http://vimeo.com/boborama
------------------------------------------------------------------------
Bob-O-Rama's Profile: http://forums.novell.com/member.php?userid=5269
View this thread: http://forums.novell.com/showthread.php?t=401581

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Thread Aborted Exception


Hi Bob,

Thanks for your reply.

I'm pretty sure the FQN/ BaseDN I'm using is correct. I'm using Active
Directory, and I think the 'dc' style is standard there.

I think I did send the code to you earlier. Are you talking about
different code?

Thanks,
Nedar


--
nedar
------------------------------------------------------------------------
nedar's Profile: http://forums.novell.com/member.php?userid=78416
View this thread: http://forums.novell.com/showthread.php?t=401581

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Thread Aborted Exception


Novell's LDAP directories can be used with Active Directory, right?


--
nedar
------------------------------------------------------------------------
nedar's Profile: http://forums.novell.com/member.php?userid=78416
View this thread: http://forums.novell.com/showthread.php?t=401581

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.