C# 异步检索RSS源时System.Runtime.InteropServices.COMException

C# 异步检索RSS源时System.Runtime.InteropServices.COMException,c#,exception,asynchronous,windows-8,microsoft-metro,C#,Exception,Asynchronous,Windows 8,Microsoft Metro,我正在尝试构建一个Windows8 metro应用程序。检索提要的小型RSS阅读器 因此,我尝试获取一个异步提要 Windows.Web.AtomPub.AtomPubClient client = new Windows.Web.AtomPub.AtomPubClient(); client.RetrieveFeedAsync(new Uri("http://MyURI/index.rss")).Completed += completed; 以下是回调函数: private void co

我正在尝试构建一个Windows8 metro应用程序。检索提要的小型RSS阅读器

因此,我尝试获取一个异步提要

Windows.Web.AtomPub.AtomPubClient client = new Windows.Web.AtomPub.AtomPubClient();
client.RetrieveFeedAsync(new Uri("http://MyURI/index.rss")).Completed += completed;
以下是回调函数:

private void completed(IAsyncOperationWithProgress<Windows.Web.Syndication.SyndicationFeed, Windows.Web.Syndication.RetrievalProgress> asyncInfo, AsyncStatus asyncStatus);
奇怪的是,我的应用程序每运行一秒钟,这种访问就开始工作

我不明白这里出了什么问题

有人给我一个提示吗


非常感谢

好的。解决方案是BlockingCollection。它是线程安全的。

可以。解决方案:阻止收集。
An exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll but was not handled in user code

Additional information: Eine Schnittstelle, die für einen anderen Thread marshalled war, wurde von der Anwendung aufgerufen. (Ausnahme von HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))

If there is a handler for this exception, the program may be safely continued.