Question

I just upgraded one of our web apps to ASP.NET 4.0. It is using CssFriendly for the Menu and a few pages that have Trees on them. When I try to run on my local machine (Win7 x64, IIS7) I am getting:

error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: The browser or gateway element with ID 'MozillaFirefox' cannot be found.

Source Error:

Line 7: </browser>
Line 8:
Line 9: <browser refID="MozillaFirefox">
Line 10: <controlAdapters>
Line 11: <adapter> controlType="System.Web.UI.WebControls.Menu"

Source File: E:\RivWorks\localhost\App_Browsers\CSSMenuAdapter.browser

Version Information:
Microsoft .NET Framework Version:4.0.30319;
ASP.NET Version:4.0.30319.1

I browsed for some solutions and followed the directions at http://www.asp.net/LEARN/whitepapers/aspnet4/breaking-changes under the “Browser Definition Files Updated“ heading. If I run ASPNET_REGBROWSERS in the command window in VS2010 I get:

aspnet_regbrowsers –i
Command "aspnet_regbrowsers" is not valid.

So I tried it from the command prompt (in admin mode) and it seemed to work. I then recompiled my app and republished it. I am still getting the same error. Any ideas what I am missing?


NOTE 1: In my CSSMenuAdapter.browser file (CSS Friendly) there is an entry:

 <browser refID="MozillaFirefox">
    <controlAdapters>
      <adapter controlType="System.Web.UI.WebControls.Menu"
               adapterType="RivWorks.Web.MenuAdapter" />
    </controlAdapters>
  </browser>

In C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\Browsers\mozilla.browser there is:

<browser id="MozillaFirefox" parentID="MozillaRV">
    <identification>
        <userAgent match="Gecko\/\d+ Firefox\/(?'version'(?'major'\d+)(?'minor'\.[.\d]*))" />
    </identification>

    <capabilities>
        <capability name="browser"                         value="Firefox" />
        <capability name="majorversion"                    value="${major}" />
        <capability name="minorversion"                    value="${minor}" />
        <capability name="version"                         value="${version}" />
        <capability name="type"                            value="Firefox${version}" />
    </capabilities>
</browser>

I am not understanding why it cannot be found. :(


NOTE 2: I commented out the browser element in the CSSMenuAdapter.browser file and the site is working again. I looked at the code that was generated and it looks good in Chrome. I also looked at it in Firefox and it is working (scratching my head on that one as it is commented out). And IE is working as well. I am so lost as to what is really broken here now!

Was it helpful?

Solution

update refID to just "Firefox". that worked for me because in C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\Browsers\mozilla.browser Id is Firefox not MozillaFirefox.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top