Issue while upgrading Sitefinity 6.3 (Azure Webproject) to S

Posted by Community Admin on 05-Aug-2018 14:22

Issue while upgrading Sitefinity 6.3 (Azure Webproject) to Sitefinity 7.0

All Replies

Posted by Community Admin on 13-May-2014 00:00

Hi,

 I have a website developed in Sitefinity 6.3 that is deployed on windows Azure (website deployed in Cloud Service). Now I have upgraded the project to sitefinity 7.0 as mentioned on your migration page.

Project upgraded successfully, and I followied the steps to remove & add References, but then I ran the project & it showed me following error:

---------------------------------------------------------------------------------------------------------------------------------------------------------------

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
'Microsoft.WindowsAzure.ServiceRuntime, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

-----------------------------------------------------------------------------------------------------------------------------------------------------

Then I installed the Azure SDK version 2.2, then following error was displaying:

-------------------------------------------------------------------------------------------------------------------------------------------------------

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 go.microsoft.com/.../ 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

-------------------------------------------------------------------------------------------------------------------------------------------------------

I tried setting following tag in web.config :

---------------------------------------

<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

---------------------------------------

I also copied the related dlls in bin folder & added reference to project.

But nothing seemed to work for me, Please let me know where am I going wrong?

 Thanks

 

Posted by Community Admin on 14-May-2014 00:00

Hey Amit,

After I deployed my site(sf7) after an upgrade from 6.3 to Azure. I went to deploy to our internal staging environment and received the same error as you.  I was able to find the "msshrtmi.dll" in the Azure 2.2 SDK folder.  I copied the dll to the bin and redeployed to our internal staging and it all worked again.

 The location on my machine is: C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\v2.2\bin\runtimes\base\x64

 Happy Coding This!

Posted by Community Admin on 16-May-2014 00:00

Hi Jonathan,

Thank you very much for sharing your solution with the community.

Amit, can you please try the solution suggested by Jonathan and let me know about the result. You may also take a look at the following article for additional information about how to upgrade Sitefinity project running on Azure.

Regards,
Sabrie Nedzhip
Telerik

 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 

Posted by Community Admin on 05-Jan-2016 00:00

Deleting the dll from the bin worked for me

This thread is closed