I want to access data from azure table storage ,but i couldn't access using Net core .But it's possible using .Net Framework.
Below code was written in .Net Framework
var sharedKey = Convert.FromBase64String("AccountKey");
var request = WebRequest.Create("http://accountname.table.core.windows.net/tablename");
request.ContentLength = 0;
request.Headers.Add("x-ms-date", DateTime.UtcNow.ToString("R", CultureInfo.InvariantCulture));
var resource = request.RequestUri.PathAndQuery;
if (resource.Contains("?"))
{
resource = resource.Substring(0, resource.IndexOf("?"));
}
string stringToSign = string.Format("{0}\n/{1}{2}",
request.Headers["x-ms-date"],
"accountname",
resource
);
var hasher = new HMACSHA256(sharedKey);
string signedSignature = Convert.ToBase64String(hasher.ComputeHash(Encoding.UTF8.GetBytes(stringToSign)));
string authorizationHeader = string.Format("{0} {1}:{2}", "SharedKeyLite", "accountname", signedSignature);
request.Headers.Add("Authorization", authorizationHeader);
var response = request.GetResponse();
return response;
