错误如下“/veve”应用程序中的服务器错误。
--------------------------------------------------------------------------------与服务器的传输连接失败。 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Runtime.InteropServices.COMException: 与服务器的传输连接失败。 源错误: 
行 72:  {
行 73:  SmtpMail.SmtpServer="www.veve.com";
行 74:  SmtpMail.Send(_famail,_shoumail,biaoti,neirong);
行 75: 
行 76:  //Response.Write("成功发送");
 源文件: g:\veve\expert\newmail.aspx.cs    行: 74 堆栈跟踪: 
[COMException (0x80040213): 与服务器的传输连接失败。
][TargetInvocationException: 调用的目标发生了异常。]
   System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) +0
   System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) +473
   System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) +29
   System.Web.Mail.LateBoundAccessHelper.CallMethod(Type type, Object obj, String methodName, Object[] args)
   System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args)[HttpException (0x80004005): 未能访问“CDO.Message”对象。]
   System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args)
   System.Web.Mail.CdoSysHelper.Send(MailMessage message)
   System.Web.Mail.CdoSysHelper.Send(String from, String to, String subject, String messageText)
   System.Web.Mail.SmtpMail.Send(String from, String to, String subject, String messageText)
   veve.expert.Newmail.Cheok_Click(Object sender, EventArgs e) in g:\veve\expert\newmail.aspx.cs:74
   System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   System.Web.UI.Page.ProcessRequestMain() 

解决方案 »

  1.   

    代码如下:
    SmtpMail.SmtpServer="http://localhost/veve/";

    SmtpMail.Send(_famail,_shoumail,biaoti,neirong);
      

  2.   

    SmtpServer写得对吗?还有就是防火墙关了吗?
      

  3.   


    我关一下防火墙试试,SmtpServer我现在本机测试不知这样写对不对
    SmtpMail.SmtpServer="http://localhost/veve/";
      

  4.   

    http://www.cnblogs.com/jzywh/archive/2005/06/09/170783.html