How to generate CSR in Windows Server for SSL Certificate

Ahamed Fazil Buhari
 
Senior Developer
January 20, 2018
 
Rate this article
 
Views
5515

Hi everyone, in this article we will see how to create SSL certificate for your website. The first step is to generate CSR from the server where you would like to host your website. To generate CSR please follow below steps. Here we are using Windows Server 2012 R2 and IIS of version 8.5

Step 1: Go to Internet Information Service (IIS) Manager. And double click on ‘Server Certificates’ as shown below.

clip_image002

Step 2: In Server Certificates window, check on right panel under Actions -> click on ‘Create Certificate Request’.

clip_image004

Step 3: In Create Request window, provide all necessary information. You can find sample data from below screenshot. It doesn’t matter if we you have given mydomain.com or for www.mydomain.com as common name, anyway both will be covered.

clip_image005

Step 4: Click on Next. Make sure you selected Bit length as 2048 which is recommended. (The bit length decides the level of security of your SSL certificate. Example, 2048-bit key is much stronger than a 1024-bit key.) Also, please make sure that the SSL certificate provider supports your bit key length. Most of the certificate providers like GoDaddy, Symantec recommended to use bit key 2048.

(The Microsoft RSA Schannel Cryptographic Provider supports hashing, data signing, and signature verification. The algorithm identifier CALG_SSL3_SHAMD5 is used for SSL 3.0 and TLS 1.0 client authentication – MSDN)

clip_image006

Step 5: Click on Next and provide folder path to save your CSR in txt format.

clip_image007

clip_image009

Step 6: Once the CSR’s been generated. Share your CSR with the SSL certificate provider. There are many SSL certificate provider available – comodo, identrust, godaddy, symantec etc. Choose wisely based on your need. And submit your CSR to the certificate provider who will generate SSL certificate and share it to you.

In the next article – “Install SSL certificate to the Server and Binding of SSL certificate to IIS Website” we will see how to install SSL certificate which you received from SSL provider.

Happy Coding

Ahamed

Category : Windows

Author Info

Ahamed Fazil Buhari
 
Senior Developer
 
Rate this article
 
Ahamed is a Senior Developer and he has very good experience in the field of Microsoft Technologies, especially SharePoint, Azure, M365, SPFx, .NET and client side scripting - JavaScript, TypeScript, ...read more
 

How to add CSR based JS file in JS link in Edit form Webpart in SharePoint office 365

Arunraj Venugopal
 
SharePoint Developer
August 24, 2016
 
Rate this article
 
Views
9237

Let us look at the functionality of CSR client side rendering which is one of the new concepts in SharePoint 2013 online. To change the behavior of view & its appearance, new form, Edit Form and Display Form at runtime, jquery used in the SharePoint 2007 and its later version.

In SharePoint 2013 office 365, we have a concept called Client side rendering and its easy way of debugging code will help to achieve tasks such as changing the behavior of view and form (New, Edit & Display) rendering and Search Result etc.,.

To edit the page, ToolPaneView=2 would be used at the end the url.

In SharePoint online, ToolPaneView=2 won’t work in usual way.

In order to edit the Edit form page, go to Advance setting in the list setting and select the option 1

1. Classic Experience(Select)

2. New experience

3. Default Experience.

Edit form page get loaded with edit mode once Sharepointurl/editform.aspx?ID=2&ToolPaneView=2 is entered in the browser

Prepare a CSR based js file and placed in the asset library. Go to web part properties of Edit form and paste the path of the js file in the JSlink text box

(

function () {

var overrideCtx = {};

overrideCtx.Templates ={};

overrideCtx.Templates.Fields = {

‘Change_x0020_Comments’ : { ‘EditForm’ : Testing } For Reader: “Change_x0020_Comments” is a internal name. Testing is the function name.

};

SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);

}) ();

function Testing(ctx) {

var fieldval = ctx.CurrentItem[ctx.CurrentFieldSchema.Name]; For Reader: It has the reference of comment field, which will be manipulated as per logic

var TestTitle = fieldval.toString().replace(" ", "");

TestTitle=’<textarea rows="25" cols="20" id="Change_x0020_Comments_ab250304-f850-4895-86d3-0a2721427864_$TextField" title="Change Comments" class="ms-long"></textarea>’;

return TestTitle;

}

The code in the box takes reference of the comments field “Change Comments” and replaces the existing value as blank while loading Edit form of sharepoint list

TestTitle=’<textarea rows="25" cols="20" id="Change_x0020_Comments_ab250304-f850-4895-86d3-0a2721427864_$TextField" title="Change Comments" class="ms-long">Here is the value for Comment field</textarea>’;

This function is building up an object, which is then used to register a template override.

(

function () {

var overrideCtx = {};

overrideCtx.Templates ={};

overrideCtx.Templates.Fields = {

‘Change_x0020_Comments’ : { ‘EditForm’ : Testing } For Reader: “Change_x0020_Comments” is a internal name. Testing is the function name.

};

SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);

}) ();

The object takes the following properties:

· View

· Header

· Body

· Footer

· Group

· Item

· Fields

· OnPreRender

· OnPostRender

The CSR code must be the adhere to the following rules

· FieldName – This is the internal name of the field you want to override.

· Scope – This defines when to override the field. The choices are “View”,”DisplayForm”,”EditForm”, and “NewForm”

· Override – The actual override. This can be a HTML string with JavaScript embedded, or a function to be executed. In the former, it should be in the format: “

The code in the box takes reference of the comments field “Change Comments” during the Edit form loading and replace the value blank.

Category : Office 365, SharePoint

Author Info

Arunraj Venugopal
 
SharePoint Developer
 
Rate this article
 
Works as a SharePoint Developer in a CMM Level 5 Company ...read more
 

Leave a comment