aliyun / aliyun-openapi-net-sdk Goto Github PK
View Code? Open in Web Editor NEWAlibaba Cloud SDK for .NET
Home Page: https://www.nuget.org/profiles/aliyun-openapi-sdk
License: Other
Alibaba Cloud SDK for .NET
Home Page: https://www.nuget.org/profiles/aliyun-openapi-sdk
License: Other
vod 中的 GetVideoPlayInfoRequest 参数 ClientTS表示什么?
例如Transform/V20140526/下的
DescribeTagKeysResponseUnmarshaller.cs
AllocatePublicIpAddressResponseUnmarshaller.cs
等多个虽然有大小但内容均为二进制0的文件
clone的代码最后一个commit:f4335d05ba0272f60e08300257188977f3148484
请告知短信服务API的使用方法,谢谢!
.Net Framework 4.5的版本要求太高了。
为什么不提供dyplsapi?
未能加载文件或程序集“System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
AcsResponse里已经有RequestId了,子类又来一个RequestId,隐式隐藏了父类的RequestId。
当有如下泛型方法时:
private T Request<T>(AcsRequest<T> request) where T : AcsResponse
{
var requestInfo = new APIRequestInfo();
try
{
var result = m_IMMClient.GetAcsResponse(request);
requestInfo.RequestId = result.RequestId;
return result;
}
catch (Exception ex)
{ ... }
}
其中取RequestId的值,就不会取到子类的值,而是父类的RequestId,实际为null。
我就被这个给坑了啊。。。
运行环境 :
.NET Core
2.1
aliyun.acs.core.netcore1.1.4.1
通过 nuget 安装
Aliyun.Acs.Dysmsapi
发送短信的时候,会出现异常异常详细信息
System.Xml.XmlReader.CalcBufferSize(Stream input)
System.Xml.XmlTextReaderImpl.InitStreamInput(Uri baseUri, string baseUriStr, Stream stream, byte[] bytes, int byteCount, Encoding encoding)
System.Xml.XmlTextReaderImpl..ctor(string url, Stream input, XmlNameTable nt)
System.Xml.XmlDocument.Load(Stream inStream)
Aliyun.Acs.Core.Regions.InternalEndpointsParser.LoadEndpointDocument()
Aliyun.Acs.Core.Regions.InternalEndpointsParser.GetEndpoints()
Aliyun.Acs.Core.Profile.DefaultProfile.GetEndPointsFromLocal()
Aliyun.Acs.Core.Profile.DefaultProfile.GetEndpoints(string regionId, string product, Credential credential, string locationProduct)
Aliyun.Acs.Core.DefaultAcsClient.DoAction<T>(AcsRequest<T> request, bool autoRetry, int maxRetryNumber, IClientProfile profile)
Aliyun.Acs.Core.DefaultAcsClient.DoAction<T>(AcsRequest<T> request)
Aliyun.Acs.Core.DefaultAcsClient.GetAcsResponse<T>(AcsRequest<T> request)
经过简单的debug后发现
在InternalEndpointsParser
这个类中,获取xml文件的方法
Assembly.GetExecutingAssembly().GetManifestResourceStream(name)
取到的值为空,下面是调试窗口输出的信息
Assembly.GetExecutingAssembly().GetManifestResourceStream("Aliyun.Acs.Core.Regions.endpoints.xml")
null
似乎是 xml的路径的问题,使用 下面这个方法
this.GetType().GetTypeInfo().Assembly.GetManifestResourceNames()
{string[1]}
[0]: "Aliyun.Acs.Core.NetCore.Regions.endpoints.xml"
返回的Aliyun.Acs.Core.NetCore.Regions.endpoints.xml
能够获取到xml的信息,而程序获取的路径Aliyun.Acs.Core.Regions.endpoints.xml
取不到
aliyun-net-sdk-core 1.1.12,
aliyun-net-sdk-vod是2.11.7时正常,升级到2.11.8后请求playauth就出这个错误了
Hello Team,
I am getting "The resource is out of usage" everytime I call CreateInstanceRequest interface. I have tried with different regions, zone instancetype combinations. But getting same response from server.
Could you please guide me the correct way for calling CreateInstanceRequest interface?
当服务端返回错误时,Exception中不包含RequestId,不便于问题诊断。
按照规范, Content-MD5
的计算结果应该用的是 Base64 编码,而 Md5Sum
返回的是 Hex 编码的。(PS:看了下其他的 sdk 用的是 Base64)
使用aliyun-net-sdk-core获取语音识别token失败,代码如下:
`public static string GetToken()
{
IClientProfile profile = DefaultProfile.GetProfile(region_id, ak_id, ak_secret);
DefaultAcsClient client = new DefaultAcsClient(profile);
CommonRequest request = new CommonRequest();
request.Domain = "nls-meta.cn-shanghai.aliyuncs.com";
request.Version = "2018-05-18";
request.UriPattern = "/pop/2018-05-18/tokens";
request.Method = Aliyun.Acs.Core.Http.MethodType.POST;
CommonResponse response = client.GetCommonResponse(request);
String result = response.Data;
return result;
}`
http返回状态200,返回数据:{} (空的json)
同样的参数通过python sdk返回正常数据
.NET SDK中不包含ram?
改用Demo的示例,替换Ak和appkey后同样问题
MNS的为啥不在这里头?而且也没有.Net Core 的。 好烦躁啊。
这块有没有计划提供.net framework版本的sdk啊
代码
static void Main(string[] args)
{
var profile = DefaultProfile.GetProfile("cn-hangzhou", "************", "************");
var client = new DefaultAcsClient(profile);
var request = new GetWhoisInfoRequest();
request.DomainName = "aliyun.com";
try
{
var response = client.GetAcsResponse<GetWhoisInfoResponse>(request);
Console.WriteLine(response.DomainName);
}
catch(ServerException ex)
{
Console.WriteLine("ServerException");
Console.WriteLine(ex.ErrorCode);
Console.WriteLine(ex.Message);
}
catch (ClientException ex)
{
Console.WriteLine("ClientException");
Console.WriteLine(ex.ErrorCode);
Console.WriteLine(ex.Message);
}
//catch (Exception ex)
//{
// Console.WriteLine(ex.Message);
//}
Console.Read();
}
出错信息
未经处理的异常: System.Xml.XPath.XPathException: 表达式的计算结果必须为节点集。
在 MS.Internal.Xml.XPath.XPathParser.ParseNodeTest(AstNode qyInput, AxisType axisType, XPathNodeType nodeType)
在 MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNode qyInput)
在 MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput)
在 MS.Internal.Xml.XPath.XPathParser.ParseLocationPath(AstNode qyInput)
在 MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput)
在 MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput)
在 MS.Internal.Xml.XPath.XPathParser.ParseUnaryExpr(AstNode qyInput)
在 MS.Internal.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode qyInput)
在 MS.Internal.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode qyInput)
在 MS.Internal.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput)
在 MS.Internal.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput)
在 MS.Internal.Xml.XPath.XPathParser.ParseAndExpr(AstNode qyInput)
在 MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput)
在 MS.Internal.Xml.XPath.XPathParser.ParseExpresion(AstNode qyInput)
在 MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(String xpathExpresion)
在 System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver)
在 System.Xml.XPath.XPathNavigator.Select(String xpath)
在 System.Xml.XmlNode.SelectNodes(String xpath)
在 Aliyun.Acs.Core.Reader.XmlReader.Read(XmlNode element, String path, Boolean appendPath)
在 Aliyun.Acs.Core.Reader.XmlReader.Read(XmlNode element, String path, Boolean appendPath)
在 Aliyun.Acs.Core.Reader.XmlReader.Read(String xml, String endpoint)
在 Aliyun.Acs.Core.DefaultAcsClient.ReadResponse[T](AcsRequest`1 request, HttpResponse httpResponse, Nullable`1 for
在 Aliyun.Acs.Core.DefaultAcsClient.ParseAcsResponse[T](AcsRequest`1 request, HttpResponse httpResponse)
在 Aliyun.Acs.Core.DefaultAcsClient.GetAcsResponse[T](AcsRequest`1 request)
System.Collections.Generic.Dictionary`2[[System.__Canon, mscorlib],[System.DateTime, mscorlib]].FindEntry(System.__Canon)
Aliyun.Acs.Core.Utils.CacheTimeHelper.AddLastClearTimePerProduct
相比java的少了很多api啊,alidns的api更新在哪里呢?
我从帮助页下载的C#的sdk,在获取domainrecordinfo时,value一直是空,这个bug能修正吗
cdn sdk内缺失IsGreyUserRequest.cs/IsGreyUserResponse.cs/IsGreyUserResponseUnmarshaller.cs
如题。
真不敢相信那么多代码一个字的注释都没有
https://github.com/yaosansi/aliyun-openapi-sdk-lite
如题,如官方测试通过,可以放在文档中供有需要的朋友使用。
https://help.aliyun.com/document_detail/57114.html 在这个文档示例里面,JAVA版本使用STS授权去获取上传凭证时,有request.setSecurityToken(token); 方法,但是.NET版本的没有。那么.NET获取上传凭证 怎么去使用STS授权呢?
Package 'aliyun-net-sdk-core 1.1.9' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
Package 'aliyun-net-sdk-core 1.1.9' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
.net standard下无法使用
无法解析一下路径:
using Aliyun.Acs.Esc.Model.V20140526;
the type or namespace name 'Ecs' does not exist in the namespace 'Aliyun.Acs'
aliyun-net-sdk-core里的DefaultAcsClient在断网的请求连接时候会卡死在GetAcsResponse这里。
BatchGetDeviceStateResponse response = client.GetAcsResponse(request);
之前从git拉取的代码有这个目录,最近更新发现没了,整个git历史记录里也没有了,你们用 force 强行删了代码么?
Your project is not referencing the ".NETFramework,Version=v4.0" framework. Add a reference to ".NETFramework,Version=v4.0" in the "frameworks" section of your project.json, and then re-run NuGet restore. aliyun-net-sdk-core.vs2010
package文件没有
现在生产环境是centos,希望出支持.net core的版本
iot里的ProductKey为什么是long?不应该是string吗,怎么转换
why downgrade aliyun-net-sdk-cdn
from
2017-08-30 Version: 2.6.0
to
2017-11-01 Version: 2.5.1
最新代码中的 endpoints.xml 导致 iot 调用服务时发生SDK.InvalidRegionId 错误。
回退到 1.1.8 版后,问题解决。
原因是 endpoints.xml 中对 iot 服务地址的定义没有了,regional_endpoint_pattern 也没有发挥作用:
<product>
<code>iot</code>
<location_service_code>iot</location_service_code>
<document_id>30557</document_id>
<regional_endpoints></regional_endpoints>
<global_endpoint/>
<regional_endpoint_pattern>iot.[RegionId].aliyuncs.com</regional_endpoint_pattern>
</product>
建议支持dotnet core从而可以跨平台使用。
1>------ 已启动全部重新生成: 项目: aliyun-net-sdk-ecs, 配置: Debug Any CPU ------
1>D:\GIT\aliyun-openapi-net-sdk\aliyun-net-sdk-ecs\Ecs\Model\V20140526\ModifyAutoSnapshotPolicyExRequest.cs(91,17,91,37): error CS0102: The type 'ModifyAutoSnapshotPolicyExRequest' already contains a definition for 'autoSnapshotPolicyId'
1>D:\GIT\aliyun-openapi-net-sdk\aliyun-net-sdk-ecs\Ecs\Model\V20140526\ModifyAutoSnapshotPolicyExRequest.cs(104,17,104,39): error CS0102: The type 'ModifyAutoSnapshotPolicyExRequest' already contains a definition for 'autoSnapshotPolicyName'
1>D:\GIT\aliyun-openapi-net-sdk\aliyun-net-sdk-ecs\Ecs\Model\V20140526\ModifyAutoSnapshotPolicyExRequest.cs(117,17,117,27): error CS0102: The type 'ModifyAutoSnapshotPolicyExRequest' already contains a definition for 'timePoints'
1>D:\GIT\aliyun-openapi-net-sdk\aliyun-net-sdk-ecs\Ecs\Model\V20140526\ModifyAutoSnapshotPolicyExRequest.cs(130,17,130,31): error CS0102: The type 'ModifyAutoSnapshotPolicyExRequest' already contains a definition for 'repeatWeekdays'
1>D:\GIT\aliyun-openapi-net-sdk\aliyun-net-sdk-ecs\Ecs\Model\V20140526\ModifyAutoSnapshotPolicyExRequest.cs(143,15,143,28): error CS0102: The type 'ModifyAutoSnapshotPolicyExRequest' already contains a definition for 'retentionDays'
1>D:\GIT\aliyun-openapi-net-sdk\aliyun-net-sdk-ecs\Ecs\Model\V20140526\ApplyAutoSnapshotPolicyRequest.cs(85,17,85,37): error CS0102: The type 'ApplyAutoSnapshotPolicyRequest' already contains a definition for 'autoSnapshotPolicyId'
1>D:\GIT\aliyun-openapi-net-sdk\aliyun-net-sdk-ecs\Ecs\Model\V20140526\ApplyAutoSnapshotPolicyRequest.cs(98,17,98,24): error CS0102: The type 'ApplyAutoSnapshotPolicyRequest' already contains a definition for 'diskIds'
1>D:\GIT\aliyun-openapi-net-sdk\aliyun-net-sdk-ecs\Ecs\Model\V20140526\CreatePhysicalConnectionRequest.cs(107,15,107,24): error CS0102: The type 'CreatePhysicalConnectionRequest' already contains a definition for 'bandwidth'
1>D:\GIT\aliyun-openapi-net-sdk\aliyun-net-sdk-ecs\Ecs\Model\V20140526\CreateAutoSnapshotPolicyRequest.cs(89,17,89,39): error CS0102: The type 'CreateAutoSnapshotPolicyRequest' already contains a definition for 'autoSnapshotPolicyName'
1>D:\GIT\aliyun-openapi-net-sdk\aliyun-net-sdk-ecs\Ecs\Model\V20140526\CreateAutoSnapshotPolicyRequest.cs(102,17,102,27): error CS0102: The type 'CreateAutoSnapshotPolicyRequest' already contains a definition for 'timePoints'
1>D:\GIT\aliyun-openapi-net-sdk\aliyun-net-sdk-ecs\Ecs\Model\V20140526\CreateAutoSnapshotPolicyRequest.cs(115,17,115,31): error CS0102: The type 'CreateAutoSnapshotPolicyRequest' already contains a definition for 'repeatWeekdays'
1>D:\GIT\aliyun-openapi-net-sdk\aliyun-net-sdk-ecs\Ecs\Model\V20140526\CreateAutoSnapshotPolicyRequest.cs(128,15,128,28): error CS0102: The type 'CreateAutoSnapshotPolicyRequest' already contains a definition for 'retentionDays'
1>D:\GIT\aliyun-openapi-net-sdk\aliyun-net-sdk-ecs\Ecs\Model\V20140526\ModifyPhysicalConnectionAttributeRequest.cs(92,15,92,24): error CS0102: The type 'ModifyPhysicalConnectionAttributeRequest' already contains a definition for 'bandwidth'
1>D:\GIT\aliyun-openapi-net-sdk\aliyun-net-sdk-ecs\Ecs\Model\V20140526\CancelAutoSnapshotPolicyRequest.cs(83,17,83,24): error CS0102: The type 'CancelAutoSnapshotPolicyRequest' already contains a definition for 'diskIds'
1>D:\GIT\aliyun-openapi-net-sdk\aliyun-net-sdk-ecs\Ecs\Model\V20140526\DeleteAutoSnapshotPolicyRequest.cs(83,17,83,37): error CS0102: The type 'DeleteAutoSnapshotPolicyRequest' already contains a definition for 'autoSnapshotPolicyId'
========== 全部重新生成: 成功 0 个,失败 1 个,跳过 0 个 ==========
先编译 aliyun-net-sdk-core 然后引入到 aliyun-net-sdk-ecs 中进行编译,输出以上错误,C#方面是菜鸟,请求指导。
vs2015
FYI
在VS NuGet中能找到其他官方发布的依赖库,但是为什么没有 aliyun-net-sdk-alidns?
如题。
这个SDK文档少的可怜,demo更是没有,是我打开的方式不对吗?
FormatType? requestFormatType = request.AcceptFormat;
if (null != requestFormatType)
{
format = requestFormatType;
}
if (null == format)
{
format = request.AcceptFormat;
}
I see that this method has Nullable type parameter format
.
I thought you were going to judge if the parameter format
was empty, otherwise the code if (null != requestFormatType)
would be meaningless. Because it's always true
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.