简体   繁体   中英

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. I also notice that the documented members of ServiceProperties do not include 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? Or do I have to use the REST API ?

Storage Client Library (version 2.x) which comes with SDK 2.1 does not have support for CORS. It is supported in Storage Client Library version 3.x. So if you want to manage CORS settings, you would need to use that library. You can download this library through Nuget: http://www.nuget.org/packages/WindowsAzure.Storage . You could always use REST API if you want to.

However, please keep in mind that SDK 2.1 is not compatible with version 3.x of storage client library . 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 . 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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