The method CloudBlobContainer.listBlobs() works when called the first time after installing the app, but will not work again and throw the following MAC signature invalid error.
The MAC signature found in the HTTP request 'xxxxxxxxxx' is not the same as any computed signature. Server used following string to sign: 'GET
The listBlobs() method will only work for the same container again after the app's cache is cleared.
I am using the following code to list blobs (Kotlin)
`
val storageAccount = CloudStorageAccount.parse(connectionString)
val blobClient = storageAccount.createCloudBlobClient()
val container = blobClient.getContainerReference(name)
val blobs = container.listBlobs()
val blobNames: ArrayList = ArrayList()
for (blob in blobs) {
blobNames.add((blob as CloudBlockBlob).name)
}
`
Looks like the old requests are being cached in the com.microsoft.identity.http-cache folder in the app's cache directory. I need to delete the folder every time I run listBlobs().
The method CloudBlobContainer.listBlobs() works when called the first time after installing the app, but will not work again and throw the following MAC signature invalid error.
The listBlobs() method will only work for the same container again after the app's cache is cleared.
I am using the following code to list blobs (Kotlin)
` val storageAccount = CloudStorageAccount.parse(connectionString) val blobClient = storageAccount.createCloudBlobClient() val container = blobClient.getContainerReference(name) val blobs = container.listBlobs()
val blobNames: ArrayList = ArrayList()
for (blob in blobs) {
blobNames.add((blob as CloudBlockBlob).name)
}
`