0

I've got an MVC4 app that utilises ActionMailer.Net

This web app is hosted in an Azure cloud service. Everything works fine when running in the Azure simulator on my local machine. As soon as I publish to Azure, my role fails to initialize.

If I look at the intellitrace errors for the instance I can see it attempting to load System.Web.MVC and failing on that. A little further investigation, it appears it might be trying to load the MVC 3 library and failing because it can't find that version.

Has anyone come across this issue and found a solution?

Ben Ford
  • 1,354
  • 2
  • 14
  • 35

2 Answers2

0

Are you redirecting the older MVC references to 4.0 in your web.config?

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
Igorek
  • 15,716
  • 3
  • 54
  • 92
  • This is already configured in the web.config. Should it be different to allow ActionMailer to work? – Ben Ford Sep 18 '13 at 10:06
  • It appears it's a complexity with Azure and assembly binding. More information was available here: https://bitbucket.org/swaj/actionmailer.net/issue/40/mvc3-dependancy – Ben Ford Sep 18 '13 at 10:57
0

Found the solution on the ActionMailer.Net forum on bitbucket:

https://bitbucket.org/swaj/actionmailer.net/issue/40/mvc3-dependancy

Ben Ford
  • 1,354
  • 2
  • 14
  • 35