我在遠程服務器上有一個電子郵件帳戶。 我創建了一個應用程序,它利用outlook interop api來搜索具有特定主題的電子郵件,而不是從中提取附件並將其保存到目錄。用於接收電子郵件的Outlook互操作API的替代方案
手動運行該應用程序時,一切正常。 但是,當我創建計劃任務爲這個應用程序,我得到
Stack:
at System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(System.RuntimeType)
at System.Runtime.Remoting.Activation.ActivationServices.CreateInstance(System.RuntimeType)
at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(System.RuntimeType, System.Object[], Boolean)
at System.RuntimeTypeHandle.CreateInstance(System.RuntimeType, Boolean, Boolean, Boolean ByRef, System.RuntimeMethodHandleInternal ByRef, Boolean ByRef)
at System.RuntimeType.CreateInstanceSlow(Boolean, Boolean, Boolean)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean, Boolean, Boolean, Boolean)
at System.Activator.CreateInstance(System.Type, Boolean)
at PocketDataFromEmail.EmailManager..ctor()
at MyApp.Program.Main(System.String[])
據說,前景並不適合那種情景: Is Interop.Outlook multithreaded?
如何檢查的收件箱中的任何想法交換帳戶並提取附件而不使用outlook interop api? 謝謝。
非常感謝。 – aykut 2011-05-19 18:26:15