Thursday, April 22, 2010

.WMV Documents are not visible after uploading in Doc lib in Sharepoint 2007

Environment: Sharepoint 2007 x64bit
IIS 7.0
Windows server 2008 SP2

When we try uploadig documents in sharepoint 2007 doc lib, it was giving me error due to big file size.
After research got the technet article as which says that we need to do changes in web.config file for that web application along with settings in IIS related to connection timeout.

Increase the maximum upload size

Click Start, All Programs > Administrative Tools, and then click SharePoint Central Administration > click Application Management.
Under SharePoint Web Application Management > Web application general settings.
On the Web Application General Settings page, click the Web application that you want to change.
Under Maximum upload size, type the maximum file size in megabytes that you want, and then click OK.

Increase the connection time-out setting

By default, the IIS connection time-out setting is 120 seconds. To increase the connection time-out setting in IIS 7.0 , follow these steps:
Click Start, point to All Programs, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
Selecet the site for which you want to imcrease the connection time out settings > on right had side, click advanced settings
Under Behavior, click on the + sign for connection limit and edit the connection time out settings (seconds) to 360(as per required).

Add the executionTimeout value

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
Add the executionTimeout value that you want. For example, replace the value as follows.

Existing code (Note: remove -- from the tags)
<--location path="upload.aspx">
<--httpRuntime maxRequestLength="2097151" />

Replacement code (Note: remove -- from the tags)

<--location path="upload.aspx">
<--httpRuntime executionTimeout="999999" maxRequestLength="2097151" />

After you change the file, click Save on the File menu.
Use Notepad to open the Web application Web.config file. By default, this file is in the following folder:


Change the following line in the file.

Existing line (Note: remove -- from the tags)

<--httpRuntime maxRequestLength="51200" />

Replacement line (Note: remove -- from the tags)

<--httpRuntime executionTimeout="999999" maxRequestLength="51200" />

After you change the file, click Save on the File menu.
Restart the site from IIS and try uploading the required .wmv file
You will be surprised to see that there was no error and it seems as if the file got uploaded.
What is this!!!!!

When you browse to that document library, you will be surprised to see that the file is not there :(

Yes... this is where we need to do some more changes in web.config file for IIS 7.0 users
The changes are as follows:

Adjusting File Size Limit in IIS 7

The problem is that in IIS 7 on Windows 2008 Server, the web application will reject any file that is larger than 30 MB. You can increase the maximum file size by adding the following code to in the web.config file:
(Note: remove -- from the tags)

<--requestLimits maxAllowedContentLength=”2000000000″ />

and inplace of the

<--httpRuntime executionTimeout="999999" maxRequestLength="51200" />

that we changed earlier, we need to increase the value to '2000000000' from '51200'

<--httpRuntime executionTimeout="999999" maxRequestLength="2000000000" />

With the above maxAllowedContentLength and Max RequestLength, users can upload files that are 2,000,000,000 bytes in size. This setting will work right away without restart IIS services.

Friday, April 9, 2010

Enabling Barcodes for Library or List

Configure Barcoding system (Barcode) in SharePoint for Document libraries and Lists.

Note:- We can configure the Barcodes for only Document and List libraries in SharePoint 2007
Barcoding is configured for unique identification of Physical assests in the company. SharePoint generates the Unique Barcode values automatically out of the box.

Steps to Enable the Barcode Policy at Site Collection level.
1. Browse to the site where you need to configure Barcodes.
2. Click Site Actions -> Site Settings -> Modify All Site Settings -> Site Collection Policies
3. Click on Create to create the Policy
4. Enter the desired Name and Policy Statement
5. Select the Enable Barcodes checkbox -> Click OK

The Site Collection Policy will be created, now we need to activate this policy for a library or list. The steps are same for both. It needs to be activated at the Content Type level.

Steps to Activate the Policy to a List
1. Browse to the List -> Select Settings -> List Settings -> Advanced Settings -> "Yes" for Allow Managment of Content Types -> OK
2. Click on the Content Type (by Default Item will be shown) -> Select Information Managment Policy Settings -> Select Use a Site Collection Policy -> from drop down, the one we created in above steps -> Click OK

Now when you start Adding items using the Content Type to which the Policy was applied, Barcodes will be generated. Modify the View to show the columns "Barcode" and "Barcode Value"

Total Pageviews