Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


[storage] TypeLoadException in CloudTable.SetPermissions() (v1.7.1) #111

SBArbeit opened this Issue · 1 comment

4 participants


When attempting to call CloudTable.SetPermissions() I get a TypeLoadException:

> Inheritance security rules violated while overriding member: 'Microsoft.WindowsAzure.StorageClient.StorageException.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.

I'm running Windows 8 RTM and Visual Studio 2012 RTM, plenty of RAM/disk available.

The call stack at the time of exception is:

Microsoft.WindowsAzure.StorageClient.dll!Microsoft.WindowsAzure.StorageClient.Tasks.Task.Result.get() Line 103  C#
Microsoft.WindowsAzure.StorageClient.dll!Microsoft.WindowsAzure.StorageClient.Tasks.Task.ExecuteAndWait() Line 171 + 0xc bytes  C#
[External Code] 
Microsoft.WindowsAzure.StorageClient.dll!Microsoft.WindowsAzure.StorageClient.CloudTable.SetPermissions(Microsoft.WindowsAzure.StorageClient.TablePermissions permissions) Line 323 + 0x69 bytes    C#
(and then my function, of course)

My source code (in case I'm doing something bad) is:

CloudStorageAccount storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("DataConnectionString"));
CloudTableClient tableClient = storageAccount.CreateCloudTableClient();
CloudTable phraseTable = tableClient.GetTableReference("Phrase");
SharedAccessTablePolicy policy = new SharedAccessTablePolicy() { Permissions = SharedAccessTablePermissions.Query, SharedAccessExpiryTime = DateTime.Now.Add(TimeSpan.FromMinutes(15)) };
TablePermissions tablePermissions = new TablePermissions();
tablePermissions.SharedAccessPolicies.Add("Policy1", new SharedAccessTablePolicy() { Permissions = SharedAccessTablePermissions.Query, SharedAccessExpiryTime = DateTime.Now.AddMinutes(15) });
// The following line throws an exception

string returnValue = phraseTable.GetSharedAccessSignature(policy, null, "Phrase", null, "Phrase", null);
return returnValue;

I'm afraid this problem is exceeding my debugging abilities. I truly appreciate any help you have to offer.

Seattle, WA


@bradygaster bradygaster was assigned

Please recreate in if still relevant.

@stankovski stankovski closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.