Wednesday, July 1, 2009

Key cannot be null. Parameter name 'Key' error

You may face this error while setting up Custom Security extension or Forms Authentication with Sql Reproting Services. This is because two new enums added in FolderOperations and CatalogOperation.

You can add this permission for those enums this way:
m_FldOperNames.Add(FolderOperation.CreateModel, OperationNames.OperCreateModel)
m_CatOperNames.Add(CatalogOperation.ExecuteReportDefinition, OperationNames.ExecuteReportDefinition)

Adding this also means that you have to increase those hashtable counters like:
Private Const NrFldOperations As Integer = 10
Private Const NrCatOperations As Integer = 16

With this setting that error should disappear.

Cheers,