Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
markz #1
Member since May 2009 · 11 posts
Group memberships: Members
Show profile · Link to this post
Subject: StartTLS with .NET Compact Framework
Hello,

I am working on an application using the .NET Compact Framework, and I am encountering two problems when using StartTLS:

1) When using .NET CF 2.0, the XMPPClientConnection becomes disconnected after sending a certain amount of data. In my test application the client was publishing a pubsub item every 5 seconds, and it consistently becomes disconnected after 30 minutes. If I change the frequency that it publishes the item, the time that it takes to disconnect also changes. If I am not debugging within Visual Studio, there is no error message, it just disconnects. When I am debugging, the Visual Studio debugger indicates an out of memory exception, but no symbols are loaded/the source code cannot be displayed. The stack trace of the exception is as follows:

at System.RuntimeType.InternalGetFields()
at System.RuntimeType.GetFields()
at System.SRSupport.constantToKey()
at System.SRSupport.HasString()
at System.SR.HasString()
at System.Net.Sockets.SocketException.makeMessage()
at System.Net.Sockets.SocketException..ctor()
at System.Net.Sockets.SocketException..ctor()
at System.Net.HttpWebRequest.fillBuffer()
at System.Net.HttpWebRequest.getLine()
at System.Net.HttpWebRequest.parseResponse()
at System.Net.HttpWebRequest.startReceiving()
at System.Net.Connection.startReceiving()
at WorkItem.doWork()
at System.Threading.Timer.ring()

2) When I upgrade the same project to .NET CF 3.5, it does not connect at all using StartTLS. The connection state never makes it passed securing. This also happens with the MiniClient WM5 Example application.

I do not have either of these problems when I set UseStartTLS to false, but in my application I will need to use it. I suspect both of these problems are related to crypto.dll. Do you know of a solution to this?

Thanks,
Mark
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
hello Mark,

the exception is not very verbose ;-).
Can you try to find where the memory leaks?
I am not happy with the crypto.dll because its slow and still has known problems, eg. with Google Talk server. But this is the only solution right now because the CF still has no SslStream available.

Alex
Avatar
markz #3
Member since May 2009 · 11 posts
Group memberships: Members
Show profile · Link to this post
I'm not sure if it is related or not, but I recently started to occassionally see the following exception:

NullReferenceException

at agsXMPP.net.SslStream.EndRead()
at agsXMPP.net.ClientSocket.EndReceive()
at System.Net.LazyAsyncResult.InvokeCallback()
at WorkerThread.doWork()
at WorkerThread.doWorkI()
at WorkItem.doWork()
at System.Threading.Timer.ring()


I would eventually like to look into the source code for crypto.dll or alternatives to it, but I probably won't get to that soon.

Thanks,
Mark
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS