So, I recreated the app server twice and enabled REST services, but continue to get this message when trying to browse to service. Anyone have any other ideas of something to check?
I’ve noticed that some services are big hairy and complex and swagger chokes on rendering the help screen for them.
What version are you on?
And do you get this with All Services? or just some?
We are on 10.1.500.14
This is happening with all services.
I have it working on a test server running 10.1.500.17, but cannot get this working on the production server.
Hmmm did you delete the app server completely and re-create it from scratch/
Remove virtual site, remove folder, remove Local Client, remove config?
You should then be able to re-create it with the same name and it shouldn’t affect your clients.
Also since its working on test have you tried doing a DIFF on the web.config file in Test vs Production? there may be a missing config option or two… (if re-creating from scratch isn’t an option)
I’ll compare the web.config files. Yea, deleted the app pool, necessary folders, etc.
Diff check turned up nothing, I am trying to get this working on our print server, so I can try to re-create again.
I re-created the app server and tested REST services, worked fine.
Then I copied Erp.Services.BO.Project.dll to the assemblies folder to fix an issue in our version. Also copied back the CSG, Erp/El, Customization, and Reports folders located under the Server folder.
Recycle the app pool, then it quits working.
Hmm I am guessing there is something in those CSG customizations that is breaking things…
If you remove those things does it start working again?
Figured out the cause at least, for whatever reason, the error is caused by a file(s) in this folder.
Server\Customization\Externals
Maybe you are causing a name crash. What are your DLL’s inthere?
This dll is causing the problem.
System.Net.Http.Formatting.dll
That dll is in the Server\Assemblies\WebApi folder as well
That’s a pretty popular extension I’d image that Epicor REST is using it and this is causing a version crash because the External’s folder is in the same APPPATH.
I assume for a BPM that uses it?
Yes, used in a BPM
Yup, just confirmed that Epicor uses it internally. It’s in the assemblies folder. For Version 17 they are using version 5.2.30128.0
Can you copy that from the assemblies folder into your externals folder maybe if you use the same file it will be ok?
Nope, didn’t like that.
ok I think its just a file conflict… This worked for me in my system.
The System.Net.Http.Formatting.dll you dropped in the external’s folder… just rename that puppy something else. I appended _badbadepicor.dll to the end of it. The name of it the file itself doesn’t matter (or shouldn’t) for your BPM.
You’ll have to modify the BPM to re-import the file but everything else should work the same.
Doing this allowed my REST API to work again, and my External DLL worked too
WIN / WIN
PS: I’ll report this “BUG” to the DEV FORUM for REST and hopefully they can exclude the externals folder from the path going forward.
ok got some feedback from Epicor Dev, this works I’ve verified on my system. You can leave the offending DLL int he External Folders.
Open your server web.config find the following code
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="Assemblies/WebApi" />
Then append this right after
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
All together it should look like this
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="Assemblies/WebApi" />
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Then recycle your app server
That did it, thanks Jose!
this error can also happen when System.Net.Http.Formatting.dll or System.Web.Http from different ASP.NET version is placed in GAC.