Friday, December 23, 2011

Trying to configure FAST search and SharePoint Search to work on the same web application

I have been trying to run FAST search for my content and standard SharePoint Search for people search. I know FAST can do people search, but a third party application is forcing my hand.
I believe I have run into a wall as it appears that the OOTB search web parts do not allow you to pick one search over the other and the Configure Service Application Associations only lets you pick down to the granularity of the service application.
Incidentally, if I do not have FAST Search Query Service Application set as default in my Configure Service Application Associations, my FAST Search Center will return an error "The search request was unable to connect to the Search Service"

Oh well, time to give up and move on.

Monday, November 28, 2011

ec2-describe-instances filter definitions must have format 'name=value'

I wanted to get a list of my Amazon instances with a particular filter, so I tried something simple as suggested in the ec2-describe-instances documentation: 
ec2-describe-instances --filter "instance-type=m1.small"

However, this returns the following error:
Filter definitions must have format 'name=value', but found 'instance-type'

After a bit of frustration, I finally realized that you have to pass in the quotes in the argument. This means that you need to escape the quotes in Powershell like so:
ec2-describe-instances --filter "`"instance-type=m1.small`""

Thursday, November 17, 2011

PostSetupConfigurationTaskException - Failed to upgrade SharePoint Products

I just upgraded a SharePoint 2010 site from the RTM load to SP1 (KB2460045) + June 2011 CU (KB2536599). Running the Products Configuration Wizard (psconfig) ended with the following error:
Task upgrade has failed with a PostSetupConfigurationTaskException An exception of type Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException was thrown.  Additional exception information: Failed to upgrade SharePoint Products.

File that under useless error message.

Then I found this post: http://sharepoint.stackexchange.com/questions/16104/sharepoint-server-2010-sp1-psconfig-issue/21031#21031 which suggested to Run As Administrator on the Products Configuration Wizard. That worked.

Tuesday, November 15, 2011

Access is denied when crawling despite account having access - using basic authentication

I had just set up a content source and ran a full crawl of one of my sites. However, this is what I got in the crawl log:

Access is denied. Verify that either the Default Content Access Account has access to this repository, or add a crawl rule to crawl this repository. If the repository being crawled is a SharePoint repository, verify that the account you are using has "Full Read" permissions on the SharePoint Web Application being crawled

I doublechecked that my Default Content Access Account indeed has rights to the entire site by logging in from the server as that account and browsing around. I also had DisableLoopbackCheck set (don't worry, this is not a production machine).

So, I looked at the IIS logs to see what is going on. However, there were no access attempts recorded. Given that the machine is accessible I concluded that this was an authentication issue.

Then I came across this Crawl Rule configuration. If you go into Crawl Rules under your search service application's management screen you can set Crawl Configuration to "Include all items in this path". Then, the Specify Authentication section will become available. Pick "Specify a different content access account" and you can specify different login credentials, but can also uncheck "Do not allow Basic Authentication" (which was my problem).

(Oh, and if you go back to reading the error message, it does suggest creating a crawl rule).

Wednesday, November 9, 2011

PSSecurityException AuthorizationManager check failed on FAST installation

I just came across the following error when running the configuration wizard of the FAST installation:
Script execution failed System.Management.Automation.PSSecurityException: AuthorizationManager check failed.
It turns out that I had my Powershell ExecutionPolicy set to AllSigned instead of RemoteSigned.
Just the following simple command did the trick
Set-ExecutionPolicy RemoteSigned
Then I reran the wizard.

Friday, October 28, 2011

The located assembly's manifest definition does not match the assembly reference

I installed some WSPs and came across these errors when trying to add some web parts:
The located assembly's manifest definition does not match the assembly reference


Error replacing my site web parts. You may need to perform this task manually. Microsoft.SharePoint.ApplicationRuntime.SafeControls+UnsafeControlException: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe


There are many references to this everywhere. Typically this refers to a mismatch of a SafeControls directive in web.config and the actual DLLs loaded into the GAC, but in this case, they all match.

It turns out that my WSPs came from a ZIP file that was downloaded from the internet. As such, they were marked as unsafe. This caused DLLs to be marked as unsafe and were probably not loaded into the GAC properly. To work around this, unblock the zip file (or run streams to remove the blocks), uninstall the WSPs and then reinstall.

Monday, October 24, 2011

Changing welcome page without Publishing Feature enabled

I needed to change the welcome page on a site that did not have the Publishing feature enabled. Since that feature was not enabled, there was no Welcome Page option under Look and Feel. Rather than enabling and disabling the feature, I decided to do this through Powershell.

There are many references on how to do this including this forum post on "Change welcome page of a site collection using PowerShell"


$web = Get-SPWeb <my url>
$rootFolder = $web.RootFolder
$rootFolder.WelcomePage = "<my welcome page>"
$rootFolder.Update()

I tried to shorten it by doing the following
$web.RootFolder.WelcomePage = "<my welcome page>"
$web.RootFolder.Update()

Of course this didn't work because Update() will only work on an instance of RootFolder. It took me a while, but eventually I got it.