Skip to main content

Generate CSR for websites on IIS7


When the term Certificate comes into the work it is always a worry/ situation of panic. No worries if you want to generate CSR for the purchase or ssl or for other use

Its very easy to generate a certificate request(CSR). let take a scenario of iis7 and microsoft windows server 2008.

Navigate start>>All Programs>>Administrative tools>> Internet Information services.

select the server name on the left pane under the connections.

after selecting server name, select Server Certificates from the middle pane by double clicking.

Next select Create certificate Request from the action pane on the right side of window.

Fill in the information in step by step wizard for CSR generation , Enter

Common name: website domain name(www.domainname.com), donot enter http or https
Organization name: name of company
Organizational unit: can be domain name or anything(in case of sub domain it is name of sub-domain)
Click next  will take you to chose cryptography option, choose Microsoft RSA SChannel Cryptography Provider and a key bit-length of 2048.
next step ,save the file with any name as text file(csr.txt)

Click on finish, this will generate the CSR and save it in csr.txt

Now you are ready to use this CSR in any section whereever it prompts for it.




Comments

Popular posts from this blog

Static Keyword in C#, unleashing Static keyword in C#

What is Static keyword in C# “Static” keyword can be used for declaring a static member . The keyword Static can be applied to the Classes, field, method, properties, operator, event and constructors. Methods and variable  which we use as static doesn't need an instance to be created of a class. Example of static keyword class testclass {     public static int statint;     public static void squareroot(); } we can call the above static method and variable without creating the instance of the class How to call a static method  testclass.squareroot(); apart from this the static method can use only the static variables of same class.

string is null or empty(String.IsNullOrEmpty)

You can check for the strings in the code, There are many things which  you have to consider before you use a string. Declare the string variable and assign it if (String.IsNullOrEmpty(StringVariable)) {   return "is null or empty" ; else return String.Format( "(\"{0}\") is neither null nor empty" , s); } This will check if the string is null or empty and will return a boolean response.

Usage of Ternary Operator

You can optimize the code by using the ternary operator, pass a parameter to this function it will compare the salary with the given value and if the condition satisfied It will print the value before the colon and if not satisfied it will print the value after colon. Ternary Operator (?:) condition ? condition satisfied : Condition not satisfied string TernaryOperatorUsage(int Salary) {     return salary >= 5000 ? "Congratulations! You are eligible for a pay hike." :                        "Sorry! You're not eligible for a pay hike."; } The above example illustrates the use of ternary operator in your code.