Monday, May 23, 2011

[Forward]Silverlight Developer Runtime not installed. Silverlight 4

I keep running into issues with Silverlight not thinking it is installed. I combined this with always have the consumer edition of Silverlight installed on and not the Developer edition.
Add to the fact that finding the Developer edition is near impossible unless you read the fine print on the Silverlight page.
Here is the link to download the Silverlight Developer Runtime from Microsoft. I put this here for my convenience more than anything.
You can also go here: http://www.silverlight.net/getstarted/ and hit CTRL + F and type windows developer runtime.
EDIT: I have noticed a large number of people hitting this page. Well, let me help you guys out a little more. It turns out that EVERY time Microsoft decides to update the Silverlight runtime. A patch, string change, someone looked at it wrong, the Developer runtime gets invalidated.
You will need to reinstall it each time. So make sure you keep it handy! Thanks Microsoft for such a wonder feature. I love reinstalling things every week.
Happy Coding!
---------------------------------------
From: http://brianseekford.com/index.php/2010/07/01/silverlight-developer-runtime-not-installed-silverlight-4/

Wednesday, May 18, 2011

Profile page access exception troubleshoot

As I mentioned in the last post, the profile page may not be able to access with the following error message:
In this case, I would say it should be an authentication issue. To resolve it, we should understand the BCS modes. Please look at the following table
Name SPD Model
Pass Through User’s Identity PassThrough
SSO (Windows) Impersonated Custom/Windows Identity RdbCredentials / WindowsCredentials
Revert To Self BDC Identity RevertToSelf

Let's go through them one by one to get a general idea quickly.
1. Pass Through: authenticate to the external system with the same credentials that were used to authenticate to SharePoint. Kerberos supports only. It will not function by default in NTLM, because NTLM does not allow for delegation of identity
2. SSO: we can use the credentials in Secure Store to sign you in again on the server.
3. Revert To Self: Using Revert To Self means to connect to the external system as the IIS application pool that is servicing the request. Because the application pool of a SharePoint farm is a very highly privileged account, it is not a recommended security practice to use Revert To Self in deployment environments.

All right! We already knew what they stand for currently. Let's focus on how to resolve our issue.
----------------------------------------------
Okay. Based on BCS modes, we have three solutions.
1. Use Kerbero authentication. I haven't try this one.
2. Use SQL Authentication and save the credential into Secure Store service application (Recommend)
For this solution, you can refer to Laura Rogers's post
http://www.sharepoint911.com/blogs/laura/Lists/Posts/Post.aspx?ID=90
The only one point you need to notice is the SQL Server user must have the SQL Authentication permission

3. Use Revert to Self mode.
    a. Click Start -> All Programs -> Microsoft SharePoint 2010 Products -> SharePoint 2010 Management Shell
    b. In the opening window, enter the following commands
        $bdc = Get-SPServiceApplication | where {$_ -match "Business Data Connectivity Service"}
        $bdc.RevertToSelfAllowed = $true
        $bdc.Update()

    c. Restart your server

Monday, May 16, 2011

Searching a Database in SharePoint using BCS

Before we get starting on searching a database, we need to get a sample DB. In this case, I’m gonna use AdventureWorksDW2008R2 database. It can be downloaded from http://msftdbprodsamples.codeplex.com/releases/view/55926
I prefer to use the [DimProductCategory] and the [DimProductSubcategory] tables. Let’s look at the relationship between them.
--------------------------------------------------------------------------
Setup an External Content Type for DB
1. Click Start -> All Programs -> SharePoint -> Microsoft SharePoint Designer 2010
2. Click Open Site, enter your site collection URL and then click OK button
3. Click External Content Types from the left navigation, and then click the External Content Type from the ribbon -> New
4. Click the New external content type, enter a name, press the Tab button, the Display Name should be filled automatically. Finally, click the Click here to discover external data sources and define operations.
5. In the Operations Design View, Click the Add Connection button.
6. In the External Data Source Type Selection dialog, select SQL Server and then click OK button.

7. In the SQL Server Connection dialog, enter your Database Server, Database Name and keep selecting Connect with User’s Identity
8. Expand the AdventureWorksDW2008R2 Database -> Tables, find out the [DimProductCategory] table, right click it and then click the Create all Operations
9. In the All Operations dialog, click Finish button, you will see those operations in External Content Type Operations section.
10. Click Summary View from Views
11. From the Fields List, select the EnglishProductCategoryName and then click the Set as Title from the ribbon -> Field
12. Click the Save button and then close the SharePoint Designer
-------------------------------------------------------------------------------
Setup a content source and then crawl it
1. Go to your SharePoint 2010 Central administration, click Manage service applications -> <Your Content Application> -> Content Sources
2. Click New Content Source to create a new content source
3. Enter a new Name, select the Line of Business Data, select Crawl selected external data source and check the <your external content type>, and then click OK button to close the window
4. Go back to your Central Administration page, click the Manage service applications -> Business Data Connectivity Service


5. Select your new data source and the click Set Object Permissions
6. In the opening window, enter your domain user, click Add button, give all permissions to him/her and then click OK button.
7. Go back to your content source page, click the narrow down button, and then click the Start Full Crawl item
8. After the crawling finished, go to your FAST Search Center site, enter a keyword (Like Bikes) and the press ENTER button


 ----------------------------------------------------------------------
Create a Profile page to look at the query result
If you click the query result, you may get the following error. The reason is IE doesn’t know how to display the data with bdc3 protocol.
Fortunately, the BCS option support a nice feature names Profile Pages which we can use it to look at the query result.
1. Go to one of your site collection, click Site Actions -> New Site
2. Select the Blank Site, enter the title and the URL, then click Create button to create the site. Copy the URL.
3. Go to your SharePoint 2010 Central Administration, click Manage service applications -> Business Data Connectivity Service
4. In the Service Application Information page, click the Configure from the ribbon -> Profile Pages
5. In the opening window, paste the site URL to the text box and then click OK button
6. After the window closed, check your content type, and click the Create/Upgrade button from ribbon -> Profile Pages. Click OK button to finish the action.
7. After the creation completed, click the OK button to close the window.
8. Re-crawl your content source, after it competed, go to your FAST Search Center site, enter a keyword, you will get the result. Click the link, you will see the profile page.
Exception: If you are running into credential issue like:
Please refer to another article to resolve this issue.

Friday, May 13, 2011

Setup the Content Search Service Application and the Query Search Service Application in FAST Search for SharePoint

The Content Search Service Application allows you to crawl the data source in SharePoint and the Query Search Service Application allows you to query the crawling result in SharePoint. This article will show you how to setup them and then do a small test.
Before starting setup those service applications, you need to go to your FAST Search for SharePoint installation directory. Open the Install_Info.txt file. Because we need to get some information from it during the configuration.
-------------------------------------------------------------------------
Setup a Content Search Service Application
1. Open your SharePoint 2010 Central Administration, click -> Application Management -> Manage service applications
2. In the ribbon, click the New -> Search Service Application, you will get the Create New Search Service Application dialog
3. Enter a new search service application name, and then select FAST Search Connector. For the application pool, I suggest you create a new application pool for this service application. For the Content Distributors and Content Collection Name, you can get them from the Install_Info.txt file.
4. Click OK button and it will create the service application. After a few minutes, you will receive a success dialog.

5. click OK button to close the dialog.
6. Enable Configure SSL enabled communication
    a. Copy the script securefastsearchconnector.ps1 from the FAST Search Server 2010 for SharePoint administration server to the SharePoint Server 2010 server. The securefastsearchconnector.ps1 script is in the <FASTSearchFolder>, under installer\scripts\
    b. Copy the certificate file FASTSearchCert.pfx from the FAST Search Server 2010 for SharePoint administration server to the SharePoint Server 2010 server. The certificate file is in the <FASTSearchFolder>, under data\data_security\cert\

    c. Open a Microsoft SharePoint 2010 Management Shell with the Run as administrator option on the SharePoint Server 2010 server
    d. Navigate to the directory where you copied the securefastsearchconnector.ps1 script and run it, replacing the necessary parameters with the values for your environment. The domain and user name should reflect the details of the user running the SharePoint Server Search 14 (OSearch14) service. .\SecureFASTSearchConnector.ps1 –certPath "path of the certificate\certificatename.pfx" –ssaName "name of your content SSA" –username “domain\username”
     e. When prompted to enter the certificate password, enter the certificate password that you supplied when you ran the post-setup configuration of FAST Search Server 2010 for SharePoint.
 -------------------------------------------------------------------------------
Setup a Query Search Service Application
1. Open your SharePoint 2010 Central Administration, click -> Application Management -> Manage service applications
2.  In the ribbon, click the New -> Search Service Application, you will get the Create New Search Service Application dialog
3. Enter a Service Application name and then select FAST Search Query. There are two application pool settings. One is for Search Admin, the other is for Search query and site settings. You can select an existing one for them but I suggest you to create a new one for each of them.
4.  Click OK button to finish the creation. After a few minutes, you will receive a success dialog.

5. Click OK button to close the dialog.
6. Go back to your SharePoint Central Administration, click Application Management -> click Configure service application associations
7. Click the default link under Application Proxy Group
8. Check your FAST Search Query application you created just now, click the [set as default] button and then click the OK button below.
------------------------------------------------------------
Enable queries from SharePoint
1. Go to your SharePoint 2010 server, click Start -> All Programs -> Microsoft SharePoint 2010 Products -> right click SharePoint 2010 Management Shell, and select Run as administrator
2. Type the following commands in the opened Windows Power Shell Dialog. After that, you will get your certification file.
·         $stsCert = (Get-SPSecurityTokenServiceConfig).LocalLoginProvider.SigningCertificate
·         $stsCert.Export("cert") | Set-Content  -encoding byte MOSS_STS.cer
3. Copy this file to your FAST Search for SharePoint server
4. Go to your FAST Search for SharePoint server, click Start -> All Programs -> Microsoft FAST Search Server 2010 for SharePoint -> right click Microsoft FAST Search Server 2010 for SharePoint 2010 Shell, and select Run as administrator
5. At the Windows PowerShell command prompt, browse to <FASTSearchFolder>\installer\scripts\, where <FASTSearchFolder> is the path of the folder where you have installed FAST Search Server 2010 for SharePoint, for example C:\FASTSearch. Type the following command:
·         .\InstallSTSCertificateForClaims.ps1 -certPath <"full path of MOSS STS certificate">
--------------------------------------------------------------------
Setup a FAST Search Center site
1. Go to one of your SharePoint site collection. Click Site Action -> Site Settings
2. Click Site collection features
3. Active the SharePoint Server Publishing Infrastructure feature
4. Go back to the Site Settings, click the Manage site features
5. Active the SharePoint Server Publishing feature
6. Click Site Action -> More Options
7. Find out the FAST Search Center template, enter the name and URL. Click Create button.
8. Now, your FAST Search Center web site is ready to go.
--------------------------------------------------------------------
Setup a Content Source for crawling
1. Open your SharePoint Central Administration, click Manage service applications -> <your FAST Search for SharePoint Content Application>
2. Click the Content Source from the left pane.
3. Click the New Content Source
4. Type the Name, keep selecting SharePoint Sites, enter the SharePoint site you want to crawl, check the Start full crawl of this content source and then click OK button
5. After the crawling complete, go to your FAST Search Center web site, enter some words and then press Enter button. You will get the search result