Creating site collection templates

[I’ve been meaning to update this post for quite sometime. Please don’t do this procedure even though it was documented in MSDN. If you do this when you create a site from this site template a lot of the functionality will be broken, eg workflows etc.  The only proper way to create your own site templates to create site collections from is by using custom site definitions (or copying and modifying an existing site definition).]

This guide shows how to create a site collection template that will appear on the create site collection screen from central admin or from the create site page if self-service site management is enabled.

  1. First create a site collection based on what ever template that you would like to start with for example the Collaboration / Team Site template. Customise the template to what you would like. For example create additional document libraries and set versioning.
  2. From the site settings, Look and Feel , Save site as template. Give it a file name, template name and description. Optionally choose if you would like any content that you have added to the template to be included.
  3. Once this is done it will create the template.stp in the site template gallery. Browse to this gallery and download the file. Once you have this file copy it to your sharepoint server. Also if you are going to re-use the template you might want to delete the template from the gallery and then delete it from both recycle bins in the site collection recycle bin.
  4. To add the template to central administration site templates you will need to use stsadm. I recommend that you add the path to the bin directory containing stsadm.exe to the system environment variables.

C:\source\site-templates>stsadm -o addtemplate -filename “project-simple.stp” -title “Project site – simple” -description “Project site template with a simple structure”

Operation completed successfully.

IIS must be restarted before this change will take effect. To restart IIS, opena command prompt window and type iisreset.

Deleting a template from the command line. Below is a code snipet of how to list the templates installed and then how to delete the template based on its title.

C:\source\site-templates>stsadm -o enumtemplates

IT Project Site – Language: 1033 – Site Template: _GLOBAL_#0 – Template Id: 1

C:\source\site-templates>stsadm -o deletetemplate -title “IT Project Site”

Operation completed successfully.

IIS must be restarted before this change will take effect. To restart IIS, open
a command prompt window and type iisreset.

C:\source\site-templates>

Advertisement
Posted in howto, sharepoint

When to use the Portal Site Connection

In the Site Settings – Site Collection Administration, there is an option for configuring the Portal site connection. I have always wondered what this was for and the online documentation does not really cover what it does.

A recent whitepaper from Microsoft,  ‘Information architecture in Office SharePoint Server’ (http://technet2.microsoft.com/Office/en-us/library/902bbfaa-d6cc-4e8b-a1f5-6215168f47681033.mspx ) does give a good example of how it might be used.

For our deployment I’ll show the following example. We will have a site collection for each project site. Each of these site collections will exist under a managed path called ‘/project/’. For those of you that are interested I am choosing to use site collections over subsites mainly as a method of keeping the content databases at a manageable size. (Our company has about 10,000 projects on the go at any point in time.) The disadvantage in this design is that site collections for projects can appear isolated and difficult to navigate back to the root site collection.

So on each site collection (I have added this to the site template) I have set the portal site connection to the root site collection home page. As you can see from the following image, in the top left hand corner it is showing a bread crumb trail back to the root site collection.

portal-sites-connection-1

The other way I could have provided a link back to the root site collection would be to add a link to the ‘Top Link Bar’ settings also under Site settings. This would provide an additional tab next to the ‘Home’ tab in the picture above. I think that the Portal Site Collection option is better as it provides a context of the root site collection being ‘above’ the project site collection and allows me to save the top link bar tabs for subsites of the project or links to other sites, servers, etc.

Posted in howto, sharepoint

List of web parts for WSS 3.0 and MOSS 2007

Just found a post on a list for all of the out of the box web parts. The post “To MOSS or not to MOSS, Web Parts may be the answer” is by Ian Morrish.

Posted in sharepoint

First exam done

So I sat the Microsoft 70-631 Configuring Microsoft Windows SharePoint Services 3.0 exam this morning and passed with flying colours.

I’d rate the exam as about a 3 out of 5 on the hardness scale.

if you’ve been working with sharepoint quite regularly and do a bit of reading on NLB you shouldn’t have any problems.

one down and one to go….  70-630 moss 2007 config exam is booked in for next thursday.

good luck to anyone else who is attempting these exams.

Posted in sharepoint

Configuring Large File Support

The follow large snippet was blatantly taken from Joel Oleson’s post on File Name, Length, Size and Invalid Character Restrictions and Recommendations.

I always forget these steps so I’m blogging it to my site so I don’t lose it again.

Configuring Large File Support

This snippet from an article on Configuring Large File Support in relation to some fixes in SP2 of WSS 2.0 relate very closely with your WSS 3.0 or MOSS farm when configuring your WFEs/farm to support large files.  You likely won’t find this documentation elsewhere.

From the article on office.microsoft.com:

The biggest change included in Windows SharePoint Services SP1 is the support for uploading large files. By default, the maximum size for uploading files is set to 50 MB. If you need to be able to upload larger files (such as when you use smigrate.exe to migrate a site between servers), you can change this setting to any value up to 2 GB (2047 MB).

To configure large file support you must increase the default upload size in SharePoint Central Administration. You may also need to perform the following additional actions (depending on your hardware configuration):

  • Tune the Microsoft Internet Information Services (IIS) connection timeout setting.

    The default timeout for connections in IIS is 120 seconds (2 minutes). Depending on your maximum file size and how long it takes for the file to be uploaded, you may not need to change this setting. If, however, IIS is timing out when you upload large files, you can change this property to ensure that larger files can be uploaded successfully.

  • Increase the default chunk size for large files.

    The large-file-chunk-size property sets the amount of data that can be read from server running SQL Server at one time. If you have a file that is greater than your chunk size (such as 70 MB when the chunk size is set to 5 MB), the file would be read in 14 chunks (70 / 5). The chunk size is not related to the maximum upload file size. The chunk size simply specifies the amount of data that can be read from a file at one time. By default, the large-file-chunk-size property is set to 5 MB. If you notice performance or scale problems on the client or server, then you may need to tune this setting to get the performance you are targeting. Note that if you raise the chunk size too high, the files might use up too much front-end memory and you may need to lower this setting.

  • Increase the maximum size limit for Web Parts.

    By default, the maximum size limit for a Web Part is 1 MB. If you need to accomodate large Web Parts, you can change this setting in the web.config file for your server or servers running Windows SharePoint Services.

Increase the maximum upload size
  1. Click Start, point to All Programs, point to Administrative Tools, and then click SharePoint Central Administration.
  2. Under Virtual Server Configuration, click Configure virtual server settings.
  3. On the Virtual Server List page, click the virtual server you want to change.
  4. On the Virtual Server Settings page, under Virtual Server Management, click Virtual server general settings.
  5. Under Maximum upload size, type the maximum file size (in MB) that you want to allow to be uploaded.
  6. Click OK.

If IIS is timing out when you upload large files, you can configure the Connection timeout setting in IIS to allow more than the default 120 seconds (2 minutes).

Tune the IIS connection timeout
  1. Click Start, point to All Programs, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
  2. Right-click the virtual server you want to configure, and then click Properties.
  3. Click the Web Site tab.
  4. In the Connections section, in the Connection timeout box, type the number of seconds you want IIS to wait before timing out.
  5. Click OK.
Increase the default chunk size for large files

The large?file?chunk?size property must be set from the command line. This property is configured for a server or server farm, and cannot be configured for an individual virtual server. To set this property, use the following syntax:

Stsadm.exe ?o setproperty ?pn large?file?chunk?size ?pv <size in bytes>.

After making a change to this property, you must restart IIS. You can restart IIS by typing iisreset on the command line.

Increase the maximum limit for Web Parts

This change is required only when working with large Web Parts. The maximum limit for Web Parts is set to 1048576 bytes by default.

  1. On your server computer running Windows SharePoint Services, open Notepad.
  2. In Notepad, navigate to the %HomeDrive%\Inetpub\wwwroot folder and open the web.config file.
  3. Locate the PropertySize attribute in the configuration\SharePoint\WebPartLimits element.
  4. Change the PropertySize attribute to the maximum size you need.
  5. Save and close the web.config file.

Large file support limitations

The following features do not support files larger than 50 MB:

  • Virus checking. (Joel: I do believe this is the case.  It’s true as well that files over 16MB by default are not indexed, this can be changed.)
  • Picture libraries (Joel: really?)
  • Streaming files (Joel: We don’t support streaming files anyway do we?  Love for someone to explain this one.)
  • Site templates (limit of 10 MB Joel: Only in WSS 2.0, this is deafult and can be increased in WSS 3.0).

This KB “Error message when you try to upload a large file to a document library on a Windows SharePoint Services 3.0 site: “Request timed out”” has some great info on configuring the server to allow larger file sizes and increasing the time out limits.  Caution!  Whenever you increase timouts, you are essentially increasing the length of sessions and you’ll have more concurrent sessions. 

Increase the maximum upload size
1. Click Start, point to All Programs, point to Administrative Tools, and then click SharePoint Central Administration.
2. Under Virtual Server Configuration, click Configure virtual server settings. On the Virtual Server List page, click the virtual server that you want to change.
3. On the Virtual Server Settings page, under Virtual Server Management, click Virtual server general settings.
4. Under Maximum upload size, type the maximum file size in megabytes that you want, and then click OK. You can specify a maximum file size up to 2,047 megabytes.

Increase the connection time-out setting
By default, the IIS connection time-out setting is 120 seconds. To increase the connection time-out setting, follow these steps: 1. Click Start, point to All Programs, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
2. Right-click the virtual server that you want to configure, and then click Properties.
3. Click the Web Site tab. Under Connections, type the number of seconds that you want in the Connection time-out box, and then click OK.

Add the executionTimeout value
1. Use Notepad to open the Web.config file.

By default, this file is in the following location:
Program Files\Common Files\Microsoft Shared\Web server extensions\12\TEMPLATE\LAYOUTS
2. Add the executionTimeout value that you want. For example, replace the value as follows.

Existing code
 <location path=”upload.aspx”>
    <system.web>
      <httpRuntime maxRequestLength=”2097151″ />
    </system.web>
  </location>
Replacement code
 <location path=”upload.aspx”>
    <system.web>
      <httpRuntime executionTimeout=”999999″ maxRequestLength=”2097151″ />
    </system.web>
  </location>
3. After you change the file, click Save on the File menu.
4. Use Notepad to open the Web application Web.config file. By default, this file is in the following folder:
Inetpub\wwwroot\wss\VirtualDirectories\VirtualDirectoryFolder
5. Change the following line in the file.

Existing line
<httpRuntime maxRequestLength=”51200″ />
Replacement line
<httpRuntime executionTimeout=”999999″ maxRequestLength=”51200″ />

6. After you change the file, click Save on the File menu.
7. Exit Notepad.

From Joel Oleson’s SharePoint Land

Posted in howto

Sharepoint search crawl problem

Just found this post on Mike Hanley’s blog regarding the sharepoint search crawl not stopping due to a problem with the SQL database maintenance plan.

Basically the plan will recreate the indexes without the ‘allow duplicate keys’ ticked.

Microsoft have also posted a KB on this.
http://support.microsoft.com/default.aspx/kb/930887/en-us

Posted in Database, Search

Just another sharepoint blog……………….

Well Joel Oleson threw down the challenge, that if you read sharepoint blogs, you should do your own sharepoint blog and after reading his post on “The Revolution” and his followup post on how to create a blog, I have joined

I have learned so much about sharepoint and found so many solutions from other bloggers, it was time to start my own blog. 

I’ve posted a couple of articles already but mostly they are just links and snippets from other posts on info that I know I will need again and that I dont wont to loose, especially since the quality of documentation for sharepoint is a little lacking at the moment for the more complex operations.

As a teaser about a month ago I completed a setup of MOSS2007 excel web services publishing SQL2005 analysis services using a pivot table. This required kerberos to complete. That is the painful part. It is not very well documented and we had a case open with microsoft PSS for 3 weeks of solid work to solve it. Over the next week or so I will find some time to document all the steps and make a how to guide for this.

I hope that you enjoy my blog and find it helpful.

Thanks,
Gavin

Posted in blogs