PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

64-bit version, .NET 4.0, VS2010

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 64-bit version, .NET 4.0, VS2010

    Yes, I'm back...

    Using your new .MSI file, I was able to get Zoom Search running on my 64-bit, .NET 4.0, IIS 7.5 web site.

    But when I open the main web site that houses Zoom Search and try to build the site, I get this error:

    Could not load file or assembly 'ZoomASPX' or one of its dependencies. An attempt was made to load a program with an incorrect format.
    And then this error is followed by a bazillion other errors, which I'm hoping are somehow cascading down from this strange error.

    This happens whether I open the site from the file system or local IIS.

    And even if I don't try to build the site, when I open the global.asax file, the first line has the squiggly mark under it, and the message is what's above about ZoomASPX. Any regular page that I open has that same mark under <%Page %>.

    If I try "View in Browser" on a page in the site, I get this:
    Server Error in '/zzGpwRoot' Application.

    Could not load file or assembly 'ZoomASPX' or one of its dependencies. An attempt was made to load a program with an incorrect format.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.BadImageFormatException: Could not load file or assembly 'ZoomASPX' or one of its dependencies. An attempt was made to load a program with an incorrect format.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'ZoomASPX' could not be loaded.


    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

    Stack Trace:


    [BadImageFormatException: Could not load file or assembly 'ZoomASPX' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
    System.Reflection.RuntimeAssembly._nLoad(AssemblyN ame fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
    System.Reflection.RuntimeAssembly.nLoad(AssemblyNa me fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
    System.Reflection.RuntimeAssembly.InternalLoadAsse mblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
    System.Reflection.RuntimeAssembly.InternalLoad(Str ing assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
    System.Reflection.Assembly.Load(String assemblyString) +28
    System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String assemblyName, Boolean starDirective) +46

    [ConfigurationErrorsException: Could not load file or assembly 'ZoomASPX' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
    System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String assemblyName, Boolean starDirective) +618
    System.Web.Configuration.CompilationSection.LoadAl lAssembliesFromAppDomainBinDirectory() +209
    System.Web.Configuration.CompilationSection.LoadAs sembly(AssemblyInfo ai) +130
    System.Web.Compilation.BuildManager.GetReferencedA ssemblies(CompilationSection compConfig) +178
    System.Web.Compilation.BuildManager.GetPreStartIni tMethodsFromReferencedAssemblies() +94
    System.Web.Compilation.BuildManager.CallPreStartIn itMethods() +332
    System.Web.Hosting.HostingEnvironment.Initialize(A pplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677

    [HttpException (0x80004005): Could not load file or assembly 'ZoomASPX' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
    System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +9079228
    System.Web.HttpRuntime.EnsureFirstRequestInit(Http Context context) +97
    System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +258

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237
    Yet if I go to the page from the "outside" (http://www.myPoorSite.com/myPoorBrokenPage.aspx), I can view the page just fine.

    I suppose I should be happy that it's not the other way around - working in VS2010 and broken to the outside world, but it would be nice to be able to get this working in VS2010 and know that this problem is not masking others.

    Suggestions?

    Thanks.

  • #2
    Hmm that's a bit odd. I presume the ZoomASPX control is only installed in a subfolder of your website (e.g. http://mysite.com/zoomaspx/search.aspx) and not on the root folder. This is recommended to keep different application configurations and so any web.config or IIS setting regarding ZoomASPX should not affect the rest of the site.

    Assuming that's not the problem, see this FAQ about disabling web.config inheritance:
    Q. "Could not load file or assembly..." error regarding a third-party ASP.NET application not related to Zoom

    Let us know if that helps.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      We have a rather odd configuration. We have ~ 65 web sites running on this machine, each with its own application pool. The 65 sites are all connected, though, with a common navigation and shared master pages. They look like subdomains, but it's actually host headers, if that makes a difference.

      site1.domain.com
      site2.domain.com
      site3.domain.com

      etc.

      (Just. Don't. Ask. It seemed like a good idea at the time...)

      Each site has 2 virtual directories: /common and /App_Themes. /App_Themes goes to the App_Themes folder on the "main" site (zzRoot), and /common goes to a folder under that main site:

      e:\inetpub\george\zzRoot\common

      The common folder contains all the master pages, shared PDFs, and other stuff that all the sites might need access to.

      App_Themes contains stylesheets and all the images that appear across all the sites, just so they're all in one place (and because some get used in multiple sites).

      The machine-level web.config file contains a bunch of settings that apply to all the sites (this machine is dedicated to those 65+ related sites). This includes a declaration for a style sheet theme and master page. Some of the individual sites have their own web.config files for various reasons, but most don't.

      This is how I had Zoom Search set up:
      - The ZoomASPX control was in the /bin folder for the zzRoot site
      - All of the sites were indexed together
      - The search box was in the top-level master page, so it was accessible from every page
      - The search page (along with all the .zdat files, etc.) was in zzRoot/common/siteSearch
      - zzRoot/common/siteSearch was NOT set up as an application

      This all worked just fine, except for being unable to build the web sites.

      So I tried uninstalling the control and installing it to zzRoot/siteSearch (moved it out of common just in case having it in that VD was messing up the other sites). That put the control in zzRoot/siteSearch/bin. I set zzRoot/siteSearch to run as an application, with its own app pool.

      Then the search page didn't run because it couldn't find the theme. So I added the /common and /App_Themes virtual directories to that application. And now I'm getting this error when I try to run the search page:
      Using themed css files requires a header control on the page. (e.g. <head runat="server" />).
      **ETA: I figured out what was causing the above error - I had modified the search.aspx page, and then it got overwritten in all the uninstalling & reinstalling. But in the meantime, I had removed the application and moved ZoomASPX.dll back to the zzRoot/bin folder. Search is working again, but I still can't build the sites.

      I seem to be moving farther away from anything that comes close to working.

      At least with my original set-up, the search worked.

      What exactly is the problem with having ZoomASPX.dll in the site's own /bin directory, vs. having it in a separate application running under the main site?

      (And by the way - e-mail notifications are not working for me on the forums.)
      Last edited by aezzell; Dec-02-2011, 04:14 PM.

      Comment


      • #4
        It's not clear to me if you tried the FAQ suggestion of disabling web.config inheritance on the root level (assuming there is one) or at least restricting it to the necessary folders.

        It is hard to say what's the cause of the problem here going by your description alone, especially when your site is evidently pretty complicated.

        Try narrowing down which change affects the rest of your site. Perhaps switching back to 32-bit will make a difference because the rest of your site depended on this.
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          Originally posted by Ray View Post
          It's not clear to me if you tried the FAQ suggestion of disabling web.config inheritance on the root level (assuming there is one) or at least restricting it to the necessary folders.
          As I explained above, I have 65+ sites that inherit certain settings from the machine-level web.config, so I can't disable that inheritance.

          Originally posted by Ray View Post
          Try narrowing down which change affects the rest of your site. Perhaps switching back to 32-bit will make a difference because the rest of your site depended on this.
          I can't use the 32-bit version (tried that already) because doing that made the site dependent on a different machine-level web.config, and that would require having duplicate copies of all the AppSettings.

          I don't understand what you mean by "which changes affects the rest of your site".

          And I don't believe you answered my question:
          What exactly is the problem with having ZoomASPX.dll in the site's own /bin directory, vs. having it in a separate application running under the main site?
          Also - has anyone else reported problems with the e-mail notification? I'm not getting notifications for posts.

          Comment


          • #6
            It needs a way to reference the .zdat files. We may have to look into whether there's a better way of doing this.

            Did the previous version ASP.NET server control allow it to work in your scenario described? Did you notice if this behaviour changed in the recent builds?

            Regarding email notifications - we don't really plan to keep this feature available. Too many over zealous mail servers end up blocking them (and our server) as spam, and we get bounces as well from too many fake/spammer signups. So we intend to remove the feature from the forum.
            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment


            • #7
              I did finally get an e-mail notification about your latest post - go figure.

              I believe the previous version - the one that's still in use on our current production site, which is running in IIS 6, Windows Server 2003 - was running on the IIS 7.5 box when I first installed it. But IIRC, it was only running once I set the application pool to allow 32-bit applications to run. And doing THAT broke something else that I needed to work.

              So then I installed the 64-bit version, and that <knock wood> appears to be working. It just doesn't play nicely with Visual Studio 2010. I can't build my sites, and Intellisense whines incessantly because it can't load ZoomASPX.

              Comment


              • #8
                I'm still having this error - we just set up a development server with the same specs as the production server. I installed VS2010.

                And on every page, the <% @Page %> tag has a squiggly line under it, and when I hover over it, I see an error message:

                ASP.NET Runtime error: Could not load file or assembly 'ZoomASPX' or one of its dependencies. An attempt was made to load a program with an incorrect format.

                Comment


                • #9
                  A little more info - I created a new application pool (ASP.NET 4.0) and set Enable 32-Bit Applications to true.

                  When I assigned this new application pool to the site where I'm running ZoomASPX, I got this:
                  Server Error in '/' Application.

                  Could not load file or assembly 'ZoomASPX' or one of its dependencies. An attempt was made to load a program with an incorrect format.

                  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

                  Exception Details: System.BadImageFormatException: Could not load file or assembly 'ZoomASPX' or one of its dependencies. An attempt was made to load a program with an incorrect format.

                  Source Error:

                  An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

                  Assembly Load Trace: The following information can be helpful to determine why the assembly 'ZoomASPX' could not be loaded.


                  WRN: Assembly binding logging is turned OFF.
                  To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
                  Note: There is some performance penalty associated with assembly bind failure logging.
                  To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

                  Stack Trace:


                  [BadImageFormatException: Could not load file or assembly 'ZoomASPX' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
                  System.Reflection.RuntimeAssembly._nLoad(AssemblyN ame fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
                  System.Reflection.RuntimeAssembly.nLoad(AssemblyNa me fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
                  System.Reflection.RuntimeAssembly.InternalLoadAsse mblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
                  System.Reflection.RuntimeAssembly.InternalLoad(Str ing assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
                  System.Reflection.Assembly.Load(String assemblyString) +28
                  System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String assemblyName, Boolean starDirective) +46

                  [ConfigurationErrorsException: Could not load file or assembly 'ZoomASPX' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
                  System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String assemblyName, Boolean starDirective) +618
                  System.Web.Configuration.CompilationSection.LoadAl lAssembliesFromAppDomainBinDirectory() +209
                  System.Web.Configuration.CompilationSection.LoadAs sembly(AssemblyInfo ai) +130
                  System.Web.Compilation.BuildManager.GetReferencedA ssemblies(CompilationSection compConfig) +178
                  System.Web.Compilation.BuildManager.GetPreStartIni tMethodsFromReferencedAssemblies() +94
                  System.Web.Compilation.BuildManager.CallPreStartIn itMethods() +332
                  System.Web.Hosting.HostingEnvironment.Initialize(A pplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677

                  [HttpException (0x80004005): Could not load file or assembly 'ZoomASPX' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
                  System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +9089964
                  System.Web.HttpRuntime.EnsureFirstRequestInit(Http Context context) +97
                  System.Web.HttpRuntime.ProcessRequestNotificationP rivate(IIS7WorkerRequest wr, HttpContext context) +256

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

                  Comment


                  • #10
                    And more info - it appears that this might simply be a problem with VS2010:

                    https://connect.microsoft.com/VisualStudio/feedback/details/556670/could-not-load-file-or-assembly-error-when-referencing-a-64-bit-assembly

                    What a PITA.

                    Comment

                    Working...
                    X