[Mono-bugs] [Bug 498118] New: Revision 131768 breaks UserControls added in web.config

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Apr 24 14:20:19 EDT 2009


           Summary: Revision 131768 breaks UserControls added in
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: Dax at daxxfiles.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:
Gecko/2009042211 GranParadiso/3.0.9

the change from rev 131767 to 131768 - the new methods in TemplateParser.cs to
find assemblies for namespaces in Import-directives in particular - break
UserControls from web.config files. to be exact, those controls are imported
with namespace null, leading to the method adding (null, assembly) to a
dictionary -> exception.

AddImport (or higher) should simply exit at namesp == null, or treat that case
in a special way. as i don't know how to resolve this correctly, i refrain from
posting my patch (which would add "if (namesp == null) return;" to AddImport ;)

Reproducible: Always

Steps to Reproduce:
1. create an aspx-app with one page and one usercontrol in a nonroot-folder
2. add the control to web.config/configuration/system.web/pages/controls
3. add the control to the page using the recently defined tagname/-prefix
4. view the page
Actual Results:  
System.ArgumentNullException: Argument cannot be null.
Parameter name: key
  at System.Collections.Generic.Dictionary`2[System.String,System.Boolean].Add
(System.String key, Boolean value) [0x00000] 
  at System.Web.UI.TemplateParser.FindNamespaceInAssembly
(System.Reflection.Assembly asm, System.String namesp) [0x00000] 
  at System.Web.UI.TemplateParser.AddAssemblyForNamespace (System.String
namesp) [0x00000] 
  at System.Web.UI.TemplateParser.AddImport (System.String namesp) [0x00000] 
  at System.Web.UI.ControlBuilder.AddChild (System.Object child) [0x00000] 
  at System.Web.UI.ControlBuilder.AppendSubBuilder
(System.Web.UI.ControlBuilder subBuilder) [0x00000] 
  at System.Web.Compilation.AspGenerator.CloseControl (System.String tagid)
  at System.Web.Compilation.AspGenerator.TagParsed (ILocation location, TagType
tagtype, System.String tagid, System.Web.Compilation.TagAttributes attributes)
  at System.Web.Compilation.AspParser.OnTagParsed (TagType tagtype,
System.String id, System.Web.Compilation.TagAttributes attributes) [0x00000] 
  at System.Web.Compilation.AspParser.Parse () [0x00000] 
  at System.Web.Compilation.AspGenerator.Parse (System.IO.TextReader reader,
System.String filename, Boolean doInitParser) [0x00000] 
  at System.Web.Compilation.GenericBuildProvider`1[TParser].Parse () [0x00000] 
  at System.Web.Compilation.GenericBuildProvider`1[TParser].GenerateCode ()
  at System.Web.Compilation.GenericBuildProvider`1[TParser].GenerateCode
(System.Web.Compilation.AssemblyBuilder assemblyBuilder) [0x00000] 
  at System.Web.Compilation.BuildManager.GenerateAssembly
(System.Web.Compilation.AssemblyBuilder abuilder,
System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp,
Boolean debug) [0x00000] 

Expected Results:  
a page with a UserControl

Configure bugmail: http://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