Skip to main content

Posts

Detecting SharePoint environment from an SPFX.

Detecting SharePoint environment from an SPFX. SPFX web parts can be added to modern and classic SharePoint pages and we might need to load different resources depending of the environment type. The environment type can be detected using the EnvironmentType enumeration, directly from your SPFX code. Member Description ClasicSharePoint Indicates that the framework was loaded from a classic SharePoint page Local Indicates that the framework was loaded from the workbench SharePoint Indicates that the framework was loaded by a client-rendered SharePoint page Test Represents the scenario of the framework hosted in a unit/integration test To detect the environment type start by importing the enumeration from the sp-core-library: import { Environment, EnvironmentType} from '@microsoft/sp-core-library'; Use the code below to target...

Modern SharePoint site creation with REST API.

The following REST commands are available for creating a modern SharePoint Communication site: Create . Create a new SharePoint site. Delete . Deletes a SharePoint site. Status . Get the status of a SharePoint site. The base URL for the REST commands is  _api/SPSiteManager . Create a modern site Using the following REST api you can create both Communication sites and non-group associated Team Sites. To specify which type of site to create you use the WebTemplate attribute. Use one of the following templates to select which type of site to create: Communication Site:  SITEPAGEPUBLISHING#0 non-group associated Team Site:  STS#3 JSON url: /_api/SPSiteManager/create accept: application/json;odata.metadata=none odata-version: 4.0 method: POST body: { "Title" : "Communication Site 1" , "Url" : "https://contoso.sharepoint.com/sites/commsite1" , "Lcid" : 1033 , "ShareByEmailEnabled" : false , ...

Deploying SharePoint Server Hybrid MS-301 Completed.

Deploying SharePoint Server Hybrid MS-301  Completed.

List of ports used by SharePoint 2016

Protocol Port Usage Comment TCP 80 http Client to SharePoint web server traffic (SharePoint – Office Web Apps communication) TCP 443 https/ssl Encrypted client to SharePoint web server traffic (Encrypted SharePoint – Office Web Apps communication) TCP 1433 SQL Server default communication port. May be configured to use custom port for increased security UDP 1434 SQL Server default port used to establish connection May be configured to use custom port for increased security TCP 445 SQL Server using named pipes When SQL Server is configured to listen for incoming client connections by using named pipes over a NetBIOS session, SQL Server communicates over TCP port 445 TCP 25 SMTP for e-mail integration Cannot be configured TCP 16500-16519 Ports used by the search index component Intra-farm only Inbound rule Added to Windows firewall by SharePoint TCP 22233-22236 Ports required for the AppFabric Caching Service Distributed Cache… TCP 808 Windows Communication Foundation communic...

SharePoint 2016 70-339 completed.

SharePoint 2016 70-339 Completed.

Protecting Your SharePoint 2010 Content with SQL Server 2008 Transparent Database Encryption

High Level Steps to enable TDE Create the DMK Create the TDE Cert Backup the TDE Cert Create the DEK Encrypt the DB Monitor Progress 1. Creating the Database Master Key (DMK) Symmetric key used to protect private keys and asymmetric keys Protected itself by Service Master Key (SMK), which is created by SQL Server setup Use syntax as follows:   USE master; GO CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'P@ssword1'; GO 2. Create Certificate Protected by DMK Protected by the DMK Used to protect the database encryption key Use syntax as follows: USE master; GO CREATE CERTIFICATE CompanyABCtdeCert WITH SUBJECT = 'CompanyABCTDE Certificate' ; GO 3. Backup Master Key and Cert Without a backup, data can be lost Backup creates two files, the Cert backup and the Private Key File Use following syntax: USE master; GO BACKUP CERTIFICATE CompanyABCtdeCert TO FILE = 'c:\Backup\BackupCompanyABCtdeCERT.cer' WITH PRIVATE KEY ( FILE = 'c:\Backup\Backu...

The Security Token Service is not available.

WebHost failed to process a request.  Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/17653682  Exception: System.ServiceModel.ServiceActivationException: The service '/SecurityTokenServiceApplication/securitytoken.svc' cannot be activated due to an exception during compilation.  The exception message is: Exception has been thrown by the target of an invocation.. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: The farm is unavailable.    at Microsoft.SharePoint.Administration.Claims.SPSecurityTokenServiceManager.get_Local()    at Microsoft.SharePoint.IdentityModel.SPSecurityTokenServiceConfiguration..ctor()    --- End of inner exception stack trace ---    at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle...