How to run the AVRWEBPublisher on a 64-bit machine

Discussion in 'WebPublisher' started by CharlesV, Mar 29, 2014.

  1. CharlesV

    CharlesV New Member

    I installed the AVRWEBPublisher on 64-bit machine but it gives the following error message.

    Server Error in '/AVRWEBPublisher' Application.

    Could not load file or assembly 'AVRWebPublisher' 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 'AVRWebPublisher' 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 'AVRWebPublisher' 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 'AVRWebPublisher' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
    System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
    System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +416
    System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +166
    System.Reflection.Assembly.Load(String assemblyString) +35
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +190

    [ConfigurationErrorsException: Could not load file or assembly 'AVRWebPublisher' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +1149
    System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +332
    System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +119
    System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +36
    System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +219
    System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +192
    System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +57
    System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +295
    System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +482
    System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +117
    System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +203
    System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +52
    System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +53
    System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +428
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +274
  2. Nagy Ottó

    Nagy Ottó Administrator Staff Member

    The web application can run on 64-bit machines but You have to do some configuration steps in the application pool on IIS.
    Unfortunately on different operating systems You have to do diferrent steps, but I found a good blog what will discuss the steps needed to be able to successfully configure.

    http://blogs.technet.com/b/sbs/arch...-run-a-32bit-web-application-on-sbs-2008.aspx



    This blog shows the following steps:


    Content Updated on 5/20/2011 to include steps for SBS 2011 Standard
    Every so often we come across a support case where a customer has a need for a 32 bit web application to run on the SBS 2008/2011 server. This need usually arises due to a third party website or application that only has a 32 bit Module or ISAPI filter that needs to run on the site. This blog will discuss the steps needed to be able to successfully configure a web site or web application to run under a 32 bit application pool.
    In this sample case, I have created a web site called test, running under an application pool that is also called test. This application pool is configured to enable 32-Bit applications which you can see under the advanced settings of the Application pool.
    [​IMG]
    Generally, this is where the support case comes in, as when the customer tries to browse their website it fails with either a 503 service unavailable error or a 500.19 error. In this case we got a 503 service unavailable error first which basically means the app pool has crashed/shutdown.
    [​IMG]
    This will also normally be accompanied by IIS-W3SVC Event 2280 in the application event log similar to the following.
    [​IMG]
    To get past this error we need to edit the Native modules in the applicationhost.config by defining a preCondition bitness parameter for the RpcProxy native module. Native modules are registered and un-registered at the web server level under the <globalModules> section.
    Before we make any modifications to the applicationhost.config, take a backup of your current IIS configuration:
    1. Launch an Administrative cmd prompt.
    2. Changed the directory path to C:\Windows\System32\Inetsrv\
    3. Type "Appcmd.exe add backup NameofBackup"
    [​IMG]
    Once we have a successful backup we can go ahead and modify the applicationhost.config file to add the bitness precondition:
    1. From within the same administrative cmd prompt change the path to C:\Windows\System32\inetsrv\config\
    2. Type "notepad applicationhost.config" which will launch notepad and open the applicationhost.config file
    3. Locate the <globalModules> section.

      [​IMG]
    4. Modify the PasswordExpiryModule to have a bitness precondition so it looks as follows

      <add name="PasswordExpiryModule" image="C:\Windows\system32\RpcProxy\RpcProxy.dll" preCondition="bitness64" />

      [​IMG]

      ** Note that preCondition is case sensitive the "C" must be capitalized.

      Important:
      SBS 2011 standard will also include entries for kerbauth and exppw listed under <globalModules>. These modules belong to Exchange and are also 64 bit. If you are performing this task on SBS 2011 you will have to add the preCondition for bitness64 to these two modules as well:

      [​IMG]
    5. Save and close the applicationhost.config.
    At this point if you attempt to browse your 32-Bit web site you will now see the other error which is the 500.19 error mentioned earlier.
    [​IMG]
    To correct this error we now need to delete both the DynamicCompressionModule and the StaticCompressionModule from your 32-Bit website/application. To do this perform the following steps:
    1. Launch an Administrative cmd prompt.
    2. Change the directory path to c:\windows\system32\inetsrv\
    3. Type Appcmd.exe delete module dynamiccompressionmodule /site.name:yourWebsiteName
      [​IMG]

      **Replace yourWebsiteName with the actual name of your site. In this example the name is test.
      Do the same for the staticcompression module, Appcmd.exe delete module staticcompressionmodule /site.name:yourWebsiteName [​IMG]

      ** In this example we are using a basic web site, however in most cases, you will probably be using a web application. Modify the command to have /app.name:yourAppName rather than /site.name:yourWebsiteName if you are using a web application.
    After completing these steps you should now be able to browse your 32-Bit web application/site
    [​IMG]

Share This Page