It’s very common to use object data source to bind the grid , formview etc but the problem is Assembly registration in web.config specially in multi server farm.
In order to avoid the registration of your assembly in web.config file just follow two simple steps as mentioned below.
In your UserControl ASCX file add assembly directive
<%@ Assembly Name=”ILX.MKS.Business, Version=184.108.40.206, Culture=neutral, PublicKeyToken=123a45b9c456789″ %>
In object data source give fully qualified type Name like below
TypeName=”ILX.MKS.Business.UserRegistration, ILX.MKS.Business, Version=220.127.116.11, Culture=neutral, PublicKeyToken=123a45b9c456789″
There are pros and cons of the above option, this is helpful if you do not want to touch the web.config file, otherside is if you maintain in web.config then will be central location to maintain
the assembly reference.
How to display custom user field in search result .
This includes two steps field definition and create a managed metadata property.
1. Field Definition
2. Before creating managed property add some data to the field may be in your
documents library or custom list etc… and then crawl the search , once
your property is propagated then create managed property.
Now re crawl your search and the perform search based on user name.
This Powershell code snippet upload xsl file into style library.
if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )
$webUrl = “http://MKS”
function UploadFile( [String] $FilePath)
#Open web and library
$web = Get-SPWeb $webUrl
$file =Get-Item $FilePath
write-host “Started Uploading File……”$file.FullName
$fileStream = ([System.IO.FileInfo] (Get-Item $file.FullName)).OpenRead()
$folder = $web.getfolder(“Style Library”)
$web.GetFile($folder.Url + “/XSL Style Sheets/” + $file.Name).CheckOut()
$spFile = $folder.Files.Add($folder.Url + “/XSL Style Sheets/” + $file.Name, [System.IO.Stream]$fileStream, $true)
$spFile.CheckIn(“Checkin by Powershell”)
$spFile.Publish(“Published by Powershell”)
write-host $webUrl”/”$folder.Url”/XSL Style Sheets/”$file.Name
write-host “Successfully Copyied file ” $file.Name
UploadFile -FilePath “C:\***.xsl”
One of the annoying error in FAST 2010 when you clicks on the manage property
it blows up and throw error..
Unexpected error occurred while communicating with Administration … ThreadAbortException : Thread was being aborted. at System …
To avoid this type of error just need to make the deployment and configuration
clean from the beginning.
1. Create a domain user give that user sufficient Administrative privileged.
2. Go to SQL Server give permission to create database permission or
add it in serveradmin role.
3. Login with newly created user and run the FAST setup.
4. After that run the FAST Configuration wizard.
5. Go to Active directory and verify “FASTSearchAdministrators” group and
the members inside.
6.Install the certificates and follow the instruction.
7. run the command [nctrl status] verify if services are running
if not running then start it using powershell command or from services.
8. Go to central admin create Search Query and Connector and give permission.
Sometime while deploying package using powershell script it works fine and also activates
the feature, but any feature receiver event does not fire.
To solve this issue:-
Try to close the powershell command window and open new powershell window.
and then run the deployment script once again and this worked for me.
This is common Webpart deployment error
Some time after deploying the wsp package containing webpart doesnot work properly.
When tried to add into the webpart it throws error:-
The operation could not be completed because item was removed from the gallery
To solve this problem go to webpart gallery delete the webpartentry from the gallery and then deactivate and activate the webpart feature.
In order to fix error “Property doesn’t exist or is used in a manner inconsistent with schema settings“ ,
1. Double check the data-type of any newly created Managed Property with respect to the crawled property.
2. Start full crawl the content source and verify if search started working properly.
3. In case search result still shows the same error, then run the following command in FAST Powershell , followed by full crawl, read.
nctrl restart qrserver