Sponsored by
www.aspnetemail.com
|
 |
Discuss This FAQ Item
Got a question? Another Suggestion? Want to post your solution? Discuss it below.
-
about tracking fake email address
[ Reply ]
Hi
I wonder if the inner Exception can track whether the email is sent to a fake email address? (or the email is unable to be delivered to recipient?)
I've tried that it seems it cannot track any exceptions. If I want to do that is there any method?
WEIWEIWEI [ chau_raymond ( at ) hotmail dot com ],
2004-03-31 17:21:08
#
-
External component has thrown an exeception
[ Reply ]
Hello all, Here's the scenario. win200 server. iis5.0, not running aspnet as a user. cdosys.dll has permissions set for the user using the mail account. All of this is installed on "WEB1". After installing sp4, web1 cannot send out mail. After uninstalling sp4, I still couldn't send. Reinstalled sp4, still can't send. The email server is a remote server however I don't even think the mail is getting passed the cdosys.dll permissions. Other web servers can send out mail from a different box, except for web1. Here is a code sample of what it looks like on the server.
<code>
Dim msg As New MailMessage() Dim body As String Me.Label1.Text = "" body = "test body 1" msg.To = "anyone@anywhere.com" msg.From = ConfigurationSettings.AppSettings("GuestEmailFrom") ' some email address msg.Subject = "test subject 1" msg.Body = body Mail.SmtpMail.SmtpServer = ConfigurationSettings.AppSettings("SMTPServer") Try SmtpMail.Send(msg) Me.Label1.Text = "success1" Catch ex As Exception Me.Label1.Text = "Error1: " & ex.Message.ToString End Try
</code> This is the error.
Exception Information System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.Runtime.InteropServices.SEHException: External component has thrown an exception. at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at WebBookingEngine.Support.lnkSend_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain() --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain() at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Paul [ paulm ( at ) allresnet dot com ],
2004-05-04 15:33:52
#
-
RE: External component has thrown an exeception
[ Reply ]
Resolved the problem. I installed IE6 to get outlook express and used the mail server ip to send mail from outlook. I also read in a post that you can also do this with outlook.
Paul [ paulm ( at ) allresnet dot com ],
2004-05-06 15:05:59
#
-
RE RE: External component has thrown an exeception
[ Reply ]
I have the problem to send email by using C# code. I wander if anyone can give me a help. I can run this C# code on other PC which have installed the same .net development environment, but not this PC.
The C# code is:
MailMessage myMail = new MailMessage();
myMail.From = "Bai.Hao@logicacmg.com";
myMail.To = "Bai.Hao@logicacmg.com";
myMail.Subject = "jjj";
SmtpMail.SmtpServer = "128.129.220.79";//SMTPServerIP;
try
{
SmtpMail.Send( myMail);
}
catch(Exception ex )
{
Console.WriteLine("The following exception occurred: " + ex.ToString());
//check the InnerException
while( ex.InnerException != null )
{
Console.WriteLine("--------------------------------");
Console.WriteLine("The following InnerException reported: " + ex.InnerException.ToString() );
ex = ex.InnerException;
}
}
The error message is:
The following exception occurred: System.Runtime.InteropServices.SEHException: E
xternal component has thrown an exception.
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at System.Web.Mail.LateBoundAccessHelper.CreateInstance()
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at processDailyReports.proDailyReports.doDailyReport() in d:\projects\crystal
report\code\prodailyreport\class1.cs:line 161
Thank you.
Bai
Bai Hao [ Bai dot Hao ( at ) logicacmg dot com ],
2004-09-07 19:38:24
#
-
RE: External component has thrown an exeception
[ Reply ]
I have just fixed this error on my web application.
ASSERT THAT CONTROL NAMES IN .ASPX PAGE ARE EXACTLY EQUAL TO THOSE REFERENCED IN YOUR .CS FILES!!! I mean case sensitive equal. This may save a lot of time to you.
Bye
Legolas [ Legolas558 ( at ) email dot it ],
2005-06-02 02:01:09
#
-
RE: External component has thrown an exeception
[ Reply ]
-
Mail error
[ Reply ]
Getting the following error while sending mails from asp.net using cs.net
[SEHException (0x80004005): External component has thrown an exception.] System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) +0 System.Activator.CreateInstance(Type type, Boolean nonPublic) +66 System.Web.Mail.CdoSysHelper.Send(MailMessage message) +64 System.Web.Mail.SmtpMail.Send(MailMessage message) +153 Synchronization.mailkaro.cmdsend_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\sendmailapp\mailkaro.aspx.cs:69 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain() +1277
SharmaKBKM [ bhaskara dot sharma ( at ) igate dot com ],
2004-08-13 00:25:11
#
-
CDO.Message error
[ Reply ]
I have two .net applications that are running on the same web server. Both have been sending mail via system.web.mail via the same SMTP server fine for about a week. Now one of them is giving the "Could not access 'CDO.Message' object" error. What would cause one application to have a problem and the other not? Also, this same app had this same problem from the very first attempt to send email when it was on another web server. I'm having the guy who worked on it look at the InnerExceptions as the site suggests. However, we're currently in user testing and *really* don't have time to deal with extraneous errors. Help!
Bryan [ bryan_sirtosky ( at ) hotmail dot com ],
2005-04-12 15:12:50
#
-
Inner Exception
[ Reply ]
After seeing the example above which uses the While Loop to loop through the InnerExceptions, I decided to make an effort to understand the Exception class more thoroughly. My question is, why would I want to use this looping example, when Exception.GetBaseException.ToString appears to yield the same information? Are there any differences that I might not be seeing?
Doug [ DMcMahon ( at ) eatonvance dot com ],
2005-05-06 07:07:45
#
-
RE: Inner Exception
[ Reply ]
Exceptions are typically wrapped in several layers of other exceptions. The code samples above navigate through the entire exception tree, gathering information about all of the intermediate exceptions so you can see what happened as the original exception bubbled up through the code and was wrapped inside more exceptions.
Calling GetBaseException() goes directly to the root of the exception tree, so you would miss all of the intermediate exceptions. But if this is enough information for you to diagnose the problem I don't see any problem with it.
Derek Schaab [ dschaab ( at ) brightcorner dot com ],
2005-05-12 12:23:26
#
-
RE RE: Inner Exception
[ Reply ]
This is a common misconception about inner exceptions. Calling Exception.ToString() prints out everything you need to know about an exception, and then it calls ToString() on the inner exception as well, so there is NO need to have any kind of custom looping in order to see all inner exceptions. In fact, most of the code I've seen that prints out or logs exceptions actually gives LESS information than calling ToString() does, because the developer fails to capture some of the information (such as source) that ToString() by default returns.
Bottom line: just use Exception.ToString().
Don't use Exception.Message, because that will NOT return inner exception messages.
rlively [ kzu5gh702 ( at ) sneakemail dot com ],
2006-09-28 07:03:04
#
-
RE: RE RE: Inner Exception
[ Reply ]
From MSDN:
http://msdn2.microsoft.com/en-us/library/system.exception.tostring.aspx
.NET Framework Class Library Exception.ToString Method
The default implementation of ToString obtains the name of the class that threw the current exception, the message, the result of calling ToString on the inner exception, and the result of calling Environment.StackTrace. If any of these members is a null reference (Nothing in Visual Basic), its value is not included in the returned string.
The name of the inner exception and the stack trace are returned only if they are not a null reference (Nothing in Visual Basic).
rlively [ kzu5gh702 ( at ) sneakemail dot com ],
2006-09-28 07:06:55
#
-
RE RE: Inner Exception
[ Reply ]
Doug:
I just noticed in your post that you mentioned using Exception.GetBaseException.ToString(). Derek Schaab is correct that using GetBaseException will miss some information, but if you use ToString() on the outermost exception, it will return everything for all exceptions in the hierarchy, including the BaseException.
rlively [ kzu5gh702 ( at ) sneakemail dot com ],
2006-09-28 07:11:09
#
-
RE RE: Inner Exception
[ Reply ]
Doug:
I just noticed in your post that you mentioned using Exception.GetBaseException.ToString(). Derek Schaab is correct that using GetBaseException will miss some information, but if you use ToString() on the outermost exception, it will return everything for all exceptions in the hierarchy, including the BaseException.
rlively [ kzu5gh702 ( at ) sneakemail dot com ],
2006-09-28 07:11:42
#
-
mail thro mailmessage()
[ Reply ]
The following code neither sends error nor sends mail. could anyone help on this. MailMessage mmail = new MailMessage(); mmail.From ="syrakris@yahoo.com"; mmail.To ="syrakris@yahoo.com"; mmail.Subject ="Sample mail"; mmail.Body ="Hello"; SmtpMail.SmtpServer.Insert(0,"localhost"); try { SmtpMail.Send(mmail); } catch(Exception ex ) { Response.Write("The following exception occurred: " + ex.ToString() ); //check the InnerException while( ex.InnerException != null ) { Response.Write("--------------------------------"); Response.Write("The following InnerException reported: " + ex.InnerException.ToString() ); ex = ex.InnerException; } }
Ramya [ syrakris ( at ) yahoo dot com ],
2005-09-30 08:07:44
#
-
InnerException
[ Reply ]
Exception has been thrown by the target of an invocation. please help me regarding this.
mukkala [ kumarareddy ( at ) rediffmail dot com ],
2005-10-05 00:00:25
#
-
mix of incorrect email addresses
[ Reply ]
if mail.To=correct email address mail.Cc = incorrect email address, why wont the email deliver just to the correct email address..... is there any way around this problem
dzf [ s103109798 ( at ) webmail dot ucc dot ie ],
2005-11-01 09:03:00
#
-
Email from PDA
|