2013-04-04 61 views
0

我在ASP.NET MVC 3 Visual Studio 2012項目中使用了Zendesk C#API包裝器(https://github.com/eneifert/ZenDeskApi)。我引用了ZenDeskApi DLL,並且在本地調試模式下一切正常。Zendesk .NET API和ASP.NET MVC 3

當我嘗試發佈網站我第一次收到以下錯誤:

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

然後我試圖將隨附包RestSharp.DLL:

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

然後我嘗試添加該軟件包附帶的Newtonsoft.Json.NET35.DLL:

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) 

問題是否可能是Newtonsoft.Json.NET35.DLL .NET 3.5版本?與MVC需要的.NET 4不兼容?

我下載了RestSharp源代碼(https://github.com/restsharp/RestSharp)來嘗試更新Newtonsoft.Json參考.NET版本4.0(可在這裏http://json.codeplex.com/),但我驚訝的是RestSharp不引用它。

我該如何發佈我的網站?

謝謝。

編輯:在此期間,我發現這個api的v2在這裏:https://github.com/eneifert/ZendeskApi_v2但我總是有各種DLLS的.NET版本的問題。我怎樣才能找到所有必要的東西來使用.NET 4.0?

回答

0

我解決安裝從的NuGet的Zendesk API V2(的Visual Studio 2012中),並使用下面的連接字符串:

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

,而不是

http://company.zendesk.com