Murat Güzel
Murat Güzel

Reputation: 94

Could not load file or assembly System.Web.Mvc, Version=5.2.3.0

I have an MVC project. I can run in my local environment. When I deploy a web hosting on Godaddy, I get an error like this, Where do I have to look?

Could not load file or assembly 'System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken="31BF3856AD364E35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

Upvotes: 0

Views: 2346

Answers (1)

Mike
Mike

Reputation: 629

Even know Godaddy is hosting the site, I don't think they are the culprit of the error.

I would check the version of your reference with the version in the config. You currently have 5.2.3 but the actual reference could be 5.2.2 or something of the sorts. An example would be...

Under References I have EntityFramwork.dll Version 5.0, But the web.config shows that I am using EntityFramwork.dll Version 6.0. This dll will be in your bin folder as well.

I would also check the iis settings in Godaddy. If that still does not work check your framework and ensure that godaddy supports your version. You should see this in the iis settings.

I use godaddy hosting too. I have not had much issue with this. I do set up my PC as a server and do my publishing there. Then I copy over the published files. This seems to help deter main were the bug is. On my side or godaddys.

Sometimes people are quick to mark you down when they don't fully understand the issue. I would like for those to remain quite.

Upvotes: 4

Related Questions