Jason

Make sure you to an explicit CloseSession before exiting:

Try
    UniObjects.CloseSession(Sess)
    UniObjects.CloseAllSessions()
Catch ex As Exception

End Try

I suspect Dispose destroys the objects out of sequence.
 
I've been using UO with .NET 2 for a year and that message is the only
problem I've found, other than an issue with device licence counts that has
been aired elsewhere. 

If you are new to UO and .NET, you might want to take a look at the primer
article I've written for the U2UG knowledge base at www.mvopen.org/kb

Brian

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> [EMAIL PROTECTED]
> Sent: 29 September 2006 23:37
> To: [email protected]
> Subject: [U2] UniObject.Net error
> 
> Hi all.
> 
> I started doing some testing on UniObject .Net and Visual Basic 2005.
> Everything in my program works fine except I get the 
> following run-time error upon exiting the program:
> -------------------------------------------------------------------
> System.Exception was unhandled
>   Message="Safe handle has been closed Source: System Method: 
> System.Net.Sockets.SocketError 
> shutdown(System.Net.SafeCloseSocket, Int32)   at 
> System.Net.UnsafeNclNativeMethods.OSSOCK.shutdown(SafeCloseSoc
> ket socketHandle, Int32 how)\r\n   at 
> System.Net.Sockets.Socket.Shutdown(SocketShutdown how)\r\n   
> at IBMU2.UODOTNET.UniRPCConnection.Close()\r\n   at 
> IBMU2.UODOTNET.UniSession.Disconnect()\r\n   at 
> IBMU2.UODOTNET.UniObjects.CloseSession(UniSession us)"
>   Source="UODOTNET"
>   StackTrace:
>        at IBMU2.UODOTNET.UniObjects.CloseSession(UniSession us)
>        at IBMU2.UODOTNET.UniSession.Finalize()
> -------------------------------------------------------------------
> 
> This error can not be trapped using VB's try-catch statement 
> so I suspect it's a run-time issue between UniObject and .Net 
> Framework 2.0 which is used by Visual Studio 2005.
> 
> Does anyone know if there are compatibility issues between 
> UniObject .Net and .Net 2.0 Framework?  And is there a 
> solution resolve the issue?
> 
> Thanks.
> Jason
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to