I am using this library to develop a asp.net web api for MetaTrader4, but failed to instantiate. Here is My trial:
[Route("users/")]
public IList<UserRecord> GetAllUsers()
{
IList<UserRecord> users;
using (var metatrader = new ClrWrapper(new ConnectionParameters
{
Login = 123456,
Password = "managerPassword",
Server = "123.123.123.123:443"
}))
{
users = metatrader.UsersRequest();
}
return users;
}
And the Exception is:
Failed to instantiate manager instance
於 P23.MetaTrader4.Manager.ClrWrapper..ctor(String metatraderLibraryPath) 於 P23.MetaTrader4.Manager.ClrWrapper..ctor(ConnectionParameters connectionParameters, String metatraderLibraryPath) 於 P23.MetaTrader4.Manager.ClrWrapper..ctor(ConnectionParameters connectionParameters) 於 mt4_api.Controllers.UsersController.GetAllUsers() 於
The Code is Ok when it runs under console project, but fail in asp.net web api project.
Can Someone helps?