- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个在 Sitefinity 6.3 中开发的网站,部署在 Windows Azure 上(网站部署在云服务中)。现在我已将项目升级到 sitefinity 7.0,如其 migration page 中所述。 .
Assembly 'Telerik.Sitefinity, Version=7.0.5100.0, Culture=neutral, PublicKeyToken=b28c218413bdf563'
uses 'Microsoft.WindowsAzure.ServiceRuntime, Version=2.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
which has a higher version than referenced assembly
Could not load file or assembly 'msshrtmi' 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 'msshrtmi' 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 'msshrtmi' could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = msshrtmi
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: msshrtmi | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/user/Projects/TestTime/Code/From Svn/Unpublished/TestTime/
LOG: Initial PrivatePath = C:\user\Projects\TestTime\Code\From Svn\Unpublished\TestTime\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\user\Projects\TestTime\Code\From Svn\Unpublished\TestTime\web.config
LOG: Using host configuration file: C:\Users\Administrator\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/eaa8f4f5/4dd032f8/msshrtmi.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/eaa8f4f5/4dd032f8/msshrtmi/msshrtmi.DLL.
LOG: Attempting download of new URL file:///C:/user/Projects/TestTime/Code/From Svn/Unpublished/TestTime/bin/msshrtmi.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
Stack Trace:
[BadImageFormatException: Could not load file or assembly 'msshrtmi' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +34
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +152
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +77
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +16
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +38
[ConfigurationErrorsException: Could not load file or assembly 'msshrtmi' 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) +752
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +218
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +170
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +91
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +285
System.Web.Compilation.BuildManager.ExecutePreAppStart() +153
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +516
[HttpException (0x80004005): Could not load file or assembly 'msshrtmi' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Web.HttpRuntime.FirstReques
<小时/>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.ServiceRuntime" culture="neutral" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-2.3.0.0" newVersion="2.2.0.0" />
</dependentAssembly>
</assemblyBinding
<小时/>
我还复制了 bin 文件夹中的相关 dll 并添加了对项目的引用。但似乎没有什么对我有用,请让我知道我哪里出了问题?
编辑:------------------------
感谢 [DrewG] 分享重要信息。我按照 DrewG 提到的所有步骤进行操作。然后,当我在 Visual Studio 中运行项目以进行构建后任务时出现错误,然后我删除了该任务并更改了 web.config 中的以下设置:
<bindingRedirect oldVersion="0.0.0.0-2.3.0.0" newVersion="2.2.0.0"/>
到
<bindingRedirect oldVersion="0.0.0.0-2.5.0.0" newVersion="2.2.0.0"/>
然后它运行完美,然后我删除了References文件夹,然后它也运行完美。现在,我无法识别 DrewG 的步骤修复了什么,但在恢复所有步骤后,它工作正常。 我想知道哪些问题可以修复?
谢谢
最佳答案
我在本地运行项目时遇到了类似的问题。它正在尝试加载该 dll (msshrtmi.dll) 的 64 位版本。
Azure 需要 64 位版本的 .dll,但您在本地运行时需要使用 32 位版本,或者需要在 IIS 中设置具有 64 位应用程序池的站点才能在本地进行测试。
我想出了一些技巧来让它在我们的 azure 网站上运行,但它在升级到 Sitefinity 7 之前和之后一直在运行,所以也许它会对您有所帮助。
我将 64 位和 32 位 msshrtmi.dll 文件复制到与 .sln 文件位于同一目录中的名为 References 的文件夹中。然后,我编写了一个快速 .bat 文件,并将其添加为通过我当前构建配置文件的项目的构建后任务。
注意:我有一个名为“Azure”的构建配置文件,我用它来更新一些其他设置,而不是使用 Thunder。 Azure 构建配置文件基本上只是 Release 的副本,但我也喜欢在本地测试 Release 构建。
构建任务如下所示
call $(SolutionDir)References\AZURE.bat $(ConfigurationName) $(SolutionDir)
AZURE.bat 文件如下所示
If %1 == Azure echo "Copying 64bit version of msshrtmi.dll"
If %1 == Azure copy %2\References\64\msshrtmi.dll %2\YourProject\Bin\msshrtmi.dll
If NOT %1 == Azure echo "Copying 32bit version of msshrtmi.dll"
If NOT %1 == Azure copy %2\References\32\msshrtmi.dll %2\YourProject\Bin\msshrtmi.dll
关于azure - 将 Sitefinity 6.3(Windows Azure Webproject)升级到 Sitefinity 7.0 后出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23634137/
我是 java 初学者,我想拥有一个 VPS我需要在我的服务器上安装什么来支持 java 项目我认为只有虚拟机 6.0JBOSS数据库够了任何人都可以帮助我了解我必须在我的 Linux 服务器上安装的
我对 JavaEE 很陌生。我经历了一种我无法向自己解释的奇怪行为。 说明: 我有一个index.jsp,其中包含一个带有搜索词和提交按钮的表单。 在 POST 上,我调用一个处理 doPost 方法
我想创建一个 web 项目(war)..这将依赖于其他 jar(java 项目) 一旦我构建了我的 war,它应该会自动构建 java 项目到 jar 并将其添加到它的本地存储库。 有人可以帮忙吗?
由于我的项目变得越来越大,我开始失去概述 :)我有很多 Ajax 请求并且永远请求适当的文件像:“newbill.php”,“newcustomer.php”等等..意味着每个单例都需要一个新的? 我
我有以下运行良好的 Web 项目。想把项目结构改成maven项目结构。 因此,我将项目修改为如下所示(我在 src/main 下创建了一个名为 webapp 的新文件夹,并将文件夹 WebConten
设置 我在 Mac OSX Mavericks 上使用 Netbeans 7.4,在我的专用服务器上使用 Glassfish 4.0 (build 89) 和 JDK 1.7。为了在本地使用服务器,我
我尝试获取时间戳 createTime 和 updateTime,如 DocumentSnapshot Documentation 中所述。 。到目前为止我已经做了以下工作: 已成功将 firesto
在彻底搜索此论坛寻找答案后,我找不到与我类似的案例。 在使用 Maven 生成 WAR 文件管理器并部署我的服务器后,每次我向需要创建 DAO 的 API 发送 GET 请求时,我都会在服务器控制台上
我有一个在 Sitefinity 6.3 中开发的网站,部署在 Windows Azure 上(网站部署在云服务中)。现在我已将项目升级到 sitefinity 7.0,如其 migration pa
我是一名优秀的程序员,十分优秀!