maoyuan121 / elmah

Automatically exported from code.google.com/p/elmah
Apache License 2.0
0 stars 0 forks source link

NullReferenceException in Error.CopyCollection(NameValueCollection) ASP.NET 3.5 #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. When I run my ASP.NET 3.5 web application I get an error in Elmah when
my project is trying to open a new window with a ReportServer PDF report in it.
2. If I remove the e-mail config from my web.config the error goes away.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Elmah 1.0-Beta2 on Windows XP in Visual Studio 2008

Please provide any additional information below.
I download the source files and compiled them.  I Set the reference in my
website project to this compiled DLL and I was able to get the attached
errors screen in my Visual Studio 2008.  Please contact me if I can provide
better information Mike@Hitechengineering.net

Original issue reported on code.google.com by ought...@gmail.com on 11 Sep 2008 at 8:25

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I added the following code to ERROR.CS to get past this error:

  private static NameValueCollection CopyCollection(NameValueCollection collection)
        {
            if (collection == null )
                return null;

            try {
                if (collection.Count == 0)
                     return null;
            }
            catch {
                return null;
            }

            return new HttpValuesCollection(collection);
        }

Pure butchery I know BUT it fixed my problem!!!!

Original comment by ought...@gmail.com on 11 Sep 2008 at 8:37

GoogleCodeExporter commented 9 years ago
Would it possible for you to send the stack trace? I see it in the screenshot 
but 
it's clipped. It seems the exception occurs deeper than in ELMAH.

Original comment by azizatif on 13 Sep 2008 at 3:17

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 30 Sep 2008 at 10:57

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 9 Mar 2009 at 9:36