Tuesday, June 11, 2019

How to enable Anonymous access for SharePoint 2010/2013/2016/2019 sites

Leave a Comment
In this post I will share my experience for making a SharePoint 2016 web application/site anonymous. The procedure is very much the same which we used to have for SharePoint 2010/2013 web application and exactly same approach need to be taken for SharePoint 2019 application.

Extending web application:

Well it depends on methodology and practices, but I used to extend current web application and apply anonymous access for extended application and used default site for admin purposes only. So following steps are needed to make a site anonymous.

Step 1:
As mentioned above we need to extend our current web application (if required). If extending of application isn't require, Step 1 can be skipped.



Step 2:
Select application and click on authentication provider and select zone which you need to make site anonymous. I choose internet zone as shown below




Step 3:
In Authentication provider, we checked "Enable Anonymous access" setting. Other setting can be chosen as per need example for crawling related to search NTLM based setting or kerberos or Role based authentication & authorization etc



Step 4:
Then click on web application and choose Anonymous policy. Here we can define authorization restriction based on specified zone (if we want it to assigned to user). For my case and for internet zone I choose No Policy


Step 5:
Then we need to go to extended site (if created) or sharepoint site and go to site settings & Site permissions. In my case I have variations enable, so I need to go to top level site settings under site collection administrator, as by default in variation site, site will redirect to root level variation. If you need to understand how variation or multilingual site creation work then it is in my another blogpost.

Under top level site settings under Users & Permissions section click on Site Permission and then choose anonymous access


This is all settings which is required for making a site anonymous and once visiting this site it serve as anonymous.





Read More

Monday, June 10, 2019

How to configure multilingual site: variation in SharePoint 2013/2016/2019

1 comment
In this post I will quickly walk through steps we used to perform while creating multilingual site in SharePoint 2016. Same steps need to be followed for SharePoint 2013 & SharePoint 2019.

Variation brief:

Variations feature is provided by Microsoft in SharePoint to provide & propagate multilingual content management through SharePoint application. In simple term variation is managed through labels (subsite for each language).

Step 1:

First of all install language pack by downloading it from Microsoft site. Once language pack is installed we will continue to Step 2.

Step 2:

Then under site settings at top level site, under Site Collection Administrator click on variation settings. Most of these setting are self-explanatory and can be changed late on based on customized requirements.



Step 3:

Here we are creating english as root site and choose locale as english as well. Also I choose top level site as source/target level variation.



Step 4:

In this step we would create other labels/variations for required multilingual sites e.g. arabic etc.

I used to allow both human & machine translation and i choose allow automatic update target variation pages

Since variation creation hierarchy is a timer job and if Arabic or other language hierarchy isn't created and we need to do it manually then we need to run it from SharePoint Central Admin -> Monitor -> Review Job Definitions under Time Jobs and click "Variation Create Hierarchy Job Definition" by selecting current web application




Read More

Wednesday, May 29, 2019

My journey for upgrading web applications from SharePoint 2013 to SharePoint 2016: Step by step

Leave a Comment
I know its probably a bit late for upgrading from SharePoint 2013 to SharePoint 2016 as it should be upgraded to 2019. However, 2019 SharePoint applications upgrade I will write later on. Recently did a client project upgrade from SharePoint 2013 to SharePoint 2016, so here is my journey & steps which I followed:

Step 1: As normal procedure create a new web application from SharePoint Central Admin
Step 2: From managed content databases, remove content database for web application for Step 1

Step 3: Restore SharePoint 2013 content database on Database server
Step 4: From same managed content database choose web application created in Step 1
Step 5: After mounting content DB, we need to run few powershell commands to verify warning, possible errors which may happened during upgrade process and these are following. However, I used to add wsp solutions in order to verify possible issues may happened for code compatibility:

Step 6: As discussed we need to run series of Powershell command, first of it is: 
Test-SPContentDatabase -Name <Content_DB_Name> -WebApplication <WebAppName>
Above command will test content db against web application for all customization done as per content db are also installed in farm (WSP which we did in Step 5)
For me it just generated few warning which would not stop this upgrade as shown below


Step 7: Next powershell command in this series is to mount content db against this web application: 
Mount-SPContentDatabase -Name “<Content_DB_Name>” -DatabaseServer “<DBAlias>” -WebApplication <WebAppName>
According to microsoft documentation this command this will attach content db to web applicatoin
For me it don't show any error as show below


Step 8: Then we need to test the mounted site as Test-SPSite site url. This command run some series of health check against mounted spsite, site collection & its contents
Again it dont give any error for me

Step 9: Repair-SPSite -identity siteurl  and this command will fix any issues that it finds. For my case didn't find much


Step 10: And lastly Upgrade-SPSite siteUrl -VersionUpgrade
This command will actually upgrade site collections associated with this web application to SharePoint 2016 mode










Read More

Tuesday, May 21, 2019

How to convert Windows Server 2016 Evaluation to Licensed version

Leave a Comment
Problem:

In previous blog post I have blogged about how to change SQL Server License. Similarly, the client now wants to upgrade/update its Windows Server 2016 Evaluation license.

Run winver.exe to verify current version:



Solution:

So to cut short discussion we switch to our old buddy Dism.exe, so on command prompt or power shell with elevated privileges we need to run following command:

dism /online /set-edition:ServerStandard /productkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /accepteula

After that just restart the server, and to verify the update has been successful:



Read More

Monday, May 20, 2019

SQL Server: Once Evaluation period has expired, How to activate SQL Server or change product key

Leave a Comment
Problem Statement:

For one of my client we used SQL Server 2016 Evaluation key which give 6 months time period to evaluate SQL Server and its features.

As per discussion with client, they will in the meantime do the procurement process (usually its bit lengthy, hectic & bureaucratic process in Middle East) to procure Enterprise License as per business need. However, in the meantime our project has completed and we moved on to next client with this dependency mentioned in project closure about upgrade of Evaluation license to Enterprise license. But as expected I got a call from my client manager about assistance in changing their Evaluation license. So thought to write a blog to refer for future needs.

So in order to change evaluation license specially when its expired and don't allow any services and not allow to start and event viewer showing following error:


Solution:

Go to SQL Server installation Center and click Maintenance and then choose Edition Upgrade


Then provide license key and click Upgrade

Read More

Wednesday, April 17, 2019

(Solved) .Net core web api project with vscode keep giving HTTPS endpoints can only be configured using KestrelServerOptions.Listen()

Leave a Comment
Problem:

While working for Angular project with .net core web api using Json web token for angular security, we might get exception in program.cs file of Web API of project developed in .net core

public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}


While debugging project in vscode to run web api we find following exception:

asp.net core web api System.InvalidOperationException: HTTPS endpoints can only be configured using KestrelServerOptions.Listen(). at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.<BindAddressAsync>d__7.MoveNext()


Solution:

We need to disable / Commented out / remove https: from applicationUrl in launchSettings.json

"ProjectApi": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "api/values",
//"applicationUrl": "https://localhost:5001;http://localhost:5000",
"applicationUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

The reason from .net core 2.1 and onward this launchSettings.json is include as template as we create .net core project. However, this wasn't happening prior to .net core 2.0 and previous versions.

So updating applicationUrl in launchSettings.json under Properties folder would do the trick and web api should start working as expected
Read More

Sunday, April 14, 2019

How routing works in Angular (Brief overview)

Leave a Comment

Following is brief pictorial illustration related to angular routing:






















1: If Url is changed either through router link or directly changed in address bar
2: It verifies if path exist & match in rotues.ts or routing related configuration file. It also check if routes require redirect as per configuration provided in routing file.
3: Also to check if there are process guard related to activate or deactivate  guard
4: To resolve data as per routes defined.
5: Activate component and nested components
6: Display templates and complete the routing cycles, defined in those components which become activated.

Read More