Sunday, December 11, 2011

The list cannot be displayed in Datasheet view

You cannot view a list in Datasheet view on a SharePoint website after you install the 64-bit version of Microsoft Office 2010. 

When you click Actions and then click Edit in Datasheet on a SharePoint 2003 or 2007 site, or you click the List tab and then click Datasheet view on a SharePoint 2010 site, you receive the following error message:

The list cannot be displayed in Datasheet view for one or more of the following reasons:
  • A datasheet component compatible with Microsoft SharePoint Foundation is not installed.
  • Your Web browser does not support ActiveX controls.
  • A component is not properly configured for 32-bit or 64-bit support.

This happens because  64-bit version of the Datasheet component is not available for Office 2010.
To resolve this issue download the office 2007 driver components by clicking here.

refer http://support.microsoft.com/kb/2266203 for more info on this issue.



Wednesday, December 7, 2011

STSADM with complete reference

MOSS CU / service pack versions

To check SharePoint version open central administration site--> Operations--> Servers in Farm

if your version is more than 12.0.0.6421 then it is SP2

12.0.0.6548 WSS 3.0 or MOSS 2007<sup>1</sup> SP2 + Oct 10 cumulative Update (KB2412268 + KB2412267)
12.0.0.6545 WSS 3.0 or MOSS 2007<sup>1</sup> SP2 + Aug 10 cumulative Update (KB2276474 + KB2276472)
12.0.0.6539 WSS 3.0 or MOSS 2007<sup>1</sup> SP2 + June 10 cumulative Update (KB983311 + KB983310)
12.0.0.6535 WSS 3.0 or MOSS 2007<sup>1</sup> SP2 + April 10 cumulative Update (KB981043 + KB981042)
12.0.0.6529 WSS 3.0 or MOSS 2007<sup>1</sup> SP2 + February 10 cumulative Update (KB978396 + KB978395)
12.0.0.6524 WSS 3.0 or MOSS 2007<sup>1</sup> SP2 + December 09 cumulative Update (KB977027 + KB977026)
12.0.0.6520 WSS 3.0 or MOSS 2007<sup>1</sup> SP2 + October 09 cumulative Update (KB974989 + KB974988)
12.0.0.6514 WSS 3.0 or MOSS 2007<sup>1</sup> SP2 + August 09 cumulative Update (KB973400 + KB973399)
12.0.0.6510 WSS 3.0 or MOSS 2007<sup>1</sup> SP2 + June 09 cumulative Update (KB971538 + KB971537)
12.0.0.6504 WSS 3.0 or MOSS 2007<sup>1</sup> SP2 + April 09 cumulative Update (KB968850 + KB968851)
12.0.0.6421 WSS 3.0 or MOSS 2007<sup>1</sup> SP2 (KB953338 + KB953334)
[Updated 1st Aug 09: SP2 download now includes the hotfix (KB971620) that corrects the activation issue more information on the Microsoft SharePoint team blog]

 If you are running SP1 after 13/Jul/2010 then you are running an un-supported environment,

12.0.0.6341 WSS 3.0 or MOSS 2007<sup>1</sup> February 09 cumulative Update (KB961755 + KB961756)
12.0.0.6335 WSS 3.0 or MOSS 2007<sup>1</sup> December 08 cumulative Update (KB960010 + KB960011)
12.0.0.6331 WSS 3.0 or MOSS 2007<sup>1</sup> October 08 cumulative Update (KB957691 + KB957693,KB958567 and KB958569)
12.0.0.6327 WSS 3.0 or MOSS 2007<sup>1</sup> August 08 cumulative update (KB956056 & KB956057)
12.0.0.6318 WSS 3.0 or MOSS 2007<sup>1</sup> Infrastructure Update (KB951695 & KB951297)
12.0.0.6303 WSS 3.0 or MOSS 2007<sup>1</sup> post-SP1 hotfix (KB948945)
12.0.0.6301 WSS 3.0 or MOSS 2007<sup>1</sup> post-SP1 hotfix (KB941274)
12.0.0.6300 WSS 3.0 or MOSS 2007<sup>1</sup> post-SP1 hotfix (KB941422)

12.0.0.6219 WSS 3.0 or MOSS 2007<sup>1</sup> SP1
12.0.0.6039 WSS 3.0 or MOSS 2007<sup>1</sup> October public update
12.0.0.6036 WSS 3.0 or MOSS 2007<sup>1</sup> August 24, 07 hotfix package
12.0.0.4518 WSS 3.0 or MOSS 2007<sup>1</sup> RTM
  

Error deploying solution, timer job stuck

Solution deployment timer job stuck and results in an error in WSP deployments.


Investigation steps..
·         Checked SharePoint services (including timer service) on all  boxes which I found to be running.
·         Opened central administration-->operations-->Servers in farm
·         Checked the version column and found that one of the WFE was having SharePoint version (12.0.0.6421) lower than other WFEs which were having version 12.0.0.6529.
·         Ran SharePoint Product technology wizard on the WFE having version 12.0.0.6421 and as expected, wizard failed to connect to SQL server due to schema version differences.
Problem resolution steps…
·         Disconnected the affected WFE from the farm.
·         Requested hotfix (http://support.microsoft.com/kb/978395  and http://support.microsoft.com/kb/978396 ) downloads from Microsoft website as installation of both these hotfix updates the SharePoint to the version which other WFEs were having.
·         Installed Office-kb978395-fullfile-x64-glb.exe and restarted the affected WFE.
·         Installed Wss-kb978396-fullfile-x64-glb.exe post the restart.
·         Ran the SharePoint product and technology wizard.
·         Post the successful completion of wizard checked the version (central administration-->operations-->Servers in farm)
·         Version of all WFE were same.

Wednesday, November 23, 2011

creating sequential workflow SP 2010

Create a sequential workflow using Visual studio 2010 in SharePoint 2010
Here we will discuss how to develop a sequential workflow using Visual studio 2010 in SharePoint 2010. Microsoft provides different project templates to work for SharePoint.
For this first open Visual studio 2010 and then File -> New Project.Then from the new project dialog box choose Visual C# and then Select SharePoint and from there select 2010 and Choose Sequential Workflow template and give a name in the Name box as shown in the figure below and click on OK.


In the next step provide the local debugging URL and you will able to only deploy as farm solution is selected
because you can not deploy a workflow as sandboxed solution. See the figure below

And click on next. In the next step give the name of workflow and select the type of workflow as shown in the figure below

In the next step select the list or library you want to attach the workflow and select where you want to show the history list you want to store as shown in the figure below (SequentialWorkflow_03.png).

The Workflow history list is used to store all events that occur while workflow is running.Here also you can check the check box if you want to automatic associate the workflow to the selected list or library. In the next step you can choose when you want to start the workflow as shown in the figure below.

Now your visual studio should look like the figure shown below

In the solution explorer there is one folder for Feature and one folder for Package. The package folder will hold the .wsp file when you package or deploy the project. Elements.xml: This file describes the workflow to SharePoint and it stores the name and description of the workflow, any forms that it uses, and other information.Workflow1.cs:These are the files that make up the activities and code for the workflow.
Now Drag and drop a CreateTask activity from the Toolbox to the Workflow designer, right below the onWorkflowActivated1 activity. There is a red mark in the activity which shows that we need to set a mandatory field in the workflow as shown in the figure below

Then go to the activity properties and give the corelationtoken.You have to use a unique correlation token for each task you are referencing in a workflow. And then expand the correlationtoken property and set the OwnerActivityName to Workflow1 as shown in the figure below


Now also the red mark removes. Then find the TaskID and click on ..., it will open the Bind dialog. The Bind dialog is used to link a workflow property to a field or property in the code-behind file. This can be either an existing member or you can choose to create a new one. Here Click Bind to a new member tab. Type “taskId” in the New member name textbox. Select Create Property radio button. Then click on OK as shown in the figure below

Next we need to do all these steps for TaskProperties property. In the next step double click on the CreateTask1 Activity ant will generate createTask1_MethodInvoking method. In this method, initialize taskId and taskProperties.
Here we will assign the task as shown below:
private void createTask1_MethodInvoking(object sender, EventArgs e)
{
taskId = Guid.NewGuid();
taskProperties = new SPWorkflowTaskProperties();
taskProperties.AssignedTo = "domainname\\username";
taskProperties.Title = "Task assigned from the sequential workflow";
}
After that F5 to deploy the web part, once the deployment finish go to the browser and click on the particular list. Click on the add new item and when you submit the form the breakpoint hits and when you will refresh a new item will be added to the list with name Task assigned from the sequential workflow.

Thursday, November 17, 2011

iFilter for AutoCAD DWG files

PDF ifilter configuration for MOSS 2007

configure pdf ifilter x64 SharePoint 2010


  • Install Windows Server 2008 following the SharePoint prerequisites (Pre-upgrade utility).
  • Install SharePoint 2010 with the complete option and run the PSconfig wizard. 
  • Configure required Server Farm Topology. In this example we use a Single Server Farm. 
  • Create a new Search Service application. 
Configure Adobe iFilter based on steps mentioned below:

  1. Install PDF iFilter 9.0 (64 bit) from http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025
  2. Download PDF icon picture from Adobe web site http://www.adobe.com/misc/linking.html and copy to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES\ 
  3. Add the following entry in docIcon.xml file, which can be found at: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML
    <Mapping Key="pdf" Value="pdf16.gif" />
  4. Add pdf file type on the File Type page under Search Service Application
  5. Open regedit
  6. Navigate to the following location:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\14.0\Search\Setup\ContentIndexCommon\Filters\Extension
  7. Right-click > Click New > Key to create a new key for .pdf
  8. Add the following GUID in the default value
    {E8978DA6-047F-4E3D-9C78-CDBE46041603}
  • Restart the SharePoint Server Search 14
  • Reboot the SharePoint servers in Farm
  • Create a Test site (with any out-of-box site template) and create a document library upload any sample PDF document(s).
  • Perform FULL Crawl to get search result.
Once the crawl is completed we will get search results.

NOTE: If this is a SharePoint Foundation 2010 environment additional steps will be required instead of step 4 above

Adding Searchable File Types to SharePoint Foundation 2010
http://support.microsoft.com/kb/2518465

PDF ifilter download link for x64 systems

Inplace Vs Gradual Upgrade SPS 2003 to MOSS 2007

In-place upgrade-:
An in-place upgrade takes place on the same hardware as your previous version installation. When you run an in-place upgrade, the process upgrades your entire installation in a pre-set sequence.

Gradual upgrade-:
Similar to an in-place upgrade, a gradual upgrade takes place on the same hardware that is used for your previous version installation. However, a gradual upgrade allows you to control when upgrade takes place for each individual site collection, and it also allows you to continue running the previous version and the new version side by side on that hardware. When you perform a gradual upgrade, the starting and ending topologies have the same configuration, similar to an in-place upgrade except for the following differences:
  • During and after upgrade, the front-end Web servers run both Windows SharePoint Services 2.0 and Windows SharePoint Services 3.0. Any upgraded site collections run under Windows SharePoint Services 3.0, whereas site collections that could not be upgraded or that were not selected for upgrade continue to run under Windows SharePoint Services 2.0.
  • During and after upgrade, both the Windows SharePoint Services 2.0 and the Windows SharePoint Services 3.0 databases are available. Content for upgraded sites is stored in the Windows SharePoint Services 3.0 databases; content for sites that could not be upgraded or that need to remain as they were continue to be stored in the Windows SharePoint Services 2.0 databases. Configuration databases exist for both Windows SharePoint Services 3.0 and Windows SharePoint Services 2.0.


In-Place Vs Gradual-:
I personally prefer gradual upgrade over in-place because of many reasons, out of which few are listed below...
  • Time saving-: gradual upgrade will allow you to see the upgrade and roll back if you need to. where as in case of in-place you will required to reinstall the version of sharepoint that needs to be migrated if something goes wrong while installation.
  • Reduced downtime-: Any mistakes (such as forgetting to run prescan.exe) or failures (running out of disk space) could result in extended downtime or expense.
  • Both versions of SharePoint will run in parallel on the same machine on different ports.
  • In-place more complex than gradual-: With my experience I found that in-place was more complex as against the recommendation from Microsoft.
Few recommendations-:
  • Prior to migration make sure all the webpart dll have been recompiled using framework 2.0 as MOSS runs on .net framework 2.0 and SPS 2003 runs on .net framework 1.1.
  • All html tag errors like unclosed tags should be fixed prior to migration else post migration you will see the file not found errors.
  • Plan for site upgrade in prior to migration for example-:site groups from SPS 2003 will become permission levels in MOSS 2007.
  • Extra considerations need to taken care if the migration is happening for 64 bit farms.






Last log entry not getting updated (User profile & properties)

Why this happens :

- Profmain.aspx calls importStatus.LastCrawlSeedStatus to determine if an error occurred during the last profile import.
- If the LastCrawlSeedStatus value is not 0, it checks importStatus.LastLogEntry and provides the text message from the log
- LastCrawlSeedStatus is a property of the content source People_Import (Hidden Content Source)

- If the registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Applications\<GUID>\Gather\ProfileImport\ContentSources\0\StartPages\0

- Or if the registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Applications\<GUID>\Gather\ProfileImport\ContentSources\1\StartPages\0

- If the value to anything other than 0, signifies the crawl error.
- The search account should have full control on this registry key
- The SSP account should have read access to this key.

How to Fix it :-

- Open the registry on the indexer server

- Checke the value of "lastCrawlSeedStatus" in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Applications\<GUID>\Gather\ProfileImport\ContentSources\0\StartPages\0

- And checke the value of "lastCrawlSeedStatus" in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Applications\<GUID>\Gather\ProfileImport\ContentSources\1\StartPages\0

- changed the value to 0
- Restart search service on Index server (better restart the server if you can due to too long waiting for stopping and starting the Office SharePoint Search Services)

All SharePoint Timer jobs stopped inspite of timer service running.

All SharePoint Timer jobs stopped inspite of timer service running.

One the causes which i have found is because of the SQL DB transaction logs getting full.

Best and low cost way of rectifying this is to schedule a sql job to shrink the log file on weekly/fortnightly basis.

Please find below the syntax for the same

SQL:
DBCC SHRINKFILE("MyDatabase_Log", 1)
BACKUP LOG MyDatabase WITH TRUNCATE_ONLY
DBCC SHRINKFILE("MyDatabase_Log", 1)

Tuesday, November 8, 2011

Charul Bhargava- SharePoint Home

Welcome to my blog site. You will find everything related to SharePoint here in this blog.