Access denied when accessing tables in the cloud

May 24, 2011 at 10:24 AM


I have an (almost) running app using the WAZtoolkitForWP7, which I deploy in the phone emulator to access cloud tables and blobs. Authentication (using Membership) is successful - I used the WP7CertInstaller project to install the appropriate certificate on the emulator before running my app.

After authentication, I initialize a TableServiceContext and a DataServiceCollection using the Resolve methods of the CloudClientFactory class, and make an async call to retrieve the items in one of the Azure tables. However I get an access denied error, which looks like a web page error  :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>401 - Unauthorized: Access is denied due to invalid credentials.</title>
<style type="text/css">
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
#content{margin:0 0 0 2%;position:relative;}
<div id="header"><h1>Server Error</h1></div>
<div id="content">
 <div class="content-container"><fieldset>
  <h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2>
  <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>

I'm thinking this may be related to the .axd proxy endpoint the toolkit uses to access the Azure table storage, but can't figure out why. The query is well-formed, worked fine with Azure emulators before I deployed to the cloud.

To test things out I inserted code right before the query call to create a new table using CloudTableClient, table was successfully created.

I also successfully query the table and retrieve its content in code from a separate WPF app (directly through the table service endpoint) and from Azure Storage Explorer.

Any suggestions welcome!