Endotron
Endotron

Reputation: 1

ImageResizer returns 400 bad request when deployed locally with azure emulator

I have our main cloud service application running locally at localhost:999 and I'm attempting to set up ImageResizer as a standalone service deployed as an empty website at localhost:32947.

When I make a request for an original image it serves it up without issue since it just redirects to my local blob but when I make an image resize request I get a 400 response.

I deployed this to Azure and everything works great, this is only an issue in my local environment. Posting this here is a last resort since I have searched and searched for the answer. I thought it might be an issue with setting CORS on the storage emulator but I managed to deploy another local site that was able read, write to the same blob container. As soon as I installed ImageResizer with the AzureReader2 plugin to that site it started throwing 400s also.

I'm running AzureReader2 and PdfiumRenderer:

<plugins>
        <add name="PdfiumRenderer" downloadNativeDependencies="true" />
        <add name="AzureReader2" connectionString="UseDevelopmentStorage=true" prefix="~/azure" />
</plugins>

My local Azure storage setup is as follows:

Here is my resizer.debug page ImageResizer Debug Output

Upvotes: 0

Views: 52

Answers (1)

Endotron
Endotron

Reputation: 1

Don't know how I didn't realize this earlier and thanks to Nathanael Jones for pointing it out. It's indeed a compatibility issue between the WindowsAzure.Storage (6.0.0) running on ImageResizer and the storage emulator (4.0) we're running locally. Appears we need to upgrade to at least 4.2 to make it work. Here is a discussion around the compatibility https://github.com/Azure/azure-storage-net/issues/183

Upvotes: 0

Related Questions