In ASP.NET you can remove an item from the web cache by invoking Cache.Remove(string ID). But, what happens when, for some reason, you want to quickly clear the whole cache? There’s no Clear or RemoveAll method in System.Web.Caching.Cache object.
You can iterate over all the entries and remove them by their key (or ID), using the GetEnumerator method of the Cache class.
IDictionaryEnumerator enumerator = Cache.GetEnumerator();
Funny thing happened today when I tried to export / import a site from one site collection into another one. It asked me to close the Summary Links web part, which I did. I tried to add it manually (importing a .webpart file exported from the source site), and it gave me the following error:
Unable to add selected web part(s). Could not load XSL file. The system cannot find the file specified.(Exception from HRESULT: 0x80070002).
This error is usually raised when you try to add a publishing-related web part (such as Summary Links) into a non-publishing site. You have to either add it into a site built with a publishing template (Collaboration Portal or Publishing Portal), or to activate the publishing features manually:
- Activate Office SharePoint Server Publishing Infrastructure feature in site collection features, in Site Collection Administration section of Site Settings page
- Activate Office SharePoint Server Publishing feature in destination site features, located on Site Administration section of Site Settings page
I’m much fond of the Flo’s excellent Notepad2 editor. Replacing the simple built-in Notepad is one of the first things that I customize on my developer box.
After the Vista Service Pack 1 is applied, my Notepad2 replacement is rolled back. I have to do it again, and I leave this simple walkthrough for anyone in the same situation:
- Rename the downloaded Notepad2 from Notepad2.exe into Notepad.exe
- Locate Notepad.exe files in C:Windows and C:WindowsSystem32 folders
- Edit the permissions for those files:
- Properties / Security / Advanced / Owner tab: change to Administrators group
- Properties / Security tab: give Administrators group Full Control on the file
- Copy and paste the renamed Notepad2 file in those folders, confirming the UAC message box
- That’s it! No more ugly Notepad….
Sometimes we want SharePoint to import only the user profiles of those user that belong to one specific Active Directory group. In this case we have to modify the import connection query expression in Shared Services Provider.
In this case we want all the users of the group Employees (in Groups OU) of the contoso.com domain to be imported:
Error: Object expected
Add a hidden Content Editor Web Part with the following HTML source text:
This will ensure that the referenced script file loads correctly.
I downloaded the Beta 1 of Internet Explorer 8 from http://www.microsoft.com/windows/products/winfamily/ie/ie8/default.mspx and I was pleasantly surprised that it passes successfully the hard Acid2 test that tests for web standard compliance. It seems that IE8 has a brand new render engine, although the beta keeps an "Emulate IE7" button, just in case.
Acid2 test for FireFox 2
Acid2 test for IE8 Beta1