Question

I am using the Zendesk C# API Wrapper (https://github.com/eneifert/ZenDeskApi) in my ASP.NET MVC 3 Visual Studio 2012 project. I referenced the ZenDeskApi DLL and everything works fine in debug mode locally.

When I try to Publish the website I first get the following error:

Could not load file or assembly '...\Source\Bin\ZenDeskApi.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

Then I tried adding the RestSharp.DLL that comes with the package:

Could not load file or assembly '...\Source\Bin\RestSharp.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

Then I tried adding the Newtonsoft.Json.NET35.DLL that comes with the package:

Could not load file or assembly ...\Source\Bin\Newtonsoft.Json.Net35.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

Is it possible that the problem is the Newtonsoft.Json.NET35.DLL .NET 3.5 version? Incompatible with .NET 4 that MVC needs?

I downloaded the RestSharp source code (https://github.com/restsharp/RestSharp) to try to update the Newtonsoft.Json reference to .NET version 4.0 (available here http://json.codeplex.com/) but with my surprise RestSharp does not reference it.

What should I do to publish my website?

Thanks.

EDIT: in the meantime I discovered the v2 of this api here: https://github.com/eneifert/ZendeskApi_v2 but I always have problems with .NET version of the various DLLS. How can I find all the necessary stuff to work with .NET 4.0?

Was it helpful?

Solution

I solved installing Zendesk API v2 from NuGet (inside Visual Studio 2012) and using the following connection string:

 https://company.zendesk.com/api/v2

instead of

 http://company.zendesk.com
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top