在ASP.NET中打开Outlook [英] Open Outlook in ASP.NET
问题描述
我使用asp.net创建网站,我想在本地机器上打开Outlook窗口,点击按钮
我这样做:
Microsoft.Office.Interop.Outlook.Application mApp = new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook.MailItem mEmail = null ;
mEmail =(Microsoft.Office.Interop.Outlook.MailItem)mApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);
mEmail.To = chandana.pushpakumara@hayleysadvantis.com;
mEmail.Subject = AMS Filling;
mEmail.Display();
这段代码完全运行我的本地机器但是我在IIS服务器上托管网站会出现以下错误:
检索具有CLSID {0006F03A-0000-0000-C000-000000000046}的组件的COM类工厂由于以下错误而失败:80080005服务器执行失败(HRESULT异常:0x80080005(CO_E_SERVER_EXEC_FAILURE))。
请任何人帮我解决这个问题
谢谢
您可以使用简单的链接打开Outlook
< a href = mailto:> mail < / a >
这是因为进程的权限问题。我希望这个链接有用。
http://support.micr osoft.com/kb/870655 [ ^ ]
I create web site using asp.net and I want to open outlook window in local machine when click the button
I do this:
Microsoft.Office.Interop.Outlook.Application mApp = new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook.MailItem mEmail = null;
mEmail = (Microsoft.Office.Interop.Outlook.MailItem)mApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);
mEmail.To = "chandana.pushpakumara@hayleysadvantis.com";
mEmail.Subject = "AMS Filling";
mEmail.Display();
This code run perfectly my local machine but i host the web site in IIS server give the following error:
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
Please can any one help me to solve this problem
Thank you
You can use simple link to open outlook as
<a href="mailto:">mail</a>
it is because of the privilege issues of processes.I hope this link will help
http://support.microsoft.com/kb/870655[^]
这篇关于在ASP.NET中打开Outlook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!