[Mono-bugs] [Bug 546053] New: Same key already exists in the dictionary error when browsing directly to page in sub-folder for precompiled site

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Oct 11 19:21:22 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=546053


           Summary: Same key already exists in the dictionary error when
                    browsing directly to page in sub-folder for
                    precompiled site
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: i386
        OS/Version: openSUSE 11.1
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: chrisbrown76 at hotmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=321967)
 --> (http://bugzilla.novell.com/attachment.cgi?id=321967)
Precompiled test case with source

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1.3)
Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)

When running a precompiled site if browsing directly to a page in a subfolder
e.g http://localhost:8080/Folder1/sub.aspx prior to browsing to a page in the
root of the site e.g http://localhost:8080 a "an element with the same key
already exists in the dictionary" error occurs. 

Reproducible: Always

Steps to Reproduce:
1. Copy precompiled test case into Mono environment
2. Start xsp2 from command line 
3. Open browser and browse directly to http://localhost:8080/Folder1/sub.aspx
Actual Results:  
The following error occurs:

Server Error in '/' Application
An element with the same key already exists in the dictionary.

Description: HTTP 500. Error processing request.

Stack Trace:

System.ArgumentException: An element with the same key already exists in the
dictionary.
  at
System.Collections.Generic.Dictionary`2[System.String,System.Web.Compilation.BuildManager+PreCompilationData].Add
(System.String key, System.Web.Compilation.PreCompilationData value) [0x00000] 
  at System.Web.Compilation.BuildManager.FixVirtualPaths () [0x00000] 
  at System.Web.Compilation.BuildManager.LoadPrecompilationInfo (System.String
precomp_config) [0x00000] 
  at System.Web.Compilation.BuildManager..cctor () [0x00000] 

Version information: Mono Runtime Version: /trunk/mono r143818 Fri Oct 9
15:34:19 NZDT 2009; ASP.NET Version: 2.0.50727.1433


Expected Results:  
Page is returned normally and displays "This is a page in the sub-folder"

As the error states the problem is occurring in
System.Web.Compilation.BuildManager.FixVirtualPaths but specifically it seems
to relate to the fact that both 'global.asax' and 'index.aspx' are present in
our test case. In these two cases 'precompiled.Add' at line 197 will attempt to
add each of these with a 'new_path' value of "/" which consequently results in
the "same key already exists" error we see. However I don't think these files
specifically are related to the problem just any combination of two or more
files that will both have the same new_path value of "/" when FixVirtualPaths
is run. 

I am using using r143818. I see the same behaviour when testing under Apache
also.

-- 
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