You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a django web app deployed as an Azure App Service. I have also been using the azure-storage SDK for python to upload and download images from Azure Blob Storage. When I run it locally, the app runs fine and I can successfully push and pull images. However, when I deploy the app, I get this error:
2017-02-26T22:15:16
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](RESTCommand1 cmd, IRetryPolicy policy, OperationContext operationContext) --- End of inner exception stack trace --- at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand1 cmd, IRetryPolicy policy, OperationContext operationContext)
at Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob.DownloadBlockList(BlockListingFilter blockListingFilter, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
at Microsoft.WindowsAzure.WebSites.Diagnostics.AzureBlobTraceListener.AppendStreamToBlob(Stream stream)
at Microsoft.WindowsAzure.WebSites.Diagnostics.AzureBlobTraceListener.ConsumeBuffer()
Request Information
RequestID:25101a94-0001-00f5-3a7d-90b249000000
RequestDate:Sun, 26 Feb 2017 22:15:16 GMT
StatusMessage:Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
ErrorCode:AuthenticationFailed
I've pinpointed it to import statements. If I just include from azure.storage.blob import BlockBlobService, I get this error. I don't create a BlockBlobService or call anything else yet.
I have tried adding an account SAS from my Azure Storage account and setting it as a DIAGNOSTICS_AZUREBLOBCONTAINERSASURL setting, but that doesn't work either.
I'm not sure what's causing this error?
The text was updated successfully, but these errors were encountered:
Hi @cqw1 ,
What version of the Python Storage SDK are you using?
I've pinpointed it to import statements. If I just include from azure.storage.blob import BlockBlobService, I get this error. I don't create a BlockBlobService or call anything else yet.
Can you check if this occurs when importing any of the other Blob types?
Few thoughts -- there is a known issue with deployment on Azure WebApps introduced in version 0.33.0 and onwards due to the cryptography dependency and outdated pip on WebApps. See #219.
For quick confirmation, use version 0.32.0 of the library in your requirements.txt and deploy/see if this problem still persists. You'll want to log into your WebApps kudu console to make sure that version 0.32.0 is in fact installed and being used. If that is the case, see the issue reference above for resolution.
I have the latest version deployed and working fine right now, but I did have a similar issue which I was able to fix with the above steps. Let me know if that helps.
I have a django web app deployed as an Azure App Service. I have also been using the azure-storage SDK for python to upload and download images from Azure Blob Storage. When I run it locally, the app runs fine and I can successfully push and pull images. However, when I deploy the app, I get this error:
2017-02-26T22:15:16
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.Storage.Blob.CloudBlockBlob.DownloadBlockList(BlockListingFilter blockListingFilter, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
at Microsoft.WindowsAzure.WebSites.Diagnostics.AzureBlobTraceListener.AppendStreamToBlob(Stream stream)
at Microsoft.WindowsAzure.WebSites.Diagnostics.AzureBlobTraceListener.ConsumeBuffer()
Request Information
RequestID:25101a94-0001-00f5-3a7d-90b249000000
RequestDate:Sun, 26 Feb 2017 22:15:16 GMT
StatusMessage:Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
ErrorCode:AuthenticationFailed
I've pinpointed it to import statements. If I just include from azure.storage.blob import BlockBlobService, I get this error. I don't create a BlockBlobService or call anything else yet.
I have tried adding an account SAS from my Azure Storage account and setting it as a DIAGNOSTICS_AZUREBLOBCONTAINERSASURL setting, but that doesn't work either.
I'm not sure what's causing this error?
The text was updated successfully, but these errors were encountered: