Sunday, December 21, 2008
Perfmon counter labels turned to numbers
Tried adding all .net by using following lodctr command (This command is responsible for updating all performance monitor counters and their explain texts)
lodctr C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\corperfmonsymbols.ini
lodctr C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_perf.ini
but no luck, not able to see the counters back.
Finally rebuilding the whole counters did the trick
lodctr /R
For those who are not able to succeed even after this command can try the following Microsoft Support article
How to manually rebuild Performance Counter Library values
Troubleshooting Performance Monitor Counter Problems
Tuesday, December 9, 2008
IIS management console presents blank window
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 . . . .
Google Chrome | 1757.6 ms |
FireFox 3.0 | 3695.8ms |
Apple Safari 3.1 | 5021.2 ms |
Opera 9.50 | 5237.2 ms |
Opera 9.62 | 4681.0 ms |
Microsoft IE 7.0 | 36744.6ms |
Microsoft IE 6.0 | 60803.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 !!
This can be downloaded from http://go.microsoft.com/fwlink/?LinkId=120150
Thursday, November 20, 2008
Filter SharePoint List items based on User context
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
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
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
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?
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
Friday, September 26, 2008
FireFox easter eggs
Try about:Mozilla in its address bar you will be presented a red screen with a verse from The Book of Mozilla
hmmm due to the browser wars we got a few easter eggs and many compatibility issues in our web applications.
Thursday, September 25, 2008
Free Sql Server 2008 Ebook - Direct Download
Download here:
Tuesday, September 23, 2008
Monday, September 22, 2008
Free Microsoft Press E-Book offer
You will need to provide your Live Id or Hotmail ID for a registration process before downloading.
Table Of Contents:
Chapter 1: Security and Administration
Chapter 2: Performance
Chapter 3: Type System
Chapter 4: Programmability
Chapter 5: Storage
Chapter 6: Enhancements for High Availability
Chapter 7: Business Intelligence Enhancements
Introducing Microsoft SQL Server 2008
by Peter DeBetta, Greg Low, and Mark Whitehorn
ISBN: 9780735625587
Download From here
Thursday, September 18, 2008
Vista goes crazy
Wednesday, September 17, 2008
SharePoint development VM loves IISReset
IISRESET takes a lot of time instead of that if we recycle the required application pool which is associated to our IIS web application, this will save atleast a minute of dev effort.
This recycling process can be automated by using the following OOB VB script
cscript.exe iisapp.vbs /a SharePointAppPool /r
or
cscript.exe iisapp.vbs /p [Process ID] /r
[Process ID] : This can be obtained just by executing iisapp.vbs in the command line. This will list all the application pools with their process ids
Get more info about IISapp.vbs from Microsoft Technet library
Do you want to recycle all the application pools in your IIS ?
Save the following the VB script to vbs file and replace the MachineName with your Dev machine's name
Set locator = CreateObject("WbemScripting.SWbemLocator")
Set Service = locator.connectserver("MachineName", "root/MicrosoftIISv2")
Set APCollection = Service.InstancesOf("IISApplicationPool")
For Each APInstance In APCollection
APInstance.Recycle
Next
Tuesday, September 16, 2008
Monday, September 8, 2008
The Last Supper bigggggessst Photo
The resolution of the picture is 16 billion pixel (approx), which is 1600 times larger than a picture which is taken by a 10 Mega pixel camera. Image was photographed as 1677 pieces and then electronically assembled by computers. Each piece is 73 Mega byte approx.You can watch the image here
Technical Information:
Image Info:
---------------
Resolution : 16.118.035.591 pixel (172181 x 93611)
Camera : "Nikon D2Xs"
Lens : AF-S Nikkor 600mm f/4D IF-ED II
Computer used for processing:
---------------------------------------
Memory : 16 Gigabyte RAM memory
Storage : 2 Terabyte hard disk space
Watch the video how they did it here
Friday, September 5, 2008
Retrieving the password for IUSR & IWAM accounts
SharePoint Page processing model
The browser requests a Web page from Microsoft Internet Information Services (IIS).
IIS passes the request to ASP.NET 2.0.
An HttpApplication pipeline is created for the request.
a. This request will be handled by WSS specific module SPRequestModule
b. Then the processed request will be handled by WSS specific handler SPHttpHandler.
ASP.NET 2.0 fetches the page via the Windows SharePoint Services 3.03 file provider. ASP.NET passes the URL to the file provider, and the file provider fetches the page and returns the page stream. The Windows SharePoint Services file provider implements caching and reduces round-trips to the database.
ASP.NET loads a Page class, parses the page stream, and finds a reference to the page layout upon which the page is based.
The ASP.NET engine compiles the page stream and stores it in memory.
ASP.NET queries the Windows SharePoint Services file provider for the page layout.
ASP.NET loads the stream for the page layout associated with the current page.
ASP.NET compiles the page layout and stores it in memory. ASP.NET can free this memory later if the system needs memory.
ASP.NET determines the master page for the site and fetches the master page via the Windows SharePoint Services file provider.
ASP.NET compiles the master page and writes to the disk so you never have to recompile the master page unless you modify it.
The page layout runs each control on the page in the context of the page that was requested.
ASP.NET updates the necessary caches.
IIS returns the page to the browser.
The next time the page is requested by the same user or by a different user who has the same permissions to see the page as the first user, page processing is much more efficient:
The browser requests a Web page from IIS.
IIS passes the request to ASP.NET 2.0.
An HTTPApplication pipeline is created for the request and hits the HandleRequest.
ASP.NET uses all the internal caches.
ASP.NET renders the HTML for the controls.
IIS returns the page to the browser.
Wednesday, August 27, 2008
SSL Certificate bug in Google
The SSL certificate applies only to Google.com and not for Google.co.in.
Firefox redirected me to an error page which clearly explains the issue,
Internet explorer 7.0 managed to tolerate and showed me the right content but with a Certificate Error in its location bar.
hmm hope Google will fix this bug . . . .
Thursday, August 21, 2008
Querystring limitation in Internet Explorer
This limitation is only for HTTP GET request not on HTTP POST request
On the other hand Firefox 3.0 allowed me to paste >2,40,000 chars. So developers beware of IE while passing lengthy query strings from your web application, your code has a chance of failing on browser compatibility testing.
Keep in mind that the number of characters will be significantly reduced if you have special characters (e.g. spaces) that need to be URLEncoded (e.g. converted to the sequence '%20'). For every space, you reduce the size allowed in the remainder of the URL by 2 characters - and this holds true for many other special characters that you may encode before sending the URL to the client.
MSFT KB Article : http://support.microsoft.com/kb/q208427/
Wednesday, August 13, 2008
A CAML View of a SPList
http://Foo/Library/_vti_bin/owssvr.dll?Cmd=ExportList&List={DA45FCA4-2B2C-4532-8E89-65FF6813F057}
This will emit the information as CAML/XML there we can find all the information.
Naivgate to Web part maintenance page
Sample:
http://www.foo.com/default.aspx?contents=1
Saturday, August 9, 2008
Sharepoint Data Model is here........
I was searching for the related documentation in msdn for a long time. My colleague, Subhajit recently blogged and revealed it to the community. Since blogger doesn't have the capability of the Track back feature I cannot trackback that blog.
Here we go for the Data model of Sharepoint
Any modification at database level is STRICTLY NOT SUPPORTED by MSFT.
Want to Take a DLL backup from GAC
~~~~~~~
open command prompt and navigate to %windir%/assembly/gac_msil/ and use copy command to take a copy of the require dll.
Option-2:
~~~~~~~
Want to do it in a windows way ,
Simply enter the following:
subst g: %windir%\assembly\gac
Now open Explorer, go to drive G: and you're all set.
Thanks to Jeff key
Option-3:
~~~~~~~
Start->Run->type c:\windows\assembly\gac
There you are take a back up of the required dll and go ahead
Friday, August 8, 2008
Get rid of memory leaks in Owsttimer & WssAdmin
SharePoint App Pools do take lots of memory but I do IISRESET or a process recycle very often to reclaim the memory,but WSSADMIN.EXE and OWSTIMER.EXE really consume ridiculous amount of memory.
This memory can be reclaimed by running the following scripts in the Dev virtual machines.
net stop "Windows SharePoint Services Timer"net start "Windows SharePoint Services Timer"
net stop "Windows SharePoint Services Administration"
net start "Windows SharePoint Services Administration"
Want more details about this memory leak check out
http://www.mindsharpblogs.com/Ben/archive/2007/09/25/2965.aspx
Monday, August 4, 2008
Determine MOSS or WSS
There is no direct way to determine whether MOSS is installed over WSS throught Object model,
So we can just check the existence of profile service on the farm. Profile service comes along only with MOSS so we can ensure MOSS is installed by this snippet.
string isapiFolder = SPUtility.GetGenericSetupPath("ISAPI");
string userProfileServicePath = Path.Combine(isapiFolder, "UserProfileService.asmx");
bool SharePointServerInstalled = File.Exists(userProfileServicePath);
Friday, July 4, 2008
Memory leak in Firefox 3.0
Thursday, July 3, 2008
How to get the connection string for Sharepoint Config Database
Registry key:
HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\configdb
Code snippet to get the connection string:
RegistryKey key = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\configdb");
DSN = (string) key.GetValue("DSN");
SQLServerInstance = new string[]
{
this.DSN.Split(new char[] { '=', ';' })[1]
};
key.Close();
Hope this will help some needy SharePoint Dev.
WARNING : Do not make any changes in the registry without taking proper backups