Smart Client application in 2.0 - Solution Required

Hi Group,
Currently I am developing one smart client application in .net 2.0. I tried the following code of codeproject.com to call the server application. I have developed one server application and client (console) application to achieve this.
string strURL = "http://localhost/Smart/Bin/Release/Smart.exe";
string sClassName = "MySmartClient.SmartForm";
Assembly assemblyContent = null;
assemblyContent =
Assembly.LoadFrom(strURL);
Type typeContent = assemblyContent.GetType(sClassName);
typeContent.InvokeMember(
"Main", BindingFlags.Public |
BindingFlags.InvokeMethod | BindingFlags.Static, null, null, null);
It is working fine.
But when i tried the same code in windows application, i am geting error.
Exception has been thrown by the target of an invocation.
I am new to smart client application.
Can anybody explain the process
and also i need solution to the above error.
Thanks in advance.



Answer this question

Smart Client application in 2.0 - Solution Required

  • hellomahesh

    Do you mean that you're able to run this code on a smart device and getting error when trying to execute from a desktop windows application It is unclear when you're getting error.

    This error also mean that your Main() method located inside the assembly is throwing an unhandled exception. Try enabling some diagnostic info like logger to see the detailed exception.

    Manav



  • Smart Client application in 2.0 - Solution Required