Using the same wizard template C# DA server, replacing the Main program to this, so I can test it more easily (and because this http://connect.remobjects.com/discussion/710/c-mono-server-on-osx-do-nothing)
using System;
namespace BestSeller
{
class ServerAdmin {
private Engine fEngine;
public void StartServer()
{
if (this.IsServerActive)
{
this.StopServer();
}
this.fEngine = new Engine();
this.fEngine.Start();
}
public void StopServer()
{
if (this.IsServerActive)
{
this.fEngine.Dispose();
this.fEngine = null;
}
}
// Properties
public bool IsServerActive
{
get
{
return ((this.fEngine != null) && this.fEngine.Active);
}
}
}
class MainClass
{
public static void Main (string[] args)
{
ServerAdmin server = new ServerAdmin();
server.StartServer();
Console.WriteLine ("Hello World!");
Console.ReadKey();
server.StopServer();
}
}
}
I get this exception on run:
Unhandled Exception: System.ComponentModel.LicenseException: A system exception has occurred.
at RemObjects.DataAbstract.ROLicenseProvider.GetLicense (System.ComponentModel.LicenseContext context, System.Type aType, System.Object anInstance, Boolean aAllowExceptions) [0x00000] in :0
at System.ComponentModel.LicenseManager.privateGetLicense (System.Type type, System.Object instance, Boolean allowExceptions, System.ComponentModel.License& license) [0x00042] in /private/tmp/monobuild/build/BUILD/mono-2.10.6/mcs/class/System/System.ComponentModel/LicenseManager.cs:191
at System.ComponentModel.LicenseManager.Validate (System.Type type, System.Object instance) [0x00002] in /private/tmp/monobuild/build/BUILD/mono-2.10.6/mcs/class/System/System.ComponentModel/LicenseManager.cs:169
at RemObjects.DataAbstract.Server.ConnectionManager…ctor (IContainer aContainer) [0x00000] in :0
at (wrapper remoting-invoke-with-check) RemObjects.DataAbstract.Server.ConnectionManager:.ctor (System.ComponentModel.IContainer)
at BestSeller.Engine.InitializeComponent () [0x0000b] in /Users/mamcx/Downloads/BestSellerServer/Engine.Designer.cs:33
at BestSeller.Engine…ctor () [0x0000d] in /Users/mamcx/Downloads/BestSellerServer/Engine.cs:12
at (wrapper remoting-invoke-with-check) BestSeller.Engine:.ctor ()
at BestSeller.ServerAdmin.StartServer () [0x00011] in /Users/mamcx/Downloads/BestSellerServer/Program.cs:14
at BestSeller.MainClass.Main (System.String[] args) [0x00006] in /Users/mamcx/Downloads/BestSellerServer/Program.cs:43
[ERROR] FATAL UNHANDLED EXCEPTION: System.ComponentModel.LicenseException: A system exception has occurred.
at RemObjects.DataAbstract.ROLicenseProvider.GetLicense (System.ComponentModel.LicenseContext context, System.Type aType, System.Object anInstance, Boolean aAllowExceptions) [0x00000] in :0
at System.ComponentModel.LicenseManager.privateGetLicense (System.Type type, System.Object instance, Boolean allowExceptions, System.ComponentModel.License& license) [0x00042] in /private/tmp/monobuild/build/BUILD/mono-2.10.6/mcs/class/System/System.ComponentModel/LicenseManager.cs:191
at System.ComponentModel.LicenseManager.Validate (System.Type type, System.Object instance) [0x00002] in /private/tmp/monobuild/build/BUILD/mono-2.10.6/mcs/class/System/System.ComponentModel/LicenseManager.cs:169
at RemObjects.DataAbstract.Server.ConnectionManager…ctor (IContainer aContainer) [0x00000] in :0
at (wrapper remoting-invoke-with-check) RemObjects.DataAbstract.Server.ConnectionManager:.ctor (System.ComponentModel.IContainer)
at BestSeller.Engine.InitializeComponent () [0x0000b] in /Users/mamcx/Downloads/BestSellerServer/Engine.Designer.cs:33
at BestSeller.Engine…ctor () [0x0000d] in /Users/mamcx/Downloads/BestSellerServer/Engine.cs:12
at (wrapper remoting-invoke-with-check) BestSeller.Engine:.ctor ()
at BestSeller.ServerAdmin.StartServer () [0x00011] in /Users/mamcx/Downloads/BestSellerServer/Program.cs:14
at BestSeller.MainClass.Main (System.String[] args) [0x00006] in /Users/mamcx/Downloads/BestSellerServer/Program.cs:43
I check and have the licenses.licx. The same project compile fine on VS 2010.
Perhaps I need to forget about develop on mono/osx?