Click here to Skip to main content
15,938,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I published an asp.net project in IIS. One function is to launch MS Outlook email service. When I opened the pages and click the button to launch Outlook, I got such an Error: Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80070005. Referring the article: [^], I checked the list of Component Services. But I could not find any MS Application item (e.g. Microsoft Outlook Application). Please help if you can share your experience. Thanks in advance.
Posted
Comments
ZurdoDev 19-Nov-13 7:57am    
Is Outlook installed on the sever?
[no name] 19-Nov-13 8:01am    
Ryan: Thanks for your quick response. The server is on my CPU where the Outlook is installed.
Madhu Nair 20-Nov-13 23:49pm    
Outlook should be installed on the clients who are accessing the application.
[no name] 21-Nov-13 8:56am    
Yes. Outlook is installed on all of the client machines, incluing my CPU. If I code like that
<p class="h3" style="margin-top: 0px;">
If you have a question or want to report a bug, or write a comment, please contact Mr. xxx (syoo@wmata.com) for details.
</p>
it is fine to pop out the Outlook. However, when I use this piece of code below:
public void SendEmailthroughOutlook(string emailAddressTo, string sSubject, string sText) {
// http://stackoverflow.com/questions/11736598/open-outlook-window-to-send-email-asp-net
Application app = new Application();
NameSpace ns = app.GetNamespace("mapi");
MailItem message = (MailItem)app.CreateItem(OlItemType.olMailItem);
message.To = emailAddressTo;
sSubject = "Subject: " + sSubject;
message.Subject = sSubject;
message.Body = sText;
message.Send();
ns.Logoff();
}
it works only if run VS. For the published, the error throws out.
Thanks anyway.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900