Cannot access cloudinary from local IIS
AnsweredMy website is developed with Microsoft .NET MVC. I use the Clouninary NuGet library.
If I use Visual Studio Development Server my code works and I can upload new image.
But if I deploy to a local IIS server it does not work. It seems local IIS cannot access Cloudinary. My page is able to display the image from from Cloudinary. I have no firewall on my computer.
My code:
var settings = ConfigurationManager.AppSettings;
var configuration = new AccountConfiguration(settings["Cloudinary.CloudName"],
settings["Cloudinary.ApiKey"],
settings["Cloudinary.ApiSecret"]);
var uploader = new Uploader(configuration);
string publicId = Path.GetFileNameWithoutExtension(filename);
var destroyResult = uploader.Destroy(publicId); <-- This fails with the message:
[IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.]
-
Found the problem: The culprit is the proxy in my company.
I don't understand why this does not affect the get image from cloudinary (maybe I did notice they were displayed from local cache ?).
I also don't understand why Visual Studio Development Server is not affected by proxy.
Anyway, I know how to fix my problem.
0
Post is closed for comments.
Comments
1 comment