简体   繁体   English

Azure SDK 2.1的ServiceProperties.Cors在哪里?

[英]Where is ServiceProperties.Cors for Azure SDK 2.1?

I wanted to follow the guidance of “ Windows Azure Storage and CORS ” but I notice that my version of the Windows Azure SDK (2.1) does not have the members (like ServiceProperties .Cors ) used in the article. 我想遵循“ Windows Azure存储和CORS ”的指导,但我注意到我的Windows Azure SDK(2.1)版本没有文章中使用的成员(如ServiceProperties .Cors )。 I also notice that the documented members of ServiceProperties do not include Cors . 我还注意到ServiceProperties文档成员不包含Cors Was this stuffed removed from the codebase or is this stuff so new that it is not documented yet? 这个填充是从代码库中删除还是这么新的东西,它还没有记录? Is this CORS stuff in a future version of the SDK? 这是未来版本的SDK中的CORS内容吗? Or do I have to use the REST API ? 或者我必须使用REST API吗?

Storage Client Library (version 2.x) which comes with SDK 2.1 does not have support for CORS. SDK 2.1附带的Storage Client Library(版本2.x)不支持CORS。 It is supported in Storage Client Library version 3.x. Storage Client Library版本3.x支持它。 So if you want to manage CORS settings, you would need to use that library. 因此,如果要管理CORS设置,则需要使用该库。 You can download this library through Nuget: http://www.nuget.org/packages/WindowsAzure.Storage . 您可以通过Nuget下载此库: http://www.nuget.org/packages/WindowsAzure.Storage ://www.nuget.org/packages/WindowsAzure.Storage。 You could always use REST API if you want to. 如果您愿意,可以随时使用REST API。

However, please keep in mind that SDK 2.1 is not compatible with version 3.x of storage client library . 但请记住, SDK 2.1与存储客户端库的3.x版不兼容 What that means is that if you use 3.x version of storage client library in your project you won't be able to use storage emulator . 这意味着如果您在项目中使用3.x版本的存储客户端库, 则无法使用存储模拟器 You would always need to connect to cloud storage account for development. 您始终需要连接到云存储帐户进行开发。

Windows Azure Blobs, Tables and Queues now support CORS to enable users to access/manipulate resources from within the browser serving a web page in a different domain than the resource being accessed. Windows Azure Blob,表和队列现在支持CORS,使用户能够从浏览器内访问/操作资源,该浏览器服务于与正在访问的资源不同的域中的网页。

http://msdn.microsoft.com/en-us/library/windowsazure/dn535601.aspx http://msdn.microsoft.com/en-us/library/windowsazure/dn535601.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM