代码之家  ›  专栏  ›  技术社区  ›  abenci

Zendesk.NET API和ASP.NET MVC 3

  •  0
  • abenci  · 技术社区  · 13 年前

    我正在使用Zendesk C#API包装器( https://github.com/eneifert/ZenDeskApi )在我的ASP.NET MVC 3 Visual Studio 2012项目中。我引用了ZenDeskApi DLL,在本地调试模式下一切都很好。

    当我尝试 出版 网站我首先得到以下错误:

    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 但我总是对.NET版本的各种DLL有问题。如何找到使用.NET 4.0所需的所有内容?

    1 回复  |  直到 13 年前
        1
  •  0
  •   abenci    13 年前

    我解决了从NuGet(在Visual Studio 2012中)安装Zendesk API v2并使用以下连接字符串的问题:

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

    而不是

     http://company.zendesk.com