在asp.net中使用outlook时出错 [英] Error while using outlook in asp.net

查看:84
本文介绍了在asp.net中使用outlook时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Outlook通过我的asp.net网站发送电子邮件。当我在我的开发机器上试用它时它工作正常。但是当我在服务器上部署我的网站时,它会给我以下错误。





''使用CLSID检索组件的COM类工厂{0006F03A-0000-0000-C000-000000000046}由于以下错误而失败:80010001''





Plz帮助!

I am using Outlook to send email through my asp.net website. It works fine when I try it on my development machine. But When I deploy my website on server, it gives me following error.


''Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80010001''


Plz Help!

推荐答案

在服务器上安装正确版本的Interop程序集



http://www.microsoft.com/en-us/download/details.aspx?id=20923 [< a href =http://www.microsoft.com/en-us/download/details.aspx?id=20923target =_ blanktitle =New Window> ^ ]
Install the proper version of Interop assemblies on the server

http://www.microsoft.com/en-us/download/details.aspx?id=20923[^]


不要使用outlook发送电子邮件,你不应该尝试在Web服务器上自动化办公室。这不仅有问题,还有其他事项需要考虑许可问题



相反,你应该使用SMTP客户端..这是一个非常简单的例子,有一个谷歌,你会发现大量的例子



http://bradkingsley.com/sending-email-from-asp-net-4-c-sample-code/ [ ^ ]
Don''t use outlook to send email, you shouldn''t be trying to automate office on a web server. Not only is it problematic, there are licensing issues to consider amongst other things

Instead, you should be using the SMTP client .. a very simple example here, have a Google and you will find loads of examples

http://bradkingsley.com/sending-email-from-asp-net-4-c-sample-code/[^]


关注需要两步。



1.创建outlook附件。这个附件应该包含所有字段,例如主题,附件,正文,来自等等。

2.通过smtp发送
Following two step are required.

1. create outlook attachment. this attachment should have all fields i.e. subject, attachment, body, to , from , etc
2. send it thru smtp


这篇关于在asp.net中使用outlook时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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