しばやん雑記

Azure とメイドさんが大好きなフリーランスのプログラマーのブログ

Azure Web サイトの .NET Framework が 4.5.2 にアップデートされていた話

Windows Azure Web サイトがいつの間にか .NET 4.5.1 に対応していた件と Helios 0.1.4-pre の話 - しばやん雑記 で Azure Web サイトのランタイムが .NET 4.5.1 にアップデートされたと書きましたが、今日も Web サイトのアップデートがあったのでレジストリを確認してみたところ .NET 4.5.2 にアップデートされていることがわかりました。

f:id:shiba-yan:20140716204550p:plain

OS は Windows Server 2012 のままなので、多少 Windows 8.1 Update にインストールしているバージョンとはビルド番号が異なったりしてます。

f:id:shiba-yan:20140716205452p:plain

.NET 4.5.2 はインプレースアップデートなので、当然ながら今までのアプリケーションに多少は影響を及ぼす可能性があります。例えば ASP.NET では API が追加されていたりします。

ASP.NET improvements

  • New HostingEnvironment.QueueBackgroundWorkItem method that lets you schedule small background work items. ASP.NET tracks these items and prevents IIS from abruptly terminating the worker process until all background work items have completed. These will enable ASP.NET applications to reliably schedule Async work items.
  • New HttpResponse.AddOnSendingHeaders and HttpResponseBase.AddOnSendingHeaders methods are more reliable and efficient than HttpApplication.PreSendRequestContent and HttpApplication.PreSendRequestHeaders. These APIs let you inspect and modify response headers and status codes as the HTTP response is being flushed to the client application. These reliability improvements minimize deadlocks and crashes between IIS and ASP.NET.
  • New HttpResponse.HeadersWritten and HttpResponseBase.HeadersWritten properties that return Boolean values to indicate whether the response headers have been written. You can use these properties to make sure that calls to APIs such as HttpResponse.StatusCode succeeds. This enables shared hosting scenarios for ASP.NET applications.
Announcing the .NET Framework 4.5.2 - .NET Blog - Site Home - MSDN Blogs

HostingEnvironment.QueueBackgroundWorkItem とかは中々面白いと思いますが、本当に使えるのかはまだ確認していないので時間があるときにテストしてみたいと思います。

.NET 4.5.2 での改善に関しては MSDN の方も参照してもらえれば良いかと。

What's New in the .NET Framework 4.5, 4.5.1, and 4.5.2

そして、ASP.NET 使いというか Web Forms 使いにとっては EnableViewStateMac が強制的に有効になったのが、多少インパクトはあるのかと思いました。

ASP.NET 4.5.2 and EnableViewStateMac - .NET Web Development and Tools Blog - Site Home - MSDN Blogs

セキュリティ的には EnableViewStateMac を無効にする必要は全くないので、この判断は特に問題ないと思ってますし、既存のアプリケーションを壊すなんてこともありえないかなと。

おまけ

.NET 4.5.2 と恐らく同タイミングで Node.js も最新の 0.10.29 がインストールされるようになりました。

f:id:shiba-yan:20140716210124p:plain

アプリケーションで使う Node.js バージョンを切り替える方法は Microsoft Azure Web サイトの Node.js バージョンを切り替える方法 - しばやん雑記 を参照してください。