如何使用C#从Asp.Net读取Outlook电子邮件

问题描述:

当我尝试从我的asp.net Web应用程序中读取otlook电子邮件并执行此功能时,我将Microsoft.Office.Interop.Outlook._Application.dll文件提供给项目,我编写的代码是适用于窗体应用程序,但它不适用于Web应用程序,而是向我显示以下错误消息。请帮帮我。



无法从程序集'ECCWPProject,版本= 1.0.0.0,文化中加载'Microsoft.Office.Interop.Outlook._Application'类型=中性,PublicKeyToken = null'。该类型被标记为有资格进行类型等效,但包含的程序集未加载为完全受信任。

by the time i try to read otlook emails from my asp.net web application and to do this functionality i give the "Microsoft.Office.Interop.Outlook._Application" .dll file to the project and the code i write is working fine for window form application but it does not work for the web application rather it shows me the below error message. Please help me.

Could not load type 'Microsoft.Office.Interop.Outlook._Application' from assembly 'ECCWPProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The type is marked as eligible for type equivalence, but the containing assembly is not loaded as fully trusted.

您好,



我认为
Hi ,

I think the
Microsoft.Office.Interop.Outlook dll

可能已损坏。您可以删除dll并再次添加到解决方案中。

may be corrupted. You can remove the dll and add again into your solution.