0

I created an azure webjob through powershell with the following commands by following this link Create a Scheduled Azure WebJob with PowerShell

Webjob got successfully created in the mentioned webapp, but when I try to start the web job the following exception is thrown

System.AggregateException: One or more errors occurredMicrosoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (403) Forbidden. System.Net.WebException: The remote server returned an error: (403) Forbidden.

Microsoft.WindowsAzure.Storage.Shared.Protocol.HttpResponseParsers.ProcessExpectedStatusCodeNoException[T](HttpStatusCode expectedStatusCode, HttpStatusCode actualStatusCode, T retVal, StorageCommandBase`1 cmd, Exception ex)

I access a storage account inside the webjob, It runs fine when I deploy through visual studio problem occurs only when using Powershell cmdlets.

Community
  • 1
  • 1
Vignesh AJ
  • 166
  • 2
  • 11

1 Answers1

0

Storage account that web job accesses is in different subscription to that it is hosted hence the error 403, I changed the subscription of storage account to the same of web job and it works fine.

Vignesh AJ
  • 166
  • 2
  • 11