Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 创建新的QuickFix接受程序应用程序_C#_.net_Quickfix_Fix Protocol - Fatal编程技术网

C# 创建新的QuickFix接受程序应用程序

C# 创建新的QuickFix接受程序应用程序,c#,.net,quickfix,fix-protocol,C#,.net,Quickfix,Fix Protocol,我正在尝试使用C#中的QuickFix创建修复接受程序应用程序。。。我有一个奇怪的问题,我似乎不能四处走动。。。当尝试创建新的ThreadedSocketAcceptor时,构造函数抛出FormatException,表示“字符串未被识别为有效的日期时间”。我不确定是什么导致了这一情况,因为配置文件中唯一的日期时间是会话时间。。。以下是我的代码片段和相应的acceptor配置文件: SessionSettings settings = new SessionSettings(Se

我正在尝试使用C#中的QuickFix创建修复接受程序应用程序。。。我有一个奇怪的问题,我似乎不能四处走动。。。当尝试创建新的ThreadedSocketAcceptor时,构造函数抛出FormatException,表示“字符串未被识别为有效的日期时间”。我不确定是什么导致了这一情况,因为配置文件中唯一的日期时间是会话时间。。。以下是我的代码片段和相应的acceptor配置文件:

        SessionSettings settings = new SessionSettings(SettingInfo);
        application = new TFAcceptorApplication();   

        application.DataArrived += new DataArrivedEventHandler(DataArrivedEvent);    

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

        acceptor = new ThreadedSocketAcceptor(application, storeFactory, settings, logFactory, messageFactory);    
        acceptor.Start(); 
配置文件:

[DEFAULT]
ConnectionType=acceptor
SocketAcceptPort=9999
SocketReuseAddress=Y
FileStorePath=store
FileLogPath=log

[SESSION]
BeginString=FIX.4.4
SenderCompID=MySenderCompId
TargetCompID=MyTargetCompId
UseDataDictionary=N
DataDictionary=FIX44.xml
StartTime=00:00:00
EndTime=23:59:00
我尝试的任何东西似乎都不起作用,每次到达该代码时都会抛出异常。有没有可能有人遇到过类似的问题,并且知道是什么原因造成的

感谢您抽出时间阅读我的问题, 干杯

编辑:堆栈跟踪-

mscorlib.dll!System.DateTimeParse.ParseExact(string s, string format, System.Globalization.DateTimeFormatInfo dtfi, System.Globalization.DateTimeStyles style) + 0x6b bytes 
    mscorlib.dll!System.DateTime.ParseExact(string s, string format, System.IFormatProvider provider, System.Globalization.DateTimeStyles style) + 0x32 bytes   
    QuickFix.dll!QuickFix.Util.UtcDateTimeSerializer.FromString(string s) + 0x5c bytes  
    QuickFix.dll!QuickFix.FileStore.InitializeSessionCreateTime() + 0xf1 bytes  
    QuickFix.dll!QuickFix.FileStore.open() + 0x29 bytes 
    QuickFix.dll!QuickFix.FileStore.FileStore(string path, QuickFix.SessionID sessionID) + 0x187 bytes  
    QuickFix.dll!QuickFix.FileStoreFactory.Create(QuickFix.SessionID sessionID) + 0x5c bytes    
    QuickFix.dll!QuickFix.Session.Session(QuickFix.IApplication app, QuickFix.IMessageStoreFactory storeFactory, QuickFix.SessionID sessID, QuickFix.DataDictionaryProvider dataDictProvider, QuickFix.SessionSchedule sessionSchedule, int heartBtInt, QuickFix.ILogFactory logFactory, QuickFix.IMessageFactory msgFactory, string senderDefaultApplVerID) + 0x229 bytes  
    QuickFix.dll!QuickFix.SessionFactory.Create(QuickFix.SessionID sessionID, QuickFix.Dictionary settings) + 0x432 bytes   
    QuickFix.dll!QuickFix.ThreadedSocketAcceptor.CreateSessions(QuickFix.SessionSettings settings) + 0x110 bytes    
    QuickFix.dll!QuickFix.ThreadedSocketAcceptor.ThreadedSocketAcceptor(QuickFix.SessionFactory sessionFactory, QuickFix.SessionSettings settings) + 0xd1 bytes 
    QuickFix.dll!QuickFix.ThreadedSocketAcceptor.ThreadedSocketAcceptor(QuickFix.IApplication application, QuickFix.IMessageStoreFactory storeFactory, QuickFix.SessionSettings settings, QuickFix.ILogFactory logFactory, QuickFix.IMessageFactory messageFactory) + 0x4b bytes    
>   ExecutionReportGenerator.exe!ExecutionReportGenerator.ExecutionForm.StartConnection() Line 194 + 0x3d bytes C#
    ExecutionReportGenerator.exe!ExecutionReportGenerator.ExecutionForm.ConnectButton_Click(object sender, System.EventArgs e) Line 87 + 0x8 bytes  C#
    System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventArgs e) + 0x70 bytes  
    System.Windows.Forms.dll!System.Windows.Forms.Button.OnClick(System.EventArgs e) + 0x4a bytes   

使用stack traceI更新的OP能够使用IronPython使用您提供的代码启动一个接受器;我使用SessionSettings的字符串形式。也许您无意中从另一个没有时间戳的目录加载了配置文件?