Thursday, February 18, 2010

Ordered Dictionary

I had an issue with loading a dynamically generated DropDownList options via a XML file. Initially I was loading the options for the dropdownlist from the XML file to a Hashtable. But when I tried to display that the order in which the items were displayed wasn't the way it was loaded.

I tried using SortedList to fix the issue but my users insisted that they need the flexibity of maintaining the order via the XML file.


I changed the SortedList to OrderedDictionary and it solved my problem. The OrderedDictionary retains the order in which the options were inserted. So this solves my customer requirements. From performance wise, it is ok using OrderedDictionary for limited number of options.

Disabling Configuration Inheritance For ASP.NET Child Applications

I had a HttpModule for my parent website and I had a virtual directory under the parent website. When I tried to access the virtual directory, I got the following error.

Could not load file or assembly 'XXXXXXXX' or one of its dependencies. The system cannot find the file specified.


Include the following in the parent website web.config file to exclude any of the config settings so that the settings doesn't get inherited from the parent website to the child virtual directory.

<location path="." inheritInChildApplications="false">
[any other config settings]

Tuesday, February 09, 2010

SQL Server Reporting Services Error

The report server cannot decrypt the symmetric key that is used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content. (rsReportServerDisabled) Get Online Help
Bad Data. (Exception from HRESULT: 0x80090005)


Possible reasons would be either the account for running the SSRS 2008 has been changed or port number has been changed. To fix the above error,

a) Logon to the Reporting Services Configuration Manager.
b) Make a note of the settings in all the sections.
c) Click the Encryption Keys section.
d) Click the "Delete" button to delete encrypted content.
e) Check whether all the settings in all the sections are intact and also make necessary changes.
f) Click the "Change" button to replace the encrypted content with the updated changes.

Change the timezone info on Search Server Express 2008

The timezone need to be changed in couple of places in Search Server 2008 Express.

a) Application Management > Sharepoint Web Application Management > Web Application General Settings.

b) On the Search Central site, click on Site Actions > Site Settings > Site Administration > Regional Settings.

Friday, February 05, 2010

How to identify SQL SERVER version and edition

Run the following command to find the version and edition of SQL SERVER


Check this link ( to find what service pack has been installed.

Monday, February 01, 2010

Set up a service account to run application pool

a) Give "Logon as a service" and "Logon as a batch job" permissions to the newly created service account.

Note: If you don't give the above permissions, the application pool will crash.

b) Run the following command

aspnet_regiis -ga \AccountName

The above command with -ga switch grants the following rights to the account:
1. Access to the IIS Metabase

2. Permission to write to the %Windir%\Microsoft.NET\Framework\version\Temporary ASP.NET Files folder