Tuesday, December 9, 2008

IIS management console presents blank window

You open the IIS management console using Inetmgr and you are presented with a empty console no application pools, no web sites, no virtual directories.

This happens occasionally on IIS 6 /IIS 7 which is hosting SharePoint sites. The very quick fix for this issue is restarting Sharepoint's OWSTimer service or make an IISRESET.


Microsoft support explains as follows
"Consider the following scenario. You have a process that has more than one thread. Additionally, the process uses the Internet Information Services (IIS) Active Directory Service Interfaces (ADSI) provider to access IIS. Two threads access IIS at the same time. In this scenario, you may be unable to manage IIS by using Server Manager"


Microsoft provides a hot fix for this nasty issue, that can be downloaded from the following link

FIX: You may be unable to manage IIS by using Server Manager if two threads access IIS at the same time

Tuesday, December 2, 2008

Browser Speed test . . . .

I did few benchmark for all my browsers on my desktop to just check who is fast,faster, fastest using SunSpider JavaScript. Ok let's see the stats

Google Chrome 1757.6 ms
FireFox 3.0 3695.8ms
Apple Safari 3.15021.2 ms
Opera 9.505237.2 ms
Opera 9.624681.0 ms
Microsoft IE 7.036744.6ms
Microsoft IE 6.060803.8ms

Obviously Google chrome is the front runner and we are expecting more in Microsoft IE 8 because the results of IE 7 and IE 6 soars. If you look at the stats you can notice Opera improves a lot in its latest 9.62.

Want to test your browser how fast it is ? Here you go
http://www2.webkit.org/perf/sunspider-0.9/sunspider-driver.html

Who ever wins or loses , the end user is surely getting the best out of the market :-)

Monday, December 1, 2008

STSADM operations poster released !!

We know STSADM command, how essential to a SharePoint administrator. Microsoft released a poster which represents all of its operations as visio document.
This can be downloaded from http://go.microsoft.com/fwlink/?LinkId=120150

Thursday, November 20, 2008

Filter SharePoint List items based on User context

Filtering the items created by the logged in user can be done by simply modifying the existing View or by adding a new view which has "Created By" value = [Me].

But how to achieve the same thing in Code, Getting a list looping it and filtering the result will do. But sure performance will go down.

Here comes the CAML query for the rescue of SharePoint developer. CAML is having a token which automatically uses the current user context.

So we can write a code snippet as follows to get items created by the current user.



SPList sList=[Get the list to query here];
SPQuery query = new SPQuery();
query.Query = string.Format(
"[Where]"+
+ "[Eq]"
+ "[FieldRef Name='Author' LookupID='TRUE'/]"
+ "[Value Type='User'][UserID /][/Value]"
+ "[/Eq]"
+ "[/Where]");
SPListItemCollection listItems = sList.GetItems(query);


you will get the list items only created by the current user, no iteration, no filteration happens only clean CAML query.

Replace all square brackets[ ] with angle brackets < >. Blogger refused to accept the angle brackets.

Happy coding,

Tuesday, October 21, 2008

Free Microsoft Ebook

Microsoft is celebrating its 25th anniversary by providing some free MS Press e-books



Windows Server® 2008 TCP/IP Protocols and Services
by Joseph Davies
ISBN: 9780735624474



Programming Microsoft Robotics Studio
By Sara Morgan
ISBN: 9780735624320

Woes of IE 8 beta un-Installation

Finally I planned(got some guts) to evaluate IE 8 beta in my local virtual machines. After evaluating I wanted to rollback for IE 7 for SharePoint requirements. Rollback happened like a charm with out any hitches.

But after a few hours I got a crazy error message box, asking me to Abort, Retry & Ignore.



I checked my event viewer, there I found the following error under UserEnv category.

Event Type: Error
Event Source: Userenv
Event Category: None
Event ID: 1041
Date: 10/14/2008
Time: 9:58:30 AM
User: NT AUTHORITY\SYSTEM
Computer: JD1E4K
Description:
Windows cannot query DllName registry entry for {CF7639F3-ABA2-41DB-97F2-81E2C5DBFC5D} and it will not be loaded.
This is most likely caused by a faulty registration.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

After digging a lot, no resolution was found. Finally I took a backup of Registry and did a quick search using the GUID in the error message. It seems to be in the following location.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GPExtensions/

Delete the key and quit the Registry. Yeah done finally resolved the issue.

DISCLAIMER (As usual): Editing the registry may cause unpredictable problems in the machine, So take a BACKUP before proceeding.

Sunday, October 5, 2008

How to compact Virtual hard drives?

When we develop in our virtualized dev environment, the virtual hard disk will expand dynamically in size. The problem is they don't compact automatically when we clean-up the VHD's. steps to reduce the VHD in size

1. Remove all unwanted files in temp locations or use CCleaner to remove all unwanted files.
2. Uninstall all programs which are unused in the dev environment.
3. Defrag the disk by using the system defragmenter.
4. select Capture ISO Image from CD menu and browse to the Virtual PC additions
directory
5. Location is %ProgramFiles%\Microsoft Virtual PC\Virtual Machine Additions by default.
6. Mount Virtual Disk Precompactor.iso. The precompactor will start automatically.
7. Once it's done , shut down the Virtual Hard disk.
8. Select the VPC from the Virtual PC console. Click on the settings button and select the Harddisk1 from the left pane.
9. Click over the "Virtual Disk Wizard" button and click next in the wizard.
10. select Edit existing disk, next choose the compact option - this can take a while to complete

For more info KB888760 How to prepare a Virtual Server 2005 virtual hard disk file to send to Microsoft Product Support Services