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
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