The Hessian C# client running on a mobile device emulator throws an exception:
A first chance exception of type 'hessiancsharp.io.CHessianException' occurred in Hessianmobileclient.dll
hessiancsharp.io.CHessianException: not supported in compact version
at hessiancsharp.client.CHessianProxyFactory.CreateHessianStandardProxy(String strUrl, Type type)
at hessiancsharp.client.CHessianProxyFactory.Create(Type type, String strUrl)
at ElementLoadingPointMobile.AuthenticationForm.loginButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.ButtonBase.WnProc(WM wm, Int32 wParam, Int32 lParam)
at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam)
at Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain)
at System.Windows
My code is as follows:
try
{
String url = "http://url.to.spring.hessian.service.exporter";
CHessianProxyFactory factory = new CHessianProxyFactory();
IMobileManager manager = (IMobileManager)factory.Create(typeof(IMobileManager), url);
}
catch (CHessianException e)
{
System.Diagnostics.Debug.WriteLine(e);
}
If I run the Hessian client on non-mobile C# app (using Hessiancsharp.dll, not Hessianmobileclient.dll), the Hessian service works very well. It also works very well using Hessian Java cllient.
I tested it on:
- Windows Mobile 6.5 with .NET Compact Framework 2.0 (emulator),
- Windows Mobile 5.0 with .NET Compact Framework 3.5 (emulator).
Why do you throw an Exception with "not supported" information for compact frameworks? The library Hessianmobileclient.dll is used just for compact frameworks!
Thank you for your reply.
I asked the question concerning this problem at StackOverflow:
http://stackoverflow.com/questions/11294945/hessiancsharp-chessianexception-not-supported-in-compact-version
I placed there a workaround.