Application myApp = new ApplicationClass();
NameSpace mapiNameSpace = myApp.GetNamespace("MAPI");
// 这个出错
MAPIFolder folder = mapiNameSpace.GetDefaultFolder(OlDefaultFolders.olFolderInbox);很奇怪,在本地都是好的,但是发布到server win2003的时候就有问题。error如下:2009-04-15 03:42:14,656 [2532] ERROR ReadMail._Default [(null)] - System.Runtime.InteropServices.COMException (0x9AC40111): ?????? C:\Documents and Settings\Echo\Local Settings\Application Data\Microsoft\Outlook\Outlook.pst,???????????????????????,???????
at Microsoft.Office.Interop.Outlook.MAPIFolder.get_Folders()
at ReadMail._Default.Button1_Click(Object sender, EventArgs e)
NameSpace mapiNameSpace = myApp.GetNamespace("MAPI");
// 这个出错
MAPIFolder folder = mapiNameSpace.GetDefaultFolder(OlDefaultFolders.olFolderInbox);很奇怪,在本地都是好的,但是发布到server win2003的时候就有问题。error如下:2009-04-15 03:42:14,656 [2532] ERROR ReadMail._Default [(null)] - System.Runtime.InteropServices.COMException (0x9AC40111): ?????? C:\Documents and Settings\Echo\Local Settings\Application Data\Microsoft\Outlook\Outlook.pst,???????????????????????,???????
at Microsoft.Office.Interop.Outlook.MAPIFolder.get_Folders()
at ReadMail._Default.Button1_Click(Object sender, EventArgs e)
In DCOMCONFIG change identity as The interactive User. Please helpThank you.Echo
2.
3.If this still does not work, then
start->run: eventvwr
Check the log entries under category 'system'
说默认的文件夹被占用。。请教一下:
1,如果要读取outlook的mail,server上的outlook要运行吗?如果不打开运行,mail是不是不会收到?因为我在本地都是打开的,我的理解是outlook打开。自动收mail,然后程序解析这些已经收到的mail。
2,还是直接在程序中直接收发outlook的mail呢?不是了解,今天刚刚开始熟悉,您们有代码让我参考一下吗?