SharePoint Setup
Setting up Microsoft SharePoint™ for use with pcMobile depends on if you are only using Windows SharePoint Services™ (WSS) or the full Microsoft Office SharePoint Server™ (MOSS).
Installing SharePoint Connector
The installation of the Sharepoint Connector is simple. The installation uses the stsadm tool to install, this the standard way to deploy web part assemblies into SharePoint.
What is installed?
The following files are installed when the .cab file is installed.
File | Folder |
---|---|
DecisionSupportPanel.pcMobile.WebParts.dll | GAC (C:\Windows\Assembly) |
[uid]_Canvas.webpart | [IIS Virtual Directory]\wpcatalog |
[uid]_List.webpart | [IIS Virtual Directory]\wpcatalog |
The web.config file is modified, the following is added:
<SafeControl Assembly="DecisionSupportPanel.pcMobile.WebParts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=4e98b37828e9cbce" Namespace="DecisionSupportPanel.pcMobile.WebParts" TypeName="*" Safe="True" />
Installation Procedure
This section describes how to install and uninstall the SharePoint Connector (Web Parts). The installation files for the SharePoint connector will be found in the (C:\Program files)\pcMobile\tools\Sharepoint connector directory on the pcMobile Server. The SharePoint connector should be installed on your SharePoint server.
1. Install .cab File
To install the DecisionSupportPanel.pcMobile.WebParts.cab on the SharePoint server the Stsadm command-line tool is used. For detail information about the tool go here.
Make sure you have the right permission to run stsadm. Stsadm runs in context of logged in user and must have service account level permissions on SQL to run commands.
The commands to install using stsadm is included in the Install.bat file.
To install just run Install.bat on the SharePoint machine, make sure stsadm reports success.
The command to install the .cab file is:
stsadm.exe -o addwppack -filename [path]DecisionSupportPanel.pcMobile.WebParts.CAB -force -globalinstall
The default installation path for the Stsadm tool is “Program Files\Common Files\Microsoft Shared\web server extensions\[12|14]\BIN\”
12 = MOSS 2007, WSS 3.0
14 = MOSS 2010, MSF 2010
2. Configure web.config
Instruction below valid from version 5.0.20
The web.config file is the place where you specify configuration options. There is a web.config file for each extended virtual server. How to find the correct web.config file go here. The .cab installation automatically add the following entry to the web.config file for all existing virtual servers:
<SafeControl Assembly="DecisionSupportPanel.pcMobile.WebParts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=4e98b37828e9cbce" Namespace="DecisionSupportPanel.pcMobile.WebParts" TypeName="*" Safe="True" />
This entry is necessary for the Web Part assembly to run. In the SharePoint environment, no web part assembly without this entry will be able to render. Trying to add a web part to a page without a safe registered assembly will generate an error in the page. The web.config is also used to configure the following:
1. If not already exists add following elements to the <configSections> section (please make sure removing line breaks within tags).
<sectionGroup name="pcMobile"> <section name="webPart" type="DecisionSupportPanel.pcMobile.WebParts.Configuration, DecisionSupportPanel.pcMobile.WebParts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=4e98b37828e9cbce" /> </sectionGroup>
2. Add following xml elements to the <configuration> section (please make sure removing line breaks within tags).
<pcMobile> <webPart> <services> <add name="Ex1" url="http://mypcserver:81" /> <add name="Ex2" url="http://mypcserver:82" cache="true" authenticate="false" /> </services> </webPart> </pcMobile>
If more than one service is specified you will be able to select which service a web part should use when configuring the web part.
3. Configure the values for the settings (xml elements).
Setting | Description | Mandatory | Default |
---|---|---|---|
Name | The name of service, this name is shown when selecting service in the webpart | X | |
url | Configure the url to the pcMobile system, examples: http://localhost (if running on port 80 on the same server) or http://canvasserver:56100 (if running on port 56100 on server called canvasserver) | X | |
cache | When value is True queries to the pcMobile system is cached for improved performance, set to False for example during development to make sure changes are reflected immediately | true | |
authenticate | When value is true the request to the pcMobile system is authenticated and when the data (exampel ViewPoints) is filtered on the logged in Sharepoint user. Set value to false if pcMobile is configured with anonymous access, then all users will see the same data. | true | |
username | Username used for the request to the pcMobile system service, need to be configured if the pcMobile system is configured with basic authentication. | ||
password | Password used for the request to the pcMobile system service, need to be configured if the pcMobile system is configured with basic authentication. | ||
nonauthenticateduser | Normally not used. Username passed to pcMobile system when the authenticate flag is false. | anon |
3. Configure Security in pcMobile
The account running the application pool for the SharePoint site needs access to the pcMobile Server, to get Cavnases etc. For information about security configuration in pcMobile Server go here: Security models
To view which account is running the application pool for SharePoint you can use Internet Information Manager.
If you are running version 2010 of SharePoint you can use the SharePoint 2010 Management Shell tool to view the application pool account by running the following command:
Get-SPWebApplication | %{$_.Name + " " + $_.ApplicationPool.Name + " " + $_.ApplicationPool.Username}
If the application pool is running under Network Service, it’s the computer account (example DOMAIN\COMPUTER$) that need to gain access to the pcMobile Server. The app pool account needs the View role in pcMobile.
4. Uninstall .cab File
The commands to uninstall using stsadm is included in the UnInstall.bat file.
To UnInstall just run UnInstall.bat on the SharePoint machine, make sure stsadm reports success.
The command to uninstall the .cab file is:
stsadm.exe -o deletewppack -name DecisionSupportPanel.pcMobile.WebParts.CAB
The default installation path for the Stsadm tool is “Program Files\Common Files\Microsoft Shared\web server extensions\[12|14]\BIN\” 12 = MOSS 2007, WSS 3.0 14 = MOSS 2010, MSF 2010