Code Monkey home page Code Monkey logo

aliyun-netcore's Introduction

工程说明

阿里云官方sdk没有提供.net core版本的库

这里根据官方的修改移植了.net core版本

官方版本地址:

https://github.com/aliyun/aliyun-openapi-net-sdk

https://github.com/aliyun/aliyun-oss-csharp-sdk?spm=a2c4g.11186623.2.8.402917a5Y5wgEb

主要修改点

  • 修改点 Aliyun.Acs.Core.Regions.InternalEndpointsParser

这个类下面的 LoadEndpointDocument函数 assembly.GetManifestResourceStream(resourceName); 会加载不出来数据流 建议直接修改为

string resourceName = AppDomain.CurrentDomain.BaseDirectory + "Regions\\" + BUNDLED_ENDPOINTS_RESOURCE_PATH;
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(resourceName);

方式方式XmlDocument

  • 修改点 ShaHmac1 加密算法
            var keyBytes = Encoding.UTF8.GetBytes(accessSecret);
            var data = Encoding.UTF8.GetBytes(source);
            var hmac = new HMACSHA1(keyBytes);
            byte[] bytes = hmac.ComputeHash(data);
            return Convert.ToBase64String(bytes);
  • 修改点 Aliyun.Acs.Core.Http.HttpResponse

注释掉

//httpWebRequest.ServicePoint.Expect100Continue = false;

aliyun-netcore's People

Contributors

wangboy91 avatar

Stargazers

Jason avatar 于大明 avatar  avatar  avatar  avatar Nokecy avatar

Watchers

James Cloos avatar  avatar 于大明 avatar

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.