开发者

Cannot pass a GCHandle across AppDomains

I have implemented quickfix engine using asp.net and C#. and i am calling quickfix_net.dll which is written in unmanaged C++. but i am getting error like "Cannot pass a GCHandle across AppDomains" when calling quickfix_net.dll.

but the same thing is running in console application but not under IIS i.e asp.net

please anybody look into matter. thanks in advance

Following are my code:

SessionSettings settings = new SessionSettings(tradeClientPath);

ApplicationMessage application = new ApplicationMessage();
FileStoreFactory storeFactory = new FileStoreFactory(settings);
FileLogFactory logFactory = new FileLogFactory(settings);
MessageFactory messageFactory = new DefaultMessageFactory();

SocketInitiator initiator = new SocketInitiator
  (application, storeFactory, settings, logFactory, messageFactory);
initiator.start();

Message message = n开发者_JAVA技巧ew Message();

OrdType ordType = new OrdType(OrdType.MARKET);

QuickFix42.NewOrderSingle newOrderSingle = new QuickFix42.NewOrderSingle(new ClOrdID("1"), new HandlInst('1'), new Symbol("WAKEN\00110048=2")
                  , new Side(Side.BUY), new TransactTime(), new OrdType(OrdType.MARKET));

newOrderSingle.set(new OrderQty(10));
newOrderSingle.set(new TimeInForce(TimeInForce.DAY));

Message.Header header = newOrderSingle.getHeader();
header.setField(new SenderCompID("CLIENT1"));
header.setField(new TargetCompID("EXECUTOR"));

message = newOrderSingle;

**QuickFix.Session.sendToTarget(message);** // here i am getting exception

initiator.stop();

Web site reference is : http://www.quickfixengine.org/quickfix/doc/html/index.html


It's a known issue with QuickFix.Net, it only works in-proc. So basically there are not many options, short of changing FIX plugin.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜