Thursday 21 July 2011

Managed Properties in FAST

Problem: Create mapped managed properties in FAST (FS4SP) using PoweShell.
Initial Hypothesis:  You can create Managed Properties that are mapped to crawled properties using the UI thru CA.  However, for deployment thru environments it is better to script the mapped managed properties creation using Powershell.
Instructions:
1.> I created a Document Library that has extra columns for: Section, Appointment, Clinic & Hospital number as shown below.
2.> Ensure you have performed a "Full Crawl" on the Content SSA (FS4SP has 2 SSA in order for it to work, the content/index and the query SSA).
3.> PS to retriev the crawled property names, they will be at the bottom of the txt file created and are prefixed with "ows_".
4.> Find the crawled property name, this will be used in the next PS script that associates the crawled property with the managed property.  Open c:\cp.txt to see the crawled property name, this is usually at the bottom of the file.
5.> Use PS to 1) create a new managed property, 2) map the appropraite crawled property onto the managed property.
6.> Run the Full Crawl again thereby propulating the Managed Properties
7.> Check the managed properties in Central Admin (CA)
8.> Perform a search to ensure the managed property works i.e. clinic:CL123

Office Web Apps on a DC

Problem: Office Web Apps on a developer machine which has it's own domain controller.  Can view word documents in the browser, editing of docx files stangely works.

http://technet.microsoft.com/en-us/library/ff431687.aspx

FAST previews/thumbails need Office Web Apps running.

Summary: Install Office Web Apps pre AutoSPInstalller is run.  Then activate in the autospinstaller.  Otherwise install the office web apps but only do the config of the web apps, don't run the SP config wizard.

Tuesday 12 July 2011

Adding FAST for SharePoint to PowerGUI

Problem: Add FAST for SharePoint 2010 intellisense support in PowerGUI.
Resolution: Open PowerGUI and add the FAST for SharePoint library.

Monday 11 July 2011

VS2010 Strongly Name key issue

Problem: Visual Studio 2010 using TFS2010 on multiple developer machines keeps erroring on all developers VM's after they get the latest code "cannot import the following key file" and mentions the sn key.

Resolution: On the projects properties > Signing > Click the drop down for "Choose a strong name key file:" Click the option, click "Cancel" button.  You are prompted with a dialog "enter password to enter file", add the keys password and select OK.  VS will stop erroring after you have done this once.

More Info: http://stackoverflow.com/questions/2815366/cannot-import-the-following-keyfile-blah-pfx-the-keyfile-may-be-password-protec

Building a WCF Web Service for InfoPath data

Problem: Create a WFC web Service to store an InfoPathForm

Initial Hypothesis:  Project consists of 3 parts: 1)SQL Server table for storing form data, 2)WCF web service for exposting the storage web service method and 3) consuming the Web Service using infoPath.

1) SQL Script to create the datbase table.  Once the table is available for storage we need to build the WCF web Service.
2) WCF web service:
2.1) Add the LINQ to SQL proxy (dbml file) to persist the data
2.2) Assign
2.3) Wire up the WCF WS
Edit as needed (apply business logic)
2.4) Expose the WCF thru an IIS website on your Dev machine (Create an IIS web site to host the WCF):
2.5) Publish the WCF using VS2010 as shown below to the local machine
Ensure the WCF service is available using the browser.

3) Consuming the WCF WS in InfoPath forms



How to Add a Service Reference?


1.> Ensure the WCF exists i.e. http://wcf-service/FormService.svc

2.> Generate the WCF proxy (VS > Right click the WFE project > Add Service Reference > Insert the url and save the WS reference)

3.> Copy the contents of the app.config bindings & endpoints elements into the web.config (this needs to be automated in the deployment script thru a configurable feature) Web.config is shown below:

4.> Call the WCF web Service (consumer)
WCFBanner.BannerClient ws = new WCFBanner.BannerClient();
WCFBanner.PatientBanner pb = ws.GetPatientBannerByPatientId("G3");
lit1.Text = "PatientId: " + pb.PatientId;
ws.Close();

Additional Info:
Comparing SharePoint InfoPath lists vs forms

Monday 4 July 2011

Web.config change

Overview: Change all the web.configs for all web applications on the farm except the Central Admin web application.

Tip: Use the id attribute as shown in the yellow box, it will ensure there are no duplicates created by reactivating the web.config.

Friday 1 July 2011

SP1 and SP2010 June 2011 CU

Overview:  There has been a lot of chatter on twitter about SP1.  I incorrectly installed SP1 on a dev machine and after reading "So what the Fuss? - Service Pack 1 and June 2011 CU for SharePoint 2010" from Spencer Harbar I thought I'd summerise the correct approach as detailed in Spencer's article.
Notes:
  • MS has released SP1 for SP2010 and June 2011 CU on the same day 27 June 2011. 
  • There are seperate downloads for SPF (SharePoint Foundation) and SPS (SharePoint Server) updates, you should install both.  Install the SPF update first followed by the SPS update.
  • June 2011 CU is not part of SP2010 SP1, only install the June 2011CU if directed by MS and wait a month to see the fall out regardless.
  • SP1 contains all CU updates including the April 2011 CU plus some other updates not in any CU.
From Spencer Harbor's blog regarding installation order "I approach the installation like this:
  1. SPF SP1
  2. SPF language packs SP1 (as needed)
  3. SPS SP1
  4. SPS language packs SP1 (as needed)
  5. OWA SP1 (as needed)
If it asks you to reboot, reboot once after the installs, not each time it asks. Then of course you run PSConfig on each server in the farm.".

As always test updates on your DTAP environment pre release onto production.

More Info:
http://blogs.technet.com/b/office_sustained_engineering/archive/2011/06/29/sharepoint-2010-sp1-and-the-june-cumulative-update-for-sharepoint-2010.aspx
New features added by SharePoint 2010 SP1
http://www.sharepointjoel.com/Lists/Posts/Post.aspx?ID=444
Patch SP2010 farms