First add a AD DS feature from server manager.
Once done run the command
DCDIAG /TEST:DNS /V /E /S:domaincontroller
where domain controller is the name of your domain e.g. contoso.com
First add a AD DS feature from server manager.
Once done run the command
DCDIAG /TEST:DNS /V /E /S:domaincontroller
where domain controller is the name of your domain e.g. contoso.com
I created a SharePoint hosted app. The app had some site columns and a list including these columns.
I struggled with this error for some time. Removing the list and the app would deploy just fine. I realized one site column had space in name. The name of column for e.g “Expense Amount”. Adding this column to the list would give this error. So I added a new column this time the name was “ExpenseAmount” and display name would be “Expense Amount” and it worked just fine.
Another observation was the Type in my case was 10000. As a rule I changed it to 10002 and I started getting the error again. Changing it back to 10000 and it worked fine. Still not sure of the real cause but thought to put the observations here just in case it myt save someone’s time.
What are HNSC
Traditional site collections that we create in SharePoint are Path based site collections
Host named site collections have their own url.
Example
Microsoft recommends using host named site collection. It is used in SharePoint online and Office 365.
Benefits of HNSCs
A SharePoint farm can have 20 web applications at max. If we use path based site collections in order to have unique urls we need to create different web applications with different host names.
For example if we need to create following site collections
By using path based site collections we need to create 3 web application with appropriate host names.
But by using host named site collections we can create one web application and 3 site collections with different urls.
Path based site collection are not scalable as we can create at max 20 web applications, while a sharePoint farm can have at max 250000 site collections using shared content database.
When to use Path Based site collections
1. You want separate application pools.
2. You have requirement of self service site creation feature. - You need to use a custom solution for self-service site creation with host-named site collections.
How to create HNSC
HNSC can be created only through powershell script
Let us have a closer look.
I created through central admin
port – 100
Web app name – SharePoint – 100
New-SPSite 'http://<servername>:100' -Name 'Root Portal' -Description 'Root site collection' -OwnerAlias 'contoso\administrator' -language 1033 -Template 'STS#0'
New-SPSite 'http://CompanyA.contoso.com:100' -HostHeaderWebApplication 'http://<servername>:100’ -Name ‘CompanyA portal’ -Description 'Portal for CompanyA' -OwnerAlias 'contoso\administrator' -language 1033 -Template 'BLANKINTERNET#0'
New-SPSite 'http://CompanyB.contoso.com:100' -HostHeaderWebApplication 'http://<servername>:100’ -Name ‘CompanyB portal’ -Description 'Portal for CompanyB' -OwnerAlias 'contoso\administrator' -language 1033 -Template 'BLANKINTERNET#0'
Managed paths with host-named site collections
Managed paths can be used with host-named site collections. Managed paths for HNSC are different from path based site collections. Managed paths for HNSC are available to all HNSCs in the farm regardless of the web application. They are limited to 20 per farm. While managed paths for path based site collection do not apply to path based site collectioins in other web applications.
To create managed path for HNSC we need to use powershell
New-SPManagedPath ‘dept’ –HostHeader
Now we can create HNSC with managed path
New-SPSite ‘http://CompanyA.contoso.com:100/dept/Technology’ –HostHeaderWbApplication ‘http://<servername>:100’ –Name ‘Technology’ –Description ‘Technology department’ –OwnerAlias ‘contoso\administrator’ –language 1033 –Template ‘BLANKINTERNET#0’
Managed path for path based site collection can be defined at central admin or using powershell
New-SPManagedPath [-RelativeURL] "</RelativeURL>" -WebApplication <WebApplication> creates managed path for a particular web application that can be used by path based site collections of that particular web application
Having done this you can check by browsing the site
Note : – In case you see a 404 error and if you are browsing the site on same local SharePoint server, you would need to change the host file to include then entry
for example to browse http://companyA.contoso.com:100 the entry in host file would be
127.0.0.1 companyA.contoso.com
Further you need to disable LoopBack in registry. To do this manually open registry using regedit and nav to HKEY_LM\System\CCS\Control\LSA
Create dword key with name ‘DisableLoopbackCheck’. Change the value to 1 for this.
It can also be done using powershell
New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck" -Value "1" -PropertyType dword
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
Go to Hyper-V.
Click New VHD.
After installing basic OS we need to install AD.
Using following link install AD.
Open Server Manager. To open Server Manager, click Start, point to Administrative Tools, and then click Server Manager.
In Computer Information, click Configure Remote Desktop.
In the System Properties dialog box, under Remote Desktop, click one of the following options:
Review the information in the Remote Desktop dialog box, and then click OK twice.
Make sure to give 2 processors
Lot of times we encountered the problem where for testing we add users in AD and they do not get access to site the same time and even after doing User Profile Synchronization job run, we could not solve the problem.
Turns out the below blog helped.
http://blog.randomdust.com/index.php/2013/06/sharepoint-2013-claim-expiration-and-ad-sync/
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