Raghu's SharePoint Corner: June 2008

My blog has moved!

You will be automatically redirected to the new address. If that does not occur, visit
http://www.sharepointcolumn.com
and update your bookmarks.

June 27, 2008

Parser Error: Direct Dependencies and The Limit Has Been Exceeded

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.





Parser Error Message: The page '/sites/blah/_catalogs/masterpage/blah.master' allows a limit of 11 direct dependencies, and that limit has been exceeded.

During deploying user control on the master page, in one of our project I used to get the above error. Generally such kind of exception is thrown will rendering a page. The reason behind this is the number of controls allowed on the page to render exceeds the limit specified in the web.config file



The solution of this problem can be fixed in two different ways.
Solution 1: Modify the control dependencies in the web.config file.
Solution 2: Optimize the usage of controls on the master page; this can be done either by deleting the duplicates, or integrating 2 or more control in one control.
The solution 2 is a complex one, where as the solution 1 is a simple modification as show below


Search for the following tag in the web config file and chage the DirectFileDependecies

<- SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="20" TotalFileDependencies="50" AllowPageLevelTrace="false">
By default the DirectFileDependecies will be set to 10, you can change to any limit u require.

June 13, 2008

Integrating AJAX Control Toolkit with SharePoint

So far you have configured SharePoint to support AJAX, In order to use Ajax Control Toolkit You need to do the following two modifications to web. Config file of the site.

1.You need to register Ajax Control Toolkit assembly, add the following tag in the <-assemblies> section
<-add assembly ="”AjaxControlToolkit," version ="1.0.10618.0," culture =" neutral," publickeytoken =" 28f01b0e84b6d53e”">
Please Note: For future release the version number changes
2.Add the following tag under the <-controls> section of the <-pages>
<-add namespace="”AjaxControlToolkit”" assembly ="”AjaxControlToolkit”" tagprefix="”ajaxToolKit”">

June 3, 2008

Performance Tuning Using GZIP

Performance Tuning By Enabling HTTP Compression Using GZIP
NOTE: Make sure that you are logged in with an account that has Administrator rights onto the server.
Enabling HTTP Compression on your Windows 2003 Server.
Step 1: Open IIS manager, type “inetmgr” on the run command, you will see IIS Manger window opened.


Step 2: Right click on your local computers, click properties and check mark the box for “Enable direct Metabase Edit” as shown in the figure below and click ok.

Step 3: Expand the server node, right click on the websites node and click properties, you will get a window opened as shown below


Step 4: Click on the service tab on the website properties window, check mark the boxes for compression application files and compress static files under HTTP Compression and click ok



Step 5: Right click on the Web service Extension node on the right pane of the IIS Manager, click on add button, you will get a pop up window for new web service extension, in the extension name textbox type name has HTTP Compression as shown below
Step 6: Click on the Add button on the New Web Service Extension properties window, you will get a add file pop up window, click browse button on the add file popup, A open window dialog box will appear, navigate to “C:\WINDOWS\system32\inetsrv”, click on the file gzip.dll on the open window and click open, click ok, check mark the box “Set extension status to allowed” and click ok.




Step 7: Configure Metabase.xml, Open up Windows Explorer and go to C:\Windows\System32\inetsrv. Find MetaBase.xml and make a copy (you can just highlight it and do a Ctrl-C, then a Ctrl-P to make a copy of MetaBase.xml). Now open up MetaBase.xml in a text editor. Find the section. Be careful, there are two sections here: one for deflate and one for gzip. We want gzip so the Location attribute of the element will have the following value:
Location ="/LM/W3SVC/Filters/Compression/gzip"

Step 8. Look for the HcScriptFileExtensions section. Your default should have: asp, axd, and exe. Now add aspx file extension as shown below.
Step 9: Finally close all the windows and reset the IIS.