By default, Search Services can crawl and filter a file with a size of up to 16 megabytes (MB). It will always crawl the first 16MB of a file. After this limit is reached, SharePoint Portal Server enters a warning in the gatherer log “The file reached the maximum download limit. Check that the full text of the document can be meaningfully crawled.”
To increase the limit of 16 MB, you must add in the registry new entry MaxDownloadSize. To do this, follow these steps:
1. Start Registry Editor (Regedit.exe).
2. Locate the following key in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Global\Gathering Manager
3. Open Edit - New - DWORD Value. Name it MaxDownloadSize.
4. Double-click, change the value to Decimal, and type the maximum size (in MB) for files that the gatherer downloads.
5. Restart the server.
6. Start Full Crawl.
NOTE: Increasing the file size may cause a timeout exception because the crawler can timeout if the file takes too long to crawl/index (because of its size). To increase timeout value, follow these steps:
1. In Central Administration, on the Application Management tab, in the Search section, click Manage search service.
2. On the Manage Search Service page, in the Farm-Level Search Settings section, click Farm-level search settings.
3. In the Timeout Settings section change Connection and Request acknowledgement time.
Wednesday, December 3, 2008
Wednesday, November 19, 2008
The publishing portal template explained
In our real world example as mentioned above we were using the publishing portal example and our customer had some specific wishes which we could not meet out of the box.
So, how does this template work? Basically the site definition used is the BLANKINTERNET template you can find in the famous 12/template/site templates directory.
When you open ONET.XML you will see several configuration tags. Remember how your site already contains a root site and two sub sites (Press Releases and the hidden Search center)? Well, for the root site, BLANKINTERNET#0 is the one that is being used. For the Press releases subsite it is BLANKINTERNET#1 and there is another one called BLANKINTERNET#2 and that one is for the new subsites you create yourself.
So what happens when you select 'Create site collection' and select the 'Publishing portal' template? Well, that has been defined in the webtemp*.xml files you can find at c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\XML. You are probably not aware that there is another important file called internetblank.xml which is located at c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML. The contents of that file looks like this:
As you can see, it actually defines your initial site structure and it uses the configurations from the ONET.XML.
In the Webtempsps.xml file you will see a list of all the templates that will show up in the Template picker when you create your site collection. The Publishing Portal definition looks little bit different from the other ones as it uses a provisioning technique to create not only one site but a site structure as has been defined in the internetblank.xml file:
You might think that we are drifting away from the initial objective of this post, but read on and everything will be ok! ;-)
How to create my own Corporate intranet?
This is how I would start:
Create a site collection using the Publishing Portal template Open SharePoint designer and create a new master page Use the minimal master page as a start (you can find an updated version on the Microsoft site) Update the master page to your liking. Add a CSS link after the other CSS links in the master page. Reference a css file, located at the _layouts/1033/styles/yourcompany/ folder. Note: this is what I like, you can also choose to upload a CSS file to your styles library of your site collection. Add imagery to the same location. Reference images in your stylesheet relative to the styleheet path. If you are done, I would suggest to package this as a solution because you don't want to deploy it manually with SharePoint designer. This is a very brief descriptions of what I would do:
Create a new project in Visual Studio Use WSPBuilder (CodePlex) to create the initial folder structure within your project Create a new feature inside the features folder called MyCompanyIntranetLayout and add your master page there. Update your feature.xml and Provisionedfiles.xml in the feature so that it provisions your master page to the _catalogs file of your site collection. Examples can be found plenty on the Net so I don't include one here. Scope the feature to the site collections. Create the MyCompany folder inside the layouts/1033/styles folder of your project Use WSPbuilder to create the WSP file for this and you can deploy it to your farm. Let us face the challengesSo you have deployed you master page, custom CSS and images but they don't show up right? You will first have to activate the feature on your site collection, and change the master page using the site settings -> master page feature. Now, create a subsite and .. damn .. you'll have to do it again.
So, how to solve this. Well now we actually hit a fundamental issue and the objective of this post.
There are two options:
You could create a stapling feature and a feature event receiver to automate this process. You could edit ONET.XML of the INTERNETBLANK site template (don't!) and add the feature and change the Chromemasterurl property. To be honest, the second option I would never suggest. Do not touch the out of the box templates. Instead, you could create a copy of the INTERNETBLANK template and change the ONET.XML there.
So, what is the best option? As a matter of fact, we already build the masterpage as a feature so the question is how to activate it and when. Please read this excellent post from Mart Muller.
StaplingYou actually staple a feature to an existing template Configuration. An example is given below:
This is an excerpt from the elements.xml file of the stapling feature. Have a look at the existing examples and documentation of how to create one. Fact is that stapling gets activated after the site has been created!
Feature event receiverWhy do you need the event receiver? The event receiver is actually a dll which you build using Visual Studio and deploy with your feature in the same package. In your feature.xml file you define an eventreceiver assembly *which is your DLL*. In you DLL you have defined a method which gets called whenever you install or activate the feature. There you can switch out the default blueband.master page and replace it with your own. You can do more there! Like applying custom CSS, theme, setting navigation properties and so on.
Adding the feature to ONET.XMLAnother option would be to add the the feature to the ONET.XML file and change the ChromeMasterUrl property to point to your new master.page.
Make sure that you add the feature before the property because everything in the ONET.XML will be processed sequential. Hey! That is an important difference with stapling! If you have several features that are dependent on each other and which need to get activated in a certain sequence, ONET.XML would be a good place to add them.
An example is shown below:
http://schemas.microsoft.com/sharepoint/">
Wow, when do I use stapling then?
The answer is that you use stapling when you want to add the feature to existing (out of the box) templates or more than one template.
You would not want to change the ONET.XML after it has been used by existing sites (eg. live situation).
What about Themes, page layouts, navigation properties, template selection for subsites and page defaults?
Every time, you face the challenge, will I add the feature through ONET.XML or use stapling. Or: will I modify the site properties through code in the event receiver or will I change ONET.XML properties?
Here are some guidelines which I think work very nicely:
ThemesCreate a custom theme Do not add it to spthemes.xml! Create a feature which uses a event receiver to activate the theme on a web Create a second feature to staple the activations feature to your template configuration(s) Example of a themestapler can be found on CodePlex Custom Page layoutsCreate custom page layouts using SharePoint designer When satisfied, copy them into your Visual Studio project where you define a Feature for your new layouts. This feature will also contain your new master page Create a second stapling feature to provision the files to the _catalogs/masterpage folder of your site collection. Create a event receiver to activate the masterpage or other settings Site and subsite specific settingsI feel very comfortable with creating a copy of the INTERNETBLANK template and then add a webtemp*.xml file for adding the new site template to the list of templates Change settings like navigation inhertiance through ONET.XML: http://schemas.microsoft.com/sharepoint/">
Change settings like the available template for subsites through ONET.XML: http://schemas.microsoft.com/sharepoint/">
Change settings like the default page layout through ONET.XML:
Wrap up, rules of thumb!
This post is not the only truth! Feel free to add comments or convince me to do otherwise. Create all customizations initially with SharePoint designer and after a while (first beta) deploy them through Features packaged nicely with WSPBuilder Choose to staple your features whenever possible Create a copy of INTERNETBLANK template and change site, subsite specific settings in ONET.XML. I use it to set add the master page feature and set the default master page. However, you could do that through stapling. Make this new site template also part of your solution! I choose to use the Theme stapling from Codeplex to activate the theme on all sites (specifically for the application pages!) because I do not want to add the theme to spthemes.xml and ONET.XML does not provide a property for that! Add default content to pages using the properties in ONET.XML. Your final Visual Studio solution could look like something like this:
12 template features companylayouts masterpages company.master mylayout.aspx mysecondlayout.aspx feature.xml provisionedfiles.xml companythemechanger feature.xml companythemestapler elements.xml feature.xml layouts 1033 styles companyimages company.css sitetemplates companypublishing xml onet.xml default.aspx themes companypublishing company.inf theme.css GAC themechanger.dll
That is it! Hopefully this chaotic post helps you a little bit on how to design your Corporate Intranet. And yes, using this approach leaves everything uncustomized! So future updates through your visual studio project are reflected immediately on all sites! But keep in mind not to change ONET.XML afterwards.
So, how does this template work? Basically the site definition used is the BLANKINTERNET template you can find in the famous 12/template/site templates directory.
When you open ONET.XML you will see several configuration tags. Remember how your site already contains a root site and two sub sites (Press Releases and the hidden Search center)? Well, for the root site, BLANKINTERNET#0 is the one that is being used. For the Press releases subsite it is BLANKINTERNET#1 and there is another one called BLANKINTERNET#2 and that one is for the new subsites you create yourself.
So what happens when you select 'Create site collection' and select the 'Publishing portal' template? Well, that has been defined in the webtemp*.xml files you can find at c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\XML. You are probably not aware that there is another important file called internetblank.xml which is located at c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML. The contents of that file looks like this:
As you can see, it actually defines your initial site structure and it uses the configurations from the ONET.XML.
In the Webtempsps.xml file you will see a list of all the templates that will show up in the Template picker when you create your site collection. The Publishing Portal definition looks little bit different from the other ones as it uses a provisioning technique to create not only one site but a site structure as has been defined in the internetblank.xml file:
You might think that we are drifting away from the initial objective of this post, but read on and everything will be ok! ;-)
How to create my own Corporate intranet?
This is how I would start:
Create a site collection using the Publishing Portal template Open SharePoint designer and create a new master page Use the minimal master page as a start (you can find an updated version on the Microsoft site) Update the master page to your liking. Add a CSS link after the other CSS links in the master page. Reference a css file, located at the _layouts/1033/styles/yourcompany/ folder. Note: this is what I like, you can also choose to upload a CSS file to your styles library of your site collection. Add imagery to the same location. Reference images in your stylesheet relative to the styleheet path. If you are done, I would suggest to package this as a solution because you don't want to deploy it manually with SharePoint designer. This is a very brief descriptions of what I would do:
Create a new project in Visual Studio Use WSPBuilder (CodePlex) to create the initial folder structure within your project Create a new feature inside the features folder called MyCompanyIntranetLayout and add your master page there. Update your feature.xml and Provisionedfiles.xml in the feature so that it provisions your master page to the _catalogs file of your site collection. Examples can be found plenty on the Net so I don't include one here. Scope the feature to the site collections. Create the MyCompany folder inside the layouts/1033/styles folder of your project Use WSPbuilder to create the WSP file for this and you can deploy it to your farm. Let us face the challengesSo you have deployed you master page, custom CSS and images but they don't show up right? You will first have to activate the feature on your site collection, and change the master page using the site settings -> master page feature. Now, create a subsite and .. damn .. you'll have to do it again.
So, how to solve this. Well now we actually hit a fundamental issue and the objective of this post.
There are two options:
You could create a stapling feature and a feature event receiver to automate this process. You could edit ONET.XML of the INTERNETBLANK site template (don't!) and add the feature and change the Chromemasterurl property. To be honest, the second option I would never suggest. Do not touch the out of the box templates. Instead, you could create a copy of the INTERNETBLANK template and change the ONET.XML there.
So, what is the best option? As a matter of fact, we already build the masterpage as a feature so the question is how to activate it and when. Please read this excellent post from Mart Muller.
StaplingYou actually staple a feature to an existing template Configuration. An example is given below:
This is an excerpt from the elements.xml file of the stapling feature. Have a look at the existing examples and documentation of how to create one. Fact is that stapling gets activated after the site has been created!
Feature event receiverWhy do you need the event receiver? The event receiver is actually a dll which you build using Visual Studio and deploy with your feature in the same package. In your feature.xml file you define an eventreceiver assembly *which is your DLL*. In you DLL you have defined a method which gets called whenever you install or activate the feature. There you can switch out the default blueband.master page and replace it with your own. You can do more there! Like applying custom CSS, theme, setting navigation properties and so on.
Adding the feature to ONET.XMLAnother option would be to add the the feature to the ONET.XML file and change the ChromeMasterUrl property to point to your new master.page.
Make sure that you add the feature before the property because everything in the ONET.XML will be processed sequential. Hey! That is an important difference with stapling! If you have several features that are dependent on each other and which need to get activated in a certain sequence, ONET.XML would be a good place to add them.
An example is shown below:
Wow, when do I use stapling then?
The answer is that you use stapling when you want to add the feature to existing (out of the box) templates or more than one template.
You would not want to change the ONET.XML after it has been used by existing sites (eg. live situation).
What about Themes, page layouts, navigation properties, template selection for subsites and page defaults?
Every time, you face the challenge, will I add the feature through ONET.XML or use stapling. Or: will I modify the site properties through code in the event receiver or will I change ONET.XML properties?
Here are some guidelines which I think work very nicely:
ThemesCreate a custom theme Do not add it to spthemes.xml! Create a feature which uses a event receiver to activate the theme on a web Create a second feature to staple the activations feature to your template configuration(s) Example of a themestapler can be found on CodePlex Custom Page layoutsCreate custom page layouts using SharePoint designer When satisfied, copy them into your Visual Studio project where you define a Feature for your new layouts. This feature will also contain your new master page Create a second stapling feature to provision the files to the _catalogs/masterpage folder of your site collection. Create a event receiver to activate the masterpage or other settings Site and subsite specific settingsI feel very comfortable with creating a copy of the INTERNETBLANK template and then add a webtemp*.xml file for adding the new site template to the list of templates Change settings like navigation inhertiance through ONET.XML:
Change settings like the available template for subsites through ONET.XML:
Change settings like the default page layout through ONET.XML:
Wrap up, rules of thumb!
This post is not the only truth! Feel free to add comments or convince me to do otherwise. Create all customizations initially with SharePoint designer and after a while (first beta) deploy them through Features packaged nicely with WSPBuilder Choose to staple your features whenever possible Create a copy of INTERNETBLANK template and change site, subsite specific settings in ONET.XML. I use it to set add the master page feature and set the default master page. However, you could do that through stapling. Make this new site template also part of your solution! I choose to use the Theme stapling from Codeplex to activate the theme on all sites (specifically for the application pages!) because I do not want to add the theme to spthemes.xml and ONET.XML does not provide a property for that! Add default content to pages using the properties in ONET.XML. Your final Visual Studio solution could look like something like this:
12 template features companylayouts masterpages company.master mylayout.aspx mysecondlayout.aspx feature.xml provisionedfiles.xml companythemechanger feature.xml companythemestapler elements.xml feature.xml layouts 1033 styles companyimages company.css sitetemplates companypublishing xml onet.xml default.aspx themes companypublishing company.inf theme.css GAC themechanger.dll
That is it! Hopefully this chaotic post helps you a little bit on how to design your Corporate Intranet. And yes, using this approach leaves everything uncustomized! So future updates through your visual studio project are reflected immediately on all sites! But keep in mind not to change ONET.XML afterwards.
Tuesday, November 11, 2008
Feature, Web Part , Images Solution sure shot deployment to Farm
You can delete the dll if not used or created by VS2008, or Wspbuilder or STSDEV.
You can also edit any file in the wsp.
Refer my blog on how to modify a solution
http://kopperla.blogspot.com/2008/10/how-to-replace-files-in-sharepoint.html
(eg. c:\kopperla\mySol.wsp used in the following stsadm commands )
1. stsadm -o addsolution -filename "c:\kopperla\mySol.wsp "
2.
Case1. If your solution has no dlls.
stsadm -o deploysolution -name mySol.wsp -immediate -force
Case2. If your solution has dlls to be deployed to GAC. (eg. c:\kopperla\mySol.wsp )
stsadm -o deploysolution -name mySol.wsp -immediate -allowGacDeployment -allowCasPolicies -force
-immediate - to all servers in the farm immediately.
-allowGacDeployment - if dlls needs to be copied to GAC
-allowCasPolicies - if solution has CAS policies.
3. stsadm -o execadmsvcjobs
Executing all administrative timer jobs immediately instead of waiting for the timer job to run
You can also edit any file in the wsp.
Refer my blog on how to modify a solution
http://kopperla.blogspot.com/2008/10/how-to-replace-files-in-sharepoint.html
(eg. c:\kopperla\mySol.wsp used in the following stsadm commands )
1. stsadm -o addsolution -filename "c:\kopperla\mySol.wsp "
2.
Case1. If your solution has no dlls.
stsadm -o deploysolution -name mySol.wsp -immediate -force
Case2. If your solution has dlls to be deployed to GAC. (eg. c:\kopperla\mySol.wsp )
stsadm -o deploysolution -name mySol.wsp -immediate -allowGacDeployment -allowCasPolicies -force
-immediate - to all servers in the farm immediately.
-allowGacDeployment - if dlls needs to be copied to GAC
-allowCasPolicies - if solution has CAS policies.
3. stsadm -o execadmsvcjobs
Executing all administrative timer jobs immediately instead of waiting for the timer job to run
Thursday, October 30, 2008
%~dp0 SharePoint 2007 Visual Studio Extensions setup.bat
Have you seen "set PackageFile=%~dp0" preceeding the sharepoint solution name in setup.bat?
%~dp0" macro resolves to the fully expanded path to the directory containing the batch file.
This allows batch files to run regardless of the current working directory.
%~dp0" macro resolves to the fully expanded path to the directory containing the batch file.
This allows batch files to run regardless of the current working directory.
Labels:
%~dp0,
setup,
sharepoint
Thursday, October 23, 2008
How to replace files in Sharepoint Solution wsp file
- Change the .wsp extension to .cab ( eg. mySol.wsp to mySol.cab )
- Open with winzip and Extract to a directory eg. c:\kopperla\Ext
- Repace the files that you want to change.
- Download Microsoft Cabinet Software Development Kit (cabdsk.exe) from http://www.pixelsplasher.com/_downloads/software/Microsoft-Cabinet-SDK/
- Run cabdsk.exe and extract the files to a folder eg. c:\koppela\cabdsk
- From the command prompt cd c:\kopperla\cabdsk\bin
- Run the following command
- cabarc -r -p -P "kopperla\Ext\\" n mySol.wsp c:\kopperla\Ext\*.*
- The new solution mySol.wsp is created in c:\kopperla\cabsk\bin directory.
Friday, September 26, 2008
Moss custom master page Best Practices
Do not change the default.master
Even the OOTB master files are installed as feature - PublishingLayoute feture.
Use Sharepoint Designer to change the default.master, .css files and images to your requirement. Do not save in Desinger. Open any editor, and copy from SPD and save.
Use the copy of PublishingLayout feature deleting the unwanted files and copy your master page, .css and images.
Create a .wsp solution file( Use tools - stsdev or wspbuilder )
Although we can copy the new master feature manually and activate, deploying as a solution will releive you from the pain of copying into each WFE in the farm.
Even the OOTB master files are installed as feature - PublishingLayoute feture.
Use Sharepoint Designer to change the default.master, .css files and images to your requirement. Do not save in Desinger. Open any editor, and copy from SPD and save.
Use the copy of PublishingLayout feature deleting the unwanted files and copy your master page, .css and images.
Create a .wsp solution file( Use tools - stsdev or wspbuilder )
Although we can copy the new master feature manually and activate, deploying as a solution will releive you from the pain of copying into each WFE in the farm.
Subscribe to:
Posts (Atom)