Sunday, May 27, 2007

sharepoint storage statistcs and limitations

  • Under a managed path a Web Application can support up to 150,000 site collections (site collections are likely to be spread across multiple content databases).
  • 125 host header configuration site collections.
  • A single site collection storage requirements would exceed the recommended 100 Gb max content db size
  • Multiple site collections can share a content db but the db should not exceed 100Gb.
  • more than 100 managed paths would cause performance issues. If you copy a content database to another farm you must have the same managed paths in the other environment or else you will not be able to resolve the sites.

Monday, May 21, 2007

URL Redirections for sharepoint from IIS

Vanity URLs:

You can map a short URL(http://sales/) to a long URL(http://International/US/sales) from the IIS.


  1. Create a New Virtual Directory(site) with the short name you want(http://sales/)
    Keep all the default values in the wizard.

  2. After creating the new site, go back to the IIS and right click on the newly created Website(http://sales/) -> Properties -> Home Directory -> select the "A redirection to a URL" radio button -> type the big URL(http://International/US/sales).

Each time the user types http://sales/ in the browser, the application pool assigned in the IIS will get invoked and assigned as the resources. Thus wasting the part of application pool for an unwanted. Although you are done with the redirect, you may follow the below steps to utilize the resources to the best.



  1. Create a new Application pool in IIS.(right click on the application pools -> New)

  2. Name the application pool and complete the wizard.

  3. right click on the application pool created -> Properties -> Performance -> Shut down the worker process after being Idle for -> 1 minute.

  4. Go back to the Websites -> right click on the website redirect -> properties -> set the new application pool to be used.

Redirect from a Sharepoint Page:


If you want the user to automatically redirect to a new destination page(http://newserver/newsite/page2.aspx) from the old page (http://oldserver/oldsite/page1.aspx), you need write the following meta tag inside a content editor webpart on the page1.aspx.

Moss Redirect Content Type:


MOSS publishing pages by default have 'redirect' pages associated. If you see the 'New' toolbar menu on any publishing site's 'Pages' document library, you will find the redirect page. Create the page -> edit properties -> set the destination URL. you are all set.


This feature is not available in team sites.







Configuring the InfoPath Forms Services in sharepoint 2007

InfoPath Forms Services provides you with the ability to deploy your organization's forms to Microsoft Office SharePoint Server and enable users to fill out these forms using a Web browser

Custom form templates that contain form code, require full trust, or use a data connection managed by a server administrator must be approved and deployed by an administrator. Such form templates are called "administrator-approved form templates".

If a form template does not contain form code, require full trust, or use a data connection managed by an administrator, you can configure InfoPath Forms Services to permit users to deploy such form templates, called "user form templates," without administrator approval.

Configure the Admin approved InfoPath Forms Services at the Farm level:

Start -> Administrative Tools -> SharePoint 3.0 Central Administration
-> Application Management -> InfoPath Forms Services -> Configure InfoPath Form Services
-> User Browser-enabled Form Templates section:



  • Select the Allow users to browser-enable form templates check box to allow users to deploy browser-enabled form templates.
  • Select the Render form templates that are browser-enabled by users check box to allow browser-enabled form templates deployed by users to be rendered in a Web browser. If this option is not selected, users can still deploy browser-compatible form templates, but these form templates are not accessible through a Web browser.

Data Connection Timeouts Section:

  • Set the default data connection timeout. Can override to any value lesser than this from the code
  • Set the Maximum data connection timeout. Can override to any value lesser than this.

Data Connection Response Size Section:

  • Data Connection responses size exceeding the value specified here causes the error.

HTTP data connections Section:

  • If you hace SSL setup, then only select the Require SSL for HTTP authentication to data sources box.

Embedded SQL Authentication section:

  • select the Allow embedded SQL authentication box to allow forms to use embedded SQL credentials. Forms that connect to databases may embed SQL user name and password data in the connection string. The connection string can be read in plaintext in the universal data connection file associated with the solution, or in the solution manifest.

Authentication to data sources (user form templates) section:

  • select the Allow user form templates to use authentication information contained in data connection files box to allow user form templates to use embedded authentication information such as an explicit user name and password or a Microsoft Single Sign-On application ID.

Cross-Domain Access for User Form Templates :

  • select the Allow cross-domain data access for user form templates that use connection settings in a data connection file box to allow user form templates to access data from another domain. By selecting this, we can bind a contol on the form located in Site A to a sharepoint list column located on the Site B.

Thresholds section:

  • specify the thresholds at which to end user sessions and log error messages. Form operations that exceed these thresholds will terminate the user session, resulting in the loss of all form data entered during the session, and generate an error message.
  • In the Number of postbacks per form session state box, type the maximum number of postbacks you want to allow. The default value is 75.
  • In the Number of actions per postback box, type the maximum number of actions per postback you want to allow. The default value is 200.
Form session state:



  • All the default settigns would work most senarios. To learn more about this sessions, see my blog 'Understanding InfoPath session state'.
  • In the Active sessions should be terminated after text box, type the maximum session duration in minutes. Form-filling sessions that exceed this value will terminate, an error message will be generated, and all form data entered during the session will be lost. The default value is 1440 minutes.
  • In the Maximum size of form session state text box, type the maximum session state size in kilobytes. Form-filling sessions that exceed this value will terminate, an error message will be generated, and all form data entered during the session will be lost. The default value is 4096 kilobytes.
  • In the Select the location to use for storing form session state section, choose
    Session State Service (best for low-bandwidth users)
    Store session state data on the computer running Microsoft SQL Server

    Form view (reduces database load on server)
    Store session state data on the client computer. If form session state is larger than the value specified in the associated text box, the Session State Service will be used instead.
  • In the associated text box, type the session state size in kilobytes at which form view will be automatically transitioned to the Session State Service. Once this threshold is reached, session state data will be saved to the SQL Server database, and the session will continue to use the Session State Service. The default value is 40 kilobytes.
Click OK.

Till here we are done with the Farm level configurations.
Now, lets look at the
Site Collection/Site level config:

Now that you have done with the fam level setttings, activate the 'Office SharePoint Server Enterprise Site features' feature in the sharepoint central admin and the site that you want to deploy the infopath form to be available.

Open the InfoPath form designer and design a form. Select the Browser settings in the form and apply full trust. In the publishing form wizard, check the 'Enable this form to be filled out by using browser' option that enables the 'administrator approved form template' radio button. Select the radio button and publish to a location where the fam admin can access on the file share.

Add the template to the central admin by uploading the .xsn file.

Now all we need to do is to to enable the form template available in the central admin to be available to a site collection.

Start -> Administrative Tools -> SharePoint 3.0 Central Administration -> Application Management -> InfoPath Forms Services -> Manage form templates
  • Select the form template you want to apply and click on 'Activate to a Site Collection'.
    (Check the default web application/site collection names. You can change the web app/site collection by clicking on the 'change' drop down and select the needed.
  • Now, we made the template available to the site collection.To activate a form template to a site collection, go to the site Actions - > Site Settings -> Site Collection Admin -> Site Collection Features -> Find the named template and click on 'Activate' button.
  • Now the form will be available in the 'Form Templates' library in the site collection.

Updating the administrator-approved form templates:

Each administrator-approved form template is uniquely identified by its embedded uniform resource name (URN). So each time you change/create an infopath form in the design mode and ty to upload in to the Farm level form templates, if the new template name is not matched in the exisiting old form templates, it will crate a new template and assigns a new URN(New form upload scenario). If any name matched, sharepoint compares the available template's URN with the new template's URN being uploaded.

  • If the New template URN is less than or equal to the Old emplate URN, the upload process will fail and error message will show the failure message.
  • If the New template URN > Old template URN
    You will have 4 options:

    Option 1. Allow existing browser-based form-filling sessions to finish using the current version of the form template.

    Option 2. Terminate existing browser-based form filling sessions. This approach is useful in the event that a form template is found to contain a serious bug or security issue, and you want to make the form template unavailable immediately.

    Option 3. Perform a gradual upgrade, in which you upload the new version as a separate form template, and eventually remove the old version when it is no longer being accessed by users. This is a useful approach when your form template is accessible as an embedded form or through a link on a Web page, and you are not concerned about the possibility of the old version being accessed during the upgrade process. With both form templates available on InfoPath Forms Services, you can modify the link to the form template on your Web page.

    Option 4. Quiesce the form template before upgrading to the new version. When you quiesce a form template, you gradually transition a form template from an active to an inactive state. This upgrade method is useful when you want to ensure that a form template cannot be accessed after a given time.

How to quiesce a form template:
SharePoint Central Administration -> Application Management -> InfoPath Forms Services -> Manage form templates.

  • In the Manage Form Templates page you will see a Status column. Form templates that are available to users will be designated as Ready.
  • Point to the file you want to upgrade, click the arrow that appears, and then from the menu select Quiesce Settings.
  • Type the number of minutes you want the quiescing process to take. On a production system, you should quiesce the form for at least as long as the session state is configured for the server. By default, session state is configured for 240 minutes.
  • Click Start Quiescing. In the Quiesce section, the status changes to Quiescing.
  • To see whether your form has successfully quiesced,
    Application Management tab -> InfoPath Forms Services -> Manage form templates.
    On the Manage Form Templates page, in the Status column, form templates that you have quiesced will be designated as Quiesced.
    After the form template is quiesced, you can deploy the upgraded new version of the form.


Ref:MSDN KB

Sunday, May 20, 2007

"Updating the Content Type Fialed" Error in Sharepoint

Situation:

While trying to re publish an Infopath form library encounter the error "Updating the Content Type Fialed".

Reason:

When you re publish an Infopath form template to the InfoPath form library, the template will call 'lists.asmx' webservice to convert the web enabled Infopath fields to a shrepoint form library. This web service was hard coded to expire in 30 seconds. Thus the time between the publish button click and error message "Updating the Content Type Fialed" will be 31 seconds.
This 30 seconds delay may be caused by many factors.

  1. So many columns being published to the form library.
  2. Poor network pace.
  3. Poor SQL server pace.
Fix

If you have Network/SQL server issues, catch the admin.
For library column contraint, follow this fix:

  1. Open the Infopath form template in a design mode.
  2. File -> Publish -> “To a SharePoint server” -> Destination library URL ->
  3. Next -> “Document Library” -> “Update the form template in an existing library” and choose the library from the list.
  4. This step is the trick.
    next screen, you’ll have the option to add your columns. When you click the “Add” button, instead of opting to have InfoPath create the column for you (i.e. the “None: Creat the new column” option), select the “This document library” option from the first drop-down, then select the appropriate column name from the second drop-down box .
    Initially you will not have the column name available in the drop down. You need to crate the desired column in the form library before you could start the step 1.

If you still have the error, remove some un wanted columns being published to the form library. That will reduce the publishing time.