Azure WebJobs SDK exception: Forbidden when running application

327 Views Asked by At

I've got a .NET Core application that I need to run on a Mac (11.3.1) for development. The same app runs fine on Windows and apart from the OS, the only difference is that on Mac I have to use Azurite for the storage emulation (on Windows the emulation is done using Azure Storage emulator).

The libraries versions we're using:

  • Microsoft.Azure.WebJobs 3.0.27
  • Microsoft.Azure.WebJobs.Extensions 4.0.1
  • Microsoft.Azure.WebJobs.Extensions.Storage 4.0.4
  • Azurite (via VSCode Extension) 3.12.0

I have very little experience with the Azure tools and, from what I can tell, the required configuration for it to run is done correctly with the proper connection string set.

The problem I'm having is when I run the application via dotnet run I get the following error:

Unhandled exception.Unhandled exception.Unhandled exception.   Microsoft.Azure.Storage.StorageException: Forbidden
   at Microsoft.Azure.Storage.Core.Executor.Executor.ExecuteAsync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext, CancellationToken token)
   at Microsoft.Azure.WebJobs.Host.Queues.Listeners.QueueListener.ExecuteAsync(CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Extensions.Storage\Queues\Listeners\QueueListener.cs:line 193
   at Microsoft.Azure.WebJobs.Host.Timers.TaskSeriesTimer.RunAsync(CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Timers\TaskSeriesTimer.cs:line 147
   at Microsoft.Azure.WebJobs.Host.Timers.WebJobsExceptionHandler.<>c__DisplayClass3_0.<OnUnhandledExceptionAsync>b__0() in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Timers\WebJobsExceptionHandler.cs:line 55
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
Request Information
RequestID:
RequestDate:Wed, 12 May 2021 11:04:39 GMT
StatusMessage:Forbidden
ErrorCode:

When looking for a solution I've found this question here on SO, and although the error message is very similar, I wasn't able to solve the problem with the proposed solution.

Thanks.

0

There are 0 best solutions below