Monday, February 22, 2010

AjaxToolkit: TabContainer not visible after setting TabPanel.Visible = false

After upgrading AjaxToolkit I had the following weird problem: a TabContainer disappeared.

A short investigation showed that it was cause because I was setting a TabPanel property
tabPanel.Visible = false

Bottom line: If you set the ActiveTab of the TabContainer to Visible=false => the TabContainer will not be drawn. I'm not sure if it's a bug or a feature.

Resolution: Change the ActiveTab when you set TabPanel.Visible = false

Wednesday, February 10, 2010

Error 2869 during installation

The problem:
Error message during installation on Windows Vista / 7:
The installer encountered an unexpected error installing this package. This may indicate a problem with the package. The error code is 2869.

The MSI contains a custom action that require more privileges than the current user have.
Due to UAC (user access control) even if you're administrator, you're not REALLY administrator unless specifically run as such.

- Simple option - Install as administrator.
- If you wrote the package in Visual Studio 2005/2008 add the following to require administrator privileges to begin installation:
1. Right click on the setup project -> View -> Launch Conditions
2. In the Launch conditions window, right-click the node "Launch Conditions" and select "Add launch condition".
3. Rename the new launch condition to something like "Require Administrator".
4. In the new launch condition property window set "Condition" to "AdminUser"
5. Set the error message to something meaningful ("Only administrator can install this software").
6. Check the following post & add "NoImpersonate.js"
7. Rebuild the package.