Microsoft.Office.Interop.Outlook无法在IIS 8上运行 [英] Microsoft.Office.Interop.Outlook Not working on IIS 8

查看:383
本文介绍了Microsoft.Office.Interop.Outlook无法在IIS 8上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Microsoft.Office.Interop.Outlook不能在本地IIS上运行,但它在debuging时正在使用IIS Express。但是当我发布应用程序时,它不会在IIS8上运行。

using Microsoft.Office.Interop.Outlook is not working on local IIS but it is working on IIS express while debuging.but when i publish app it is not runing on IIS8.

        Application OutlookApplication = new Application();            
        MailItem email = (MailItem)OutlookApplication.CreateItem(OlItemType.olMailItem);
        email.Display();
        email.Recipients.Add("careers@acb.com; bilal@abc.com;");

在IIS上提供异常而不是在localhost上。

Giving Exception on IIS not on localhost.

异常:
mscorlib.dll中出现System.Runtime.InteropServices.COMException类型的异常,但未在用户代码中处理。

Exception: An exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll but was not handled in user code.

请帮助我谢谢。

推荐答案

Microsoft目前不推荐也不支持任何Microsoft Office应用程序的自动化无人参与的非交互式客户端应用程序或组件(包括ASP,ASP.NET,DCOM和NT服务),因为Office在此环境中运行时可能会出现不稳定的行为和/或死锁。

您可以在服务器端Office自动化的注意事项文章。

这篇关于Microsoft.Office.Interop.Outlook无法在IIS 8上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆