[Mono-bugs] [Bug 445903] GetField() API fails on Mono 2.0

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Nov 19 10:42:08 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=445903

User mhabersack at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=445903#c7


Marek Habersack <mhabersack at novell.com> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |mhabersack at novell.com
             Status|NEEDINFO                                        |RESOLVED
      Info Provider|kuanil at novell.com                               |
         Resolution|                                                |INVALID




--- Comment #7 from Marek Habersack <mhabersack at novell.com>  2008-11-19 08:42:07 MST ---
As Rodrigo says, we don't support code which uses internal implementation
details. The correct code to access the property on 2.0+ is:

HttpRuntimeSection sec = WebConfigurationManager.GetSection
("system.web/httpRuntime") as HttpRuntimeSection;
if (sec != null)
   Console.WriteLine (sec.MaxRequestLength);

This is the official, supported and portable way of doing it. There's no reason
to use reflection for this purpose. Hope that helps.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list