zoukankan      html  css  js  c++  java
  • 腾讯社区开放平台.NET SDK在Mono下运行

    腾讯社区开放平台.NET SDK在CentOS下运行发生了如下错误:

    QzoneException: 
    QConnectSDK.Exceptions.QzoneException: Exception of type 'QConnectSDK.Exceptions.QzoneException' was thrown. at QConnectSDK.Api.RestApi.Execute (RestSharp.RestRequest request) [0x00000] in :0 at QConnectSDK.Api.RestApi.GetAccessToken (System.String oAuthVericode, System.String state) [0x00000] in :0 at QConnectSDK.Context.QzoneContext.GetAccessToken (System.String state) [0x00000] in :0 at QConnectSDK.QOpenClient..ctor (System.String verifierCode, System.String state) [0x00000] in :0 at ASP.qq_auth_auth_aspx.__RenderTree (System.Web.UI.HtmlTextWriter __output, System.Web.UI.Control parameterContainer) [0x00000] in :0

    开始怀疑是RestSharp这个库的兼容问题,后来在Mac上运行成功和Jexus的作者宇内的排查,终于在Linux上成功运行腾讯社区开放平台.NET SDK。

    查看了mono的文档知道,地址http://www.mono-project.com/FAQ:_Security,Linux本身在发行的时候是不带任何证书的,这和windows平台似乎恰恰相反。不过有工具,允许我们自行安装证书。

    安装根证书,这由 mozroots 来完成

        mozroots --import /               ##导入证书

                        --ask-remove  /       ##仅删除时确认

                        --machine               ##保存在全局环境

     image

    这个问题可以说是windows平台和linux平台的差异造成的。我们的开发和应用多跑在windows平台上,好处是这个平台为我们作了很多幕后工作,坏处是我们清楚她做了些什么,看来后面的移植过程中出现的问题,第一要考虑的就是时不时平台差异造成的。

    欢迎大家扫描下面二维码成为我的客户,为你服务和上云

  • 相关阅读:
    运算符重载
    简单函数template max
    const static extern
    python 关闭垃圾回收
    Easy and cheap cluster building on AWS backup
    [转] Maven更新父子模块的版本号, mvn versions:set
    [转] ansible批量执行命令展示
    HBase 批量删除表 disable_all drop_all
    自动添加 ssh key 到远程主机的脚本,应用sshpass和ssh-copy-id
    MongoDB ver 4 几个常用命令
  • 原文地址:https://www.cnblogs.com/shanyou/p/2340810.html
Copyright © 2011-2022 走看看