Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (403) Forbidden. ---> System.Net.WebException: The remote server returned an error: (403) Forbidden.

shahid 0 Reputation points
2023-03-27T07:50:02.5066667+00:00

Hi I am trying to access my nodejs bot but I am unable to access the bot while checking the nodejs app service logs in azure it is showing the below error:

2023-03-27T07:25:35
Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (403) Forbidden. ---> System.Net.WebException: The remote server returned an error: (403) Forbidden.
   at System.Net.HttpWebRequest.GetResponse()
   at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext)
   --- End of inner exception stack trace ---
   at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext)
   at Microsoft.WindowsAzure.WebSites.Diagnostics.AzureBlobTraceListener.AppendStreamToBlob(Stream stream)
   at Microsoft.WindowsAzure.WebSites.Diagnostics.AzureBlobTraceListener.ConsumeBuffer()
Request Information
RequestID:3538ac64-c01e-0072-627d-60690e000000
RequestDate:Mon, 27 Mar 2023 07:25:34 GMT
StatusMessage:Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
ErrorCode:AuthenticationFailed

I have already gone through the previous issues that are posted here but they are unable to resolve my issue.

I generated new SAS(log container) url but my issue still there and for my storage account firewall is enabled as "Enabled from all networks"

Note: while I am running the SAS url in my browser it is showing like below:

<Error>   <Code>AuthenticationFailed</Code>   <Message>  Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:106b274b-e01e-0002-5d85-605609000000 Time:2023-03-27T08:20:52.7288435Z  </Message>   <AuthenticationErrorDetail>  Signature did not match. String to sign used was rwdl 2022-09-24T11:35:23Z 2222-09-24T11:35:23Z /blob/resourcesambot/$root 2021-06-08 c </AuthenticationErrorDetail>   </Error> 
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,199 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rajeesh M R 226 Reputation points
    2023-03-29T18:33:49.0366667+00:00

    @shahid

    Step 1: Click on your item in your blob container.

    User's image

    Step 2: Scroll down on the same page under "Generate SAS" tab and click on "Generate SAS token and URL" then copy "Blob SAS URL" and paste in your browese it should work.

    User's image

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.