NancyFx / Nancy.Serialization.JsonNet

NewtonSoft.Json serializer for Nancy
MIT License
40 stars 32 forks source link

Nancy.Serialization.JsonNet.dll not loading in Production #65

Open ilopez opened 7 years ago

ilopez commented 7 years ago

I've got a very weird situation. Obviously on my development machine Nancy.Serialization.JsonNet loads properly in my project.

However, in production Nancy.Serialization.JsonNet does not load.

I can confirm the assemblies loaded using Sysinternals Process Explorer, and my initial review of the FusionLogs in production do not indicate a problem. However, I do have a "Total # of load failures" count of 1 in production, and 0 in development.

I'm not expecting a solution to this, at the moment; just putting something here for the google gods for the other poor souls who have to spend 5 days tracking this down.

I've tried upgrading the project to .NET 4.6, down to 4.0, nothing.

I think I'm going to have to manually return JSON strings, and manually handle them in my client library for now. Bummer!

khellang commented 7 years ago

Hmm. You're not giving us much to work with here... Is there anything that makes you think this is a problem with the assembly itself? Something that we can fix on our end?

ilopez commented 7 years ago

@khellang - I definitely recognize that this is going to be tough to diagnose, so I put the issue up to see if anyone else has this problem. Close it if you'd like, but it definitely was a weird situation.

wootencl commented 7 years ago

@ilopez Were you ever able to figure out this situation? Think I may be running into the same thing

ilopez commented 7 years ago

@wootencl Hey, yep I ended up returning my responses as manually converted Json Strings after passing my return objects through JsonConvert.Serialize().

It never happened again on another system. It was (from what I remember) a clean install of Windows Server 2012, so nothing really should have stopped the load.

I even tried to troubleshoot the Fusion logs, but couldnt figure them out. I ran out of time to fix it properly, so that is why I just returned strings.