API errors
Posted: Fri Dec 19, 2014 12:06 pm
I am using GOLD R5 with source code. I have some custom code added to the CommerceBuilder.WebApi project. I am using VS 2013 for development. Today I needed to make a change to one of my custom API methods (last change was back in August). After building the project and copying the resulting DLL to the test web server (Stop -> copy file -> Start), I got this error when trying to access the site (any page):
I tried changing the bindingRedirect line for System.Web.Mvc in my web.config file:
to use "4.0.0.1" instead of "4.0.0.0", but that doesn't help (same "No HTTP resource was found..." message).
Can anyone help with this?
I copied the development system's System.Web.Mvc.dll to the web site's bin folder (Stop -> copy file -> Start), and I was able to get to the web site. However, now when I try to go to /api/help, I get this error:Could not load file or assembly 'System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I'm guessing there is one or more additional steps I need to take related to the DLL version change, but I'm not sure what else I need to do.<Error><Message>No HTTP resource was found that matches the request URI 'https://[test server]/api/help'.</Message><MessageDetail>No type was found that matches the controller named 'help'.</MessageDetail></Error>
I tried changing the bindingRedirect line for System.Web.Mvc in my web.config file:
Code: Select all
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NHibernate" culture="neutral" publicKeyToken="aa95f207798dfdb4" />
<bindingRedirect newVersion="3.3.1.4001" oldVersion="0.0.0.0-3.3.1.4001" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Can anyone help with this?