We have created a new process to upload files to our Azure blob. When running the app locally, the files upload fine and without error. When we run the same process on our server, we get the error message:
MESSAGE: Forbidden: header 'Content-Type' value denied SOURCE: Microsoft.WindowsAzure.StorageClient TARGETSITE: T get_Result() STACKTRACE: at Microsoft.WindowsAzure.StorageClient.Tasks.Task
1.get_Result() at Microsoft.WindowsAzure.StorageClient.Tasks.Task
1.ExecuteAndWait() at Microsoft.WindowsAzure.StorageClient.TaskImplHelper.ExecuteImpl(Func`1 impl) at Microsoft.WindowsAzure.StorageClient.CloudBlob.UploadFromStream(Stream source, BlobRequestOptions options) at Microsoft.WindowsAzure.StorageClient.CloudBlob.UploadFromStream(Stream source)Inner Exception:
MESSAGE: The remote server returned an error: (403) Forbidden.
SOURCE: System
TARGETSITE: System.Net.WebResponse EndGetResponse(System.IAsyncResult)
STACKTRACE: at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.WindowsAzure.StorageClient.EventHelper.ProcessWebResponse(WebRequest req, IAsyncResult asyncResult, EventHandler`1 handler, Object sender)
What is odd is that the file uploads still to Azure. Has anyone experienced this? We don't set a content type when we upload the file, as we set it when the file is downloaded. We tried hardcoding one in, and it still produced the same error.