Closed GoogleCodeExporter closed 8 years ago
You mean to say it enters an infinite loop?
Original comment by azizatif
on 19 Jul 2008 at 10:43
I believe that ASP.NET specifically caters for re-entrancy issues when it comes
to
reporting unhandled exceptions via the Error event.
Original comment by azizatif
on 19 Jul 2008 at 11:38
It continually raises the same exception when trying to send the email.
Because Elmah is trapping for any application errors, it catches the unhandled
ones
in SendMail.
Take this stripped down web.config...
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="elmah">
<section name="errorMail" type="Elmah.ErrorMailSectionHandler, Elmah"
requirePermission="false" />
</sectionGroup>
</configSections>
<elmah>
<errorMail from="xyz@elmah.com" to="abc@elmah.com" />
</elmah>
<system.web>
<httpHandlers>
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory,
Elmah"/>
</httpHandlers>
<httpModules>
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
</httpModules>
</system.web>
</configuration>
... ensure there is no <system.net><mailSettings><smtp> settings...
Then run this through Visual Studio. When you exit the browser you will get an
error
stating that WebDev.WebServer.exe has stopped working.
If you run the same code in debug mode you will see that
ErrorMailModule.SendMail
keeps raising an exception!
Original comment by jamesdriscoll71
on 20 Jul 2008 at 6:22
I can't seem to reproduce the described behavior with respect to re-entrancy.
What I
do see is that leaving out the SMTP server configuration altogether does raise
an
exception and brings down the whole WebDev.WebServer.exe process. This is
normal
because the rules about unhandled exceptions on threads from the thread pool
changes
with .NET Framework 2.0 (see http://support.microsoft.com/kb/911816 for more).
What
I don't see at all is that, "it continually raises the same exception."
Original comment by azizatif
on 20 Jul 2008 at 9:52
1. I'm doing this in Visual Studio 2008 with a project targetted to v3.5 of the
Framework.
2. Set a breakpoint in ErrorMailModule.SendMail
3. Run the scenario described previously
4. I keep hitting my breakpoint in SendMail
I'll zip up a project later if necessary!
Original comment by jamesdriscoll71
on 21 Jul 2008 at 9:25
> I'll zip up a project later if necessary!
That'll definitely help a lot, as an attachment to your issue comment.
Original comment by azizatif
on 21 Jul 2008 at 9:28
Atif, you're right... there is no re-entrancy. I'm going to blame that part on
jet-
lag!! I was incorrectly interpreting what I was seeing... OOPS!!!
However, it's still pertinent to ask, is it right that a badly configured
web.config
brings down the web server? Should we be trapping errors in sending the email
and
discarding them in the same way that ErrorLogModule.LogException does??
Original comment by jamesdriscoll71
on 27 Jul 2008 at 8:48
>>
However, it's still pertinent to ask, is it right that a badly configured
web.config
brings down the web server? Should we be trapping errors in sending the email
and
discarding them in the same way that ErrorLogModule.LogException does??
<<
Fair point to bring up but I would open that up as a separate issue from this
one to
keep the discussion and subject relevant. Meanwhile, I'm going to close this
issue
as invalid.
Original comment by azizatif
on 28 Jul 2008 at 8:41
Interesting that this should have been marked as invalid because I'm seeing
exactly the behavior described.
I have localhost configured for SMTP but that only works for my production
environment.
Meanwhile I was debugging another issue on my workstation which by first
receiving a different exception lead to this SMTP infinite loop exception.
I realize I could make this go away by changing config for debugging etc. I
don't believe that an infinite loop is acceptable under any condition.
Original comment by fangsp...@gmail.com
on 6 Aug 2014 at 9:13
Original issue reported on code.google.com by
jamesdriscoll71
on 19 Jul 2008 at 10:28