Giter Site home page Giter Site logo

cos-donet-sdk-v4's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cos-donet-sdk-v4's Issues

是否这个SDK不支持Net4.6框架编译?

我克隆代码,修改代码中的AppID,SECRET_ID,SECRET_KEY,bucketName为我账户里的内容,,COSAPI_CGI_URL改成"http://tj.file.myqcloud.com/files/v2/",其它未作任何修改
然后编译,运行,结果不断得到异常,不能连通服务器!

经过捕获内部异常为:
Message "远程服务器返回错误: (403) 已禁止。" string
堆栈:
在 System.Net.HttpWebRequest.GetResponse()
在 QCloud.CosApi.Common.Request.SendRequest(String url, Dictionary2& data, HttpMethod requestMethod, Dictionary2& header, Int32 timeOut, String localPath, Int64 offset, Int32 sliceSize)
位置 C:\Users\RoyLi\Source\Repos\cos-donet-sdk-v4\cos_dotnet_sdk\Common\Request.cs:行号 134

控制台输出:
{"code":-96,"message":"ERROR_PROXY_AUTH_EXPIRED","request_id":"NThkOWM3NDlfNmViMjM1XzczOGZfODAxM2I="}

整个过程唯一的可疑之处是我是用Net4.6.1框架编译的。难道这个SDK不支持Net4.6框架编译?求官方解答。

依赖的json库要求太高的.Net版本

依赖的json库Newtonsoft.Json要求.Net4.x,导致本sdk在某些场合不能直接使用,比如Unity。
可以考虑把COS的非核心功能进行接口抽象,比如抽象成IJsonILogIWeb

    public interface IJson
    {
        string SerializeObject(object value);
        JObject DeserializeObject(string str);
    }
    public interface ILog
    {
        void LogInfo(object s);
        void Log(object s);
        void LogWarning(object s);
        void LogError(object s);
    }
    public interface IWeb
    {
        string UrlEncode(string url);
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.