Showing posts with label Tip of the Week. Show all posts
Showing posts with label Tip of the Week. Show all posts

Wednesday, December 4, 2013

Get crawled property name for your column

 

I was desperately trying to find what is the crawled property name of my column scheduling end date. 

I stumbled across this helpful powershell

Function Get-CrawledPropertyNames([string]$DocURL){ 
$DocURL = $DocURL.Replace("%20"," ")
$webfound = $false
$weburl = $DocURL
while ($webfound -eq $false) {
    if ($weburl.Contains("/")){
    $weburl = $weburl.Substring(0,$weburl.LastIndexOf("/"))
    $web = get-spweb -identity $weburl -ea 0
    if ($web -ne $null){
        $webfound = $true
    }
    }else{
    Write-Host -ForegroundColor Red "The Web could not be found"
    return -1
    }
}
$web.GetFile($DocURL).item.xml.Replace("' ", "' `n").Replace("`" ", "`" `n")
} 

#To use enter the url of a file within a doucment library  Get-CrawledPropertyNames http://sites/doc/file.pdf

Got it from this link.

http://gallery.technet.microsoft.com/scriptcenter/Get-Crawled-Property-names-9e8fc5e0

Wednesday, June 19, 2013

Page cannot be displayed error while creating Web application

While creating a new web application, a 404 'Page not found' error is displayed and the web application is only provisioned on the local server

After a number of web applications have been created in the SharePoint 2010 farm, further attempts to create a new web application through Central Administration result in the following:

The creation process results in a 'Page cannot be displayed' message.

The web application is only provisioned on the Central Administration server.

But if you try to create a site collection on this newly created web app, it fails. Reason is it is not completely done.

After struggling this for a while I found you can resolve by increasing the Shutdown time limit in IIS to a greater value.

Steps

  1. Go to application pool of Central Administration.
  2. Right click on it and go to Advanced Settings
  3. In the Process Model section, increase the shutdown time limit to 200 for example.
  4. It is a good idea to restart IIS now.
  5. After searching on net for a while I found that the reason is during the web application creation process IIS is reset and by default. It allows the "Shutdown time limit" which by default is 90 seconds. Sometimes this might not be enough. And hence it forcibly shuts down in 90 seconds.