Sitecore on Azure web apps – Trouble Shooting error – AppGallery Deploy Failed – System.ArgumentException: Missing mandatory parameters for valid Shared Access Signature

We were trying to deploy Sitecore XP1 environment on Azure Web App. To deploy Siecore on azure web apps we need to provide Web Deploy Packages as input to Azure. as per this link {}, sitecore recommend deploy the Web Deploy Packages to Azure Storage Account in Blob Container. To allow access for downloading these packages, we have created Shared Access Signatures and added the SAS Token correctly to the Blob Service in my parameter.json file. While deploying the Sitecore XP1 instance we go the below error.

Error Message: AppGallery Deploy Failed: ‘System.ArgumentException: Missing mandatory parameters for valid Shared Access Signature

Details:

{ “status”: “failed”, “error”: { “code”: “ResourceDeploymentFailure”, “message”: “The resource operation completed with terminal provisioning state ‘failed’.”, “details”: [ { “code”: “Failed”, “message”: “AppGallery Deploy Failed: ‘System.ArgumentException: Missing mandatory parameters for valid Shared Access Signature\r\n at Microsoft.WindowsAzure.Storage.Core.Util.NavigationHelper.ParseBlobQueryAndVerify(Uri address, StorageCredentials& parsedCredentials, Nullable`1& parsedSnapshot)\r\n at Microsoft.WindowsAzure.Storage.Core.Util.NavigationHelper.ParseBlobQueryAndVerify(StorageUri address, StorageCredentials& parsedCredentials, Nullable`1& parsedSnapshot)\r\n at Microsoft.WindowsAzure.Storage.Blob.CloudBlob.ParseQueryAndVerify(StorageUri address, StorageCredentials credentials)\r\n at Microsoft.WindowsAzure.Storage.Blob.CloudBlob..ctor(StorageUri blobAbsoluteUri, Nullable`1 snapshotTime, StorageCredentials credentials)\r\n at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.IsPremiumApp()\r\n at Microsoft.Web.Deployment.WebApi.DeploymentController.CheckCanDeployIfAppIsPremium(AppGalleryPackageInfo packageInfo, Boolean& isPremium)’\r\nFailed to download package.\r\nAppGallery Deploy Failed: ‘System.Net.WebException: The remote server returned an error: (403) Forbidden.\r\n at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)\r\n at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.<Download>d__a.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.<Download>d__0.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadPackageAndSettings>d__1b.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadAndDeployPackage>d__d.MoveNext()'” } ] } }
From error message, you can understand that Server couldn’t authorize the request and so it returned 403 forbidden error and the Web Deploy Packages couldn’t be downloaded.

There are couple of solutions you can try -

1. When you generate the Shared Access Signature, you should be careful with the Start Time and TimeZone.
By default, it takes, UTC. You should be setting your local Timezone.
Please make sure you set start time less then the current time. Hopefully this will resolve this issue but if you are still facing the same issue then you can try an alternative approch mentioned in second post

2. Instead of using storage account on azure you can deploy you SCWDP (Sitecore web deply package) to some server in your network and pass URL of this file as parameter in ARM parameter file. URL of SCWDP.zip file must accessable to your azure account. It should resolve the above issue

Redis Cache – Sitecore

Redis Cache – Sitecore

What is Redis cache? Redis is an open source, in-memory data structure store, used as a database, cache and message broker. It supports data structures like strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperlogs and geospatial indexes with radius queries.

Sitecore Azure Redis Cache is:

  • Fully-managed
  • High throughput
  • Low-latency
  • High performance
  • Secure

Azure’s Redis Cache is based on the popular open-source Redis cache and it gives you access to a secure, dedicated Redis cache that can be accessed and managed within Azure.

Azure Redis Cache in 3 Tiers

Azure Redis Cache is available in 3 tiers: Basic, Standard and Premium!

azure-Redis-Cache-1

Features of Sitecore Azure Redis Cache

Some of the beneficial features of Azure Redis Cache – Sitecore are as follows:

1. Azure Redis Cache offers high performance, helping your application to become more responsive even when user load increases. It also offers consistent low-latency data access to power fast, scalable Sitecore Azure applications.

azure-Redis-Cache-2

2. Redis is an advanced key-value store. Keys can contain data structures like strings, hashes, lists, sets and sorted sets.

3. Redis behaves like a cache with features like transactions, publish/subscribe, Lua scripting and other configuration settings.

azure-Redis-Cache-3

4. Another good thing about Redis is that you can use it from most of the programming languages used today.

5. It is pretty easy to use and manage. You can easily monitor the health and performance of your cache through the preview portal.

6. Creating your first Redis cache is easy and can be done within a few seconds. Even managing one is easier. See through an example below using the Microsoft Azure portal:

azure-Redis-Cache-4

azure-Redis-Cache-5

azure-Redis-Cache-6