Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Intermittent MailMessage Rrror
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00882426
Message ID:
00885025
Views:
15
Hi Bill,

I have seen where developers make changes to the BIN directory by adding or changing files. When that happens the application is restarted, losing all session state. I have also seen where anti-virus software can trigger this to happen as well. To resolve the problem, you need to direct the anti-virus software to not scan the BIN directory to trigger the restart.

>Hi Jim ( and Cathi ),
>
>I've been monitoring this and found out an interesting situation. Because ir's intermittent and seems related to connectivity or server response it's been difficult to accurately reproduce the condition for analysis. But this morning a developer had the error pop up on him and I was able to talk with him about it. It appears that ( at least in this case ) the condition caused IIS to eventually timeout whcih threw a system level error which IIS handled and displayed an ASP.NET error message. The error eventually found its way back to my application logic which obediently logged the error. But, as a result, my retry code never fired even though the code is in a try-catch block.
>
>Have you all noted behavior like this and is there some sort of workaround? Am I missing something here?
>
>Bill
>
>>Bill,
>>
>>I don't know if this will resolve your issue or not, but I ran into an issue where after upgrading certain applications on some Windows 2000 servers, all of my messages generated that error. After looking into it, it appears that newer versions of CDO require that you specify the smtp server before sending the message. I'd been accustomed to using CDONTS with ASP classic and never had to specify a server. Since my intial messaging implementation worked for some time without any issues, I'd never anticipated this issue until somebody installed a new version of MS Project on a server I had deployed an application on, and it installed a new version of CDO.
>>
>>The short of it is, specifying the smtp server (if you don't already) could be the ticket to resolving your issue. With any ASP.NET site I develop that has to send mail, I add an item to the Web.Config for a site smtp server in the AppSettings section like this.
>>
>>
>><appSettings>
>>       <add key="SiteSmtpServer" value="localhost"></add>
>></appSettings>
>>
>>
>>In this example, I specify localhost (it's an app I'm working on developing on my local box at the moment) but that could be any valid smtp server's hostname or ip address. Then in my code I would write
>>
>>
>>Dim objSmtp As System.Web.Mail.SmtpMail
>>objSmtp.SmtpServer = ConfigurationSettings.AppSettings("SiteSmtpServer")
>>
>>
>>I can then generate a System.Web.Mail.MailMessage and send it with the SmtpMail object I've already created.
>>
>>
>>Dim objMail As New System.Web.Mail.MailMessage
>>objMail.Subject = "Here is the subject"
>>objMail.Body = "Here is the body of the message"
>>objMail.To = "youremail@yourdomain.com"
>>objMail.From = "jerwin@visionds.com"
>>
>>objSmtp.Send(objMail)
>>
>>
>>If in fact it turns out that you're already specifying an smtp server, or this doesn't resolve your issue, it could be that whatever smtp server you are using is having issues that when you call the send method, the server is offline, overloaded or otherwise unavailable to send it. Working around this would require adding some kind of queueing for your messages where you have another service running that will queue your messages and keep trying to send them until the server is available and they are sent. I believe you can find something that does this from quiksoft (www.quiksoft.com) called EasyMail SMTP Express.
>>
>>
>>Hope this helps.
>>
>>regards,
>>
>>JE
>>
>>
>>>I have an ASP.NET application in which part of the business process is to instantiate a MailMessage object and send a mail message via an SMTP server. This all works properly for the most part.
>>>
>>>However, once in a while, intermittently, my error log indicates I get the error:
>>>Could not access 'CDO.Message' object
>>>Since this happens only once in a while, I suspect that it is either network connectivity related or possibly the SMTP Server itslef is not responding for some reason.
>>>
>>>Has anyone seen this kind of behavior and knows the various causes/cures if any?
>>>
>>>Thanks,
>>>Bill
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform