August 29, 2021

 How to prevent/prohibit the creation of SharePoint 2010 workflows (on-premises)?


In case with in your organisation, if you want to meet the below Constraints (for the SharePoint on-premises env's SPS 2013, 2016, 2019):

  • Want existing SP10WFs to continue to work.
  • Want existing SP13WFs to continue to work.
  • Want the ability to edit/delete existing SP10WFs.
  • Want the ability to create/edit/delete SP13WFs.
  • Want the ability to continue using SharePoint Designer.

Why?

SP10WF is being retired in SPO and need to stop proliferation of SP10WF in preparation for migration to O365.

Then do below from your SharePoint management shell (run as Farm account)

$wa = Get-SPWebApplication https://webAppUrl
$wa.AllowCreateDeclarativeWorkflow = $false
$wa.Update()


then after that once you open SharePoint designer to create new workflow you wont see option to create a new SharePoint 2010 workflow:


hope this helped... :) 

May 29, 2014

Resolving SharePoint Application Authentication Error: Login Failed on Web Front End Server(s)

Problem

If you try to log in to the SharePoint web application (http://site.company.com) using host header on the server itself, your windows credential doesn’t work but you can access the same site from outside. The problem happens when you create a SharePoint web application with a host header (site.company.com) on the SharePoint Server (Server Name: company.com) which is installed on Windows Server 2008. This is a known issue with SharePoint 2007 or SharePoint 2010 on the Windows Server 2008 platform and this problem is happening even with the recent patches.

Solution


I had the same problem before when I put the host header in for my production site and I was unable to login from production server itself. The main reason for this issue is that Windows includes a loopback security check feature that helps prevent reflection attacks on your computer. Therefore, authentication fails if the FQDN or the custom host header that you use does not match the local computer name, as the system blocks the authentication procedure while resolving the host header given to the web application. Additionally, you always get the following prompt even though you put correct username and password.



To proof the previous statement, you have to go to the event viewer. If you check the event viewer logs on the “Security” category, you will see something like the one below under the Audit Failure Keyword

Check event viewer log

  • Click Start, click Run, type eventvwr, and then click OK.
  • Click on Security under Windows Log

Do the following steps to resolve this error by modifying the server’s registry to specify the host name. To specify the host names that are mapped to the loopback address and that can connect to Web sites on your computer, follow these steps:
  • Click Start, click Run, type regedit, and then click OK.
  • In the Registry Editor, locate and then click the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0.
  • Right-click MSV1_0, point to New, and then click Multi-String Value.
  • Type BackConnectionHostNames, and then press ENTER.
  • Right-click BackConnectionHostNames, and then click Modify.
  • In the Value data box, type the host name or the host names for the sites that are on the local computer, and then click OK.
  • Exit Registry Editor, and then restart the computer.

The name placeholder is considered a host header. It is an alternative name for the computer on which Reporting Services is installed. You must add the NetBIOS and the Fully Qualified Domain Name (FQDN) for name to the BackConnectionHostNames list that is stored in the Windows registry.

For example, if the name is a Windows computer name, such as contoso, the name can likely also be referenced in FQDN form as contoso.domain.com. You must add both representations to the list in BackConnectionHostNames.

So, The above registry modification must be done for all other SharePoint applications which are using Host Header.

Thanks,
JK


Get SharePoint Farm ConfigDB Name, Version, Farm Account Details.

Hi,

here is the powershell command to get the details of Config DB name, Build Version and Farm account:

Get-SPFarm | select Name, buildversion, @{expression = {$_.Defaultserviceaccount.name};Label="Farm Account"}

Thank,
JK

May 20, 2014

Permission required to execute the C# Object Model code in SharePoint

Error
The Web application at http://webapp/site/sitecollcetion could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.

Resolution:
User Permission
SharePoint Site
Minimum Read Permission
Sharepoint Server:
Add to WSS_ADMIN_WPG group
Database
Sharepoint Content DB (Site collection database) - db_owner permission
Sharepoint Config DB (Config DB of sharepoint installation) - - db_owner permission


Thanks,
JK

May 16, 2014

Retrive all deployed solutions / .WSP files from the Farm

Hi All,

please do find below Power Shell script which will retrieve all deployed solutions to the local drive:

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") 
$farm = [Microsoft.SharePoint.Administration.SPFarm]::Local 
$farm.Solutions | % {  
$filename = ($pwd.ToString() + "\" + $_.SolutionFile.Name);  
write-host ("Saving" + $filename);  
$_.SolutionFile.SaveAs($filename) 
       } 

save this above lines of code as a .ps1 file and execute [Won't support if OS is Windows server 2003]
tested in SharePoint 2007 environment [Windows server 2008 r2], you can try in 2010 also.

Thanks,
JK

April 15, 2014

List all SharePoint 2010 Farm ContentDBs & Application Databases

To List all active Content DBs in SharePoint 2010 Farm, just execute a PowerShell command:

Get-SPDatabase | Format-Table -AutoSize | Out-String -Width 1000


March 25, 2014

Types of SharePoint Templates

The following are the different templates that are available for SharePoint
Template Name
Description
GLOBAL#0
 Global template (1033)
STS#0
 Team Site (1033)
STS#1
 Blank Site (1033)
STS#2
 Document Workspace (1033)
MPS#0
 Basic Meeting Workspace (1033)
MPS#1
 Blank Meeting Workspace (1033)
MPS#2
 Decision Meeting Workspace (1033)
MPS#3
 Social Meeting Workspace (1033)
MPS#4
 Multipage Meeting Workspace (1033)
CENTRALADMIN#0
 Central Admin Site (1033)
WIKI#0
 Wiki Site (1033)
BLOG#0
 Blog (1033)
BDR#0
 Document Center (1033)
OFFILE#0
 Records Center (1033)
OFFILE#1
 Records Center (1033)
OSRV#0
 Shared Services Administration Site (1033)
SPS#0
 SharePoint Portal Server Site (1033)
SPSPERS#0
 SharePoint Portal Server Personal Space (1033)
SPSMSITE#0
 Personalization Site (1033)
SPSTOC#0
 Contents area Template (1033)
SPSTOPIC#0
 Topic area template (1033)
SPSNEWS#0
 News Site (1033)
CMSPUBLISHING#0
 Publishing Site (1033)
BLANKINTERNET#0
 Publishing Site (1033)
BLANKINTERNET#1
 Press Releases Site (1033)
BLANKINTERNET#2
 Publishing Site with Workflow (1033)
SPSNHOME#0
 News Site (1033)
SPSSITES#0
 Site Directory (1033)
SPSCOMMU#0
 Community area template (1033)
SPSREPORTCENTER#0
 Report Center (1033)
SPSPORTAL#0
 Collaboration Portal (1033)
SRCHCEN#0
 Search Center with Tabs (1033)
PROFILES#0
 Profiles (1033)
BLANKINTERNETCONTAINER#0
 Publishing Portal (1033)
SPSMSITEHOST#0
 My Site Host (1033)
SRCHCENTERLITE#0
 Search Center (1033)
SRCHCENTERLITE#1
 Search Center (1033)
SPSBWEB#0
 SharePoint Portal Server BucketWeb Template (1033)