Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

ScottArbeit opened this Issue Sep 23, 2012 · 1 comment


None yet
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


@ghost ghost assigned jeffreyjirwin Mar 28, 2013

@ghost ghost assigned bradygaster Dec 9, 2013


stankovski commented Oct 2, 2014

Please recreate in https://github.com/Azure/azure-storage-net/ if still relevant.

@stankovski stankovski closed this Oct 2, 2014

@hyonholee hyonholee pushed a commit to hyonholee/azure-sdk-for-net that referenced this issue Oct 12, 2015

@huangpf huangpf Merge pull request #111 from Azure/master

@hovsepm hovsepm pushed a commit that referenced this issue Apr 25, 2016

@mkherani mkherani Merge pull request #111 from MabOneSdk/mkherani-dev1
Adding sdk changes from latest hydra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment