简体   繁体   English

更改Azure存储的版本

[英]Changing version of Azure Storage

I am a beginner in Azure and have come across a task to change the storage version.I basically found that the versions are obsolete and need to upgrade them as per http://blogs.msdn.com/b/windowsazurestorage/archive/2014/08/05/microsoft-azure-storage-service-version-removal.aspx 我是Azure的初学者,并且遇到了更改存储版本的任务。我基本上发现这些版本已经过时,需要根据http://blogs.msdn.com/b/windowsazurestorage/archive/2014进行升级。 /08/05/microsoft-azure-storage-service-version-removal.aspx

So, in one of the paragraphs its mentioned 因此,在其中提到的一段中

"What to change “要改变什么

If you find any log entries which show that version to be removed is being used, you will need to find that component and either validate that it will continue to work (unversioned requests may continue to work as their implicit version will simply increase – see above), or take appropriate steps to change the version being used. 如果您发现任何显示要删除的版本的日志条目正在使用,您将需要找到该组件并验证它将继续工作(未版本化的请求可能会继续工作,因为它们的隐式版本将会增加 - 参见上文),或采取适当的步骤来更改正在使用的版本。 Most commonly, one of the following two steps will be used: 最常见的是,将使用以下两个步骤之一:

1) Change the version specified in the request, typically by migrating to a later version of the libraries/tools. 1)更改请求中指定的版本,通常是迁移到更高版本的库/工具。 When possible, migrate to the latest version to get the most improvements and fixes. 如果可能,请迁移到最新版本以获得最大的改进和修复。

2) Set the default service version to one of the supported versions now so that the behavior can be verified prior to removal. 2)现在将默认服务版本设置为其中一个受支持的版本,以便在删除之前验证该行为。 This only applies to anonymous requests with no explicit version. 这仅适用于没有显式版本的匿名请求。 "

Question is, how to go about implementing point 1 and 2 ? 问题是,如何实施第1点和第2点?

Thanks 谢谢

Since your code is written in C# and uses Azure SDK your best bet is to upgrade it to a "new enough" SDK. 由于您的代码是用C#编写的并且使用Azure SDK,因此最好将其升级为“足够新”的SDK。 It's unclear whether version 2.0 or 2.1 is the lowest required . 目前还不清楚版本2.0或2.1是否是最低要求 So your route is the following: 所以你的路线如下:

First, check if you really have to do anything. 首先,检查你是否真的需要做任何事情。

  1. You check which Azure SDK your service uses. 您检查您的服务使用哪个Azure SDK。 If it's 2.1 or higher you don't need to worry yet. 如果它是2.1或更高,你不需要担心。 If your're unsure - use Fiddler to validate the version headers as explained in the linked to post. 如果您不确定 - 请使用Fiddler验证版本标题,如链接到帖子中所述。
  2. If you use Azure SDK 2.0 you'd better check the version headers as explained in the linked to post. 如果您使用Azure SDK 2.0,则最好检查版本标题,如链接到帖子中所述。
  3. If you use Azure SDK prior to 2.0 you are surely affected and have to upgrade. 如果您使用2.0之前的Azure SDK,则肯定会受到影响并且必须升级。

So if you found you do need to upgrade you'll have to download and install the newer SDK and then remove references to old SDK assemblies from your projects and add references to new SDK assemblies. 因此,如果您发现需要升级,则必须下载并安装较新的SDK,然后从项目中删除对旧SDK程序集的引用,并添加对新SDK程序集的引用。 Then you try to build your code and maybe fix a lot of calls because SDK interfaces have changed (that's what I see migrating from 1.8 to 2.4). 然后你尝试构建你的代码,并可能修复很多调用,因为SDK接口已经改变(这就是我所看到的从1.8迁移到2.4)。 Once it builds you test it works fine and then you remove the old SDK version to ensure the code builds without it present. 一旦它构建你测试它工作正常,然后你删除旧的SDK版本,以确保代码构建,而不存在它。

There was a breaking change between 2.1 and 2.2 - the latter only support Visual Studio 2012 and higher. 2.1和2.2之间有一个重大变化 - 后者仅支持Visual Studio 2012及更高版本。 There was another set of changes in Azure Diagnostics functioning between 2.4 and 2.5 which are so long to read that I chose to migrate to 2.4 instead of 2.5. Azure诊断功能在2.4和2.5之间有另一组更改,这些更改很长,我选择迁移到2.4而不是2.5。

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

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