I'm attempting to use this microsoft azure node.js SDK to work with blob storage and to simply upload a file.
When I run this same code on a windows 7 machine, the service is able to authenticate correctly and the image is uploaded. Both windows 8 machine and windows 7 machine are running node v.0.12.2 but the windows 8 machine generates the error around the request date header being too old. It seems like it's using my system time as GMT and the azure service is authenticating in my time zone or something??
Code:
var azure = require('azure-storage');
var blobService = azure.createBlobService(myStorageAccount, myAccessKey);
blobService.createContainerIfNotExists('testzies', {publicAccessLevel : 'blob'}, function(error, result, response){
});
blobService.createBlockBlobFromLocalFile('testzies', 'first', 'C:/temp/sample.jpg', function(error, result, response){
});
Error, only on the windows 8 machine:
{ [Error: Forbidden] } { [Error: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. code: 'AuthenticationFailed',
authenticationerrordetail: 'Request date header too old: \'Fri, 22 May 2015 02:56:35 GMT\'', statusCode: 403 }