[Mono-bugs] [Bug 688794] New: NullReferenceException in GetCustomEncoderFromConfig on new ASP.Net MVC webapp
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Apr 20 10:30:26 EDT 2011
https://bugzilla.novell.com/show_bug.cgi?id=688794
https://bugzilla.novell.com/show_bug.cgi?id=688794#c0
Summary: NullReferenceException in GetCustomEncoderFromConfig
on new ASP.Net MVC webapp
Classification: Mono
Product: Mono: Class Libraries
Version: 2.10.x
Platform: x86-64
OS/Version: Linux
Status: NEW
Severity: Major
Priority: P5 - None
Component: Sys.Web
AssignedTo: mhabersack at novell.com
ReportedBy: cinyc.s at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.16)
Gecko/20110322 Fedora/3.6.16-1.fc14 Firefox/3.6.16
When running a brand-new MonoDevelop 2.4 ASP.Net MVC application on Mono
2.10.1, using the "Mono / .Net 4.0" profile, the application output indicates
that a NullReferenceException occurs when trying to show the web application.
OS is Fedora 14, using RHEL5 mono packages.
Reproducible: Always
Steps to Reproduce:
1. Start MonoDevelop
2. Create a new ASP.Net MVC project
3. Right-click on project name, select "Options". Under "General", change the
profile to "Mono / .Net 4.0".
4. Press Ctrl-F5 to run the web application.
Actual Results:
Exception is shown in Application Output as soon as a page-load is attempted.
Application is not displayed.
Expected Results:
Application is displayed.
Tracked this one down a little bit. Seems to be an issue with finding the
web.config file, or any configuration file. The line in question tries to
access cfg.Section.EncoderType, and throws a NullReferenceException because
Section returns null.
Full Application Output paste:
Adding applications '/:.'...
Registering application:
Host: any
Port: any
Virtual path: /
Physical path: /tmp/MVCHTTP/MVCHTTP/
xsp4
Listening on address: 127.0.0.1
Root directory: /tmp/MVCHTTP/MVCHTTP
Listening on port: 8080 (non-secure)
System.NullReferenceException: Object reference not set to an instance of an
object
at System.Web.Util.HttpEncoder.GetCustomEncoderFromConfig () [0x00006] in
/usr/src/redhat/BUILD/mono-2.10.1/mcs/class/System.Web/System.Web.Util/HttpEncoder.cs:192
at System.Lazy`1[System.Web.Util.HttpEncoder].InitValue () [0x0014f] in
/usr/src/redhat/BUILD/mono-2.10.1/mcs/class/corlib/System/Lazy.cs:155
System.NullReferenceException: Object reference not set to an instance of an
object
at System.Web.Util.HttpEncoder.GetCustomEncoderFromConfig () [0x00006] in
/usr/src/redhat/BUILD/mono-2.10.1/mcs/class/System.Web/System.Web.Util/HttpEncoder.cs:192
at System.Lazy`1[System.Web.Util.HttpEncoder].InitValue () [0x0014f] in
/usr/src/redhat/BUILD/mono-2.10.1/mcs/class/corlib/System/Lazy.cs:155
Unhandled exception: System.NullReferenceException: Object reference not set to
an instance of an object
at System.Web.Util.HttpEncoder.GetCustomEncoderFromConfig () [0x00006] in
/usr/src/redhat/BUILD/mono-2.10.1/mcs/class/System.Web/System.Web.Util/HttpEncoder.cs:192
at System.Lazy`1[System.Web.Util.HttpEncoder].InitValue () [0x0014f] in
/usr/src/redhat/BUILD/mono-2.10.1/mcs/class/corlib/System/Lazy.cs:155
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list