Wednesday, 19 November 2014

Set up Secure Sockets Layer (SSL) using Digital Certificates


What is Secure Sockets Layer (SSL)?
SSL is a protocol for transmitting private documents via the Internet. Web sites use the SSL to obtain confidential user information, such as credit card numbers. SSL uses a cryptographic system that uses two keys to encrypt data - a public key known to everyone and a private or secret key known only to the recipient of the message. SSL protocol uses a third party, a Certificate Authority (CA), to identify one end or both ends of the transactions.

Getting and using a digital secure certificate

In order to get SSL certificate, you need to submit Certificate Signing Request (CSR) - a data file containing your details to Certification Authority (CA). During the SSL Certificate application process, the Certification Authority will validate your details and issue an SSL Certificate containing your details and allowing you to use SSL. Your web server will match your issued SSL Certificate to your Private Key. Your web server will then be able to establish an encrypted link between the website and your customer's web browser.

To create a Certificate Signing Request (CSR), right click on your IIS Server's Default Web Site, and choose Directory Security Tab, Click on Server Certificate. As shown in following diagram



IIS Certificate wizard will be opened. Select 'Create a new certificate' option and click next.



Follow the all the steps. In the end you will get 'certreq.txt' file as shown below



Now to https://www.thawte.com and go to trial section of certificate and follow the instruction to get the certificate. You need the paste contents of CSR in Textbox, provided for getting certificate. Paste all the contents including '-----BEGIN NEW CERTIFICATE REQUEST-----' and '-----END NEW CERTIFICATE REQUEST-----'. In the end you will get the certificate out in textbox, Copy it from textbox and make a .txt file, output should be like following image


Now click on 'IIS default Web Site' and choose Directory Security Tab, Click on Server Certificate. You will get the 'IIS Certificate Wizard'. Select 'Process the pending Request and install the certificate'. Follow the step to install the certificate (.txt) file created in last step.


Now certificates are installed on IIS.

C#/.aspx code to use SSL
In order to use SSL in asp.net, you need to redirect request through https instead of http. Make a new aspx website and add two pages (Welcome.aspx, Login.aspx) in your website. You can see in the Page_Load() event of Welcome.aspx following code, how to redirect the request to https.


Welcome.aspx.cs


public class WelCome : System.Web.UI.Page
{
    private void Page_Load(object sender, System.EventArgs e)
    {
        String url = https://athakur/AnandTestCert/Login.aspx;
        Response.Redirect(url);
    }
    override protected void OnInit(EventArgs e)
    {
        //
        // CODEGEN: This call is required by the ASP.NET Web Form Designer.
        //
        InitializeComponent();
        base.OnInit(e);
    }

    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
        this.Load += new System.EventHandler(this.Page_Load);
    }}

Login.aspx
<%@ Page language="c#" Codebehind="Login.aspx.cs" AutoEventWireup="false" Inherits="AnandTestCert.Login" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
      <HEAD>
               <title>Login</title>
               <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
               <meta name="CODE_LANGUAGE" Content="C#">
               <meta name="vs_defaultClientScript" content="JavaScript">
               <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
      </HEAD>
      <body MS_POSITIONING="GridLayout">
           <form id="Form1" method="post" runat="server">
                         <DIV style="DISPLAY: inline; FONT-SIZE: large; Z-INDEX: 101; LEFT: 28px; WIDTH: 300px; COLOR:
                           navy; FONT-FAMILY: Verdana, 'Trebuchet MS'; POSITION: absolute; TOP: 44px; HEIGHT: 38px;
                           BACKGROUND-COLOR: white" ms_positioning="FlowLayout">This web page uses SSL</DIV>
                         <DIV style="DISPLAY: inline; FONT-SIZE: xx-small; Z-INDEX: 103; LEFT: 80px; WIDTH: 52px; COLOR:
                           navy; FONT-FAMILY: Verdana, 'Trebuchet MS'; POSITION: absolute; TOP: 120px; HEIGHT: 20px;
                           BACKGROUND-COLOR: white" ms_positioning="FlowLayout">Password</DIV>
                         <DIV style="DISPLAY: inline; FONT-SIZE: xx-small; Z-INDEX: 102; LEFT: 68px; WIDTH: 64px; COLOR:
                           navy; FONT-FAMILY: Verdana, 'Trebuchet MS'; POSITION: absolute; TOP: 96px; HEIGHT: 20px;
                           BACKGROUND-COLOR: white" ms_positioning="FlowLayout">User Name</DIV>
                           &nbsp;
                         <asp:TextBox id="TextBox1" style="Z-INDEX: 104; LEFT: 152px; POSITION: absolute; TOP: 92px"
                           runat="server"></asp:TextBox>
                         <asp:TextBox id="TextBox2" style="Z-INDEX: 105; LEFT: 152px; POSITION: absolute; TOP: 120px"
                           runat="server"></asp:TextBox>
                         <asp:Button id="Button1" style="Z-INDEX: 106; LEFT: 80px; POSITION: absolute; TOP: 152px" 
                           runat="server" Text="Submit" OnClick="Button1_Click"></asp:Button>
                         <asp:Button id="Button2" style="Z-INDEX: 107; LEFT: 152px; POSITION: absolute; TOP: 152px"
                           runat="server" Text="Cancel"></asp:Button>
               </form>
      </body></HTML>

Make Welcome.aspx start page and run the application. You may get following message, which indicates that your application is using certificates.



See the URL it is redetected to https.



Now on the status bar you can see the lock symbol. Double Click on lock.



It will display the certificate details like issued to, issued by and valid date etc.


Conclusion

I hope this article will help you to set up SSL on an IIS. As we have seen above, Adding SSL on IIS is not a tough task.

Aah! Another bug! Well, it's the life.


Refernce:

http://www.c-sharpcorner.com/UploadFile/ankithakur/Secure_Sockets_Layer_aspx03052007002217AM/Secure_Sockets_Layer_aspx.aspx

Export or Import SSL Certificates in windows server using Microsoft Management Console



Export an SSL certificate from windows server.

Steps Involved:


  1. Go to Start => Run => Type MMC and then click on Ok.

    Run MMC
  2. In Microsoft Management Console, Click on the File menu and then click on Add\Remove Snap-in...

    Add/remove snap in mmc
  3. In the Add or Remove Snap-ins wizard, select Certificates from the available snap-ins and then click on Add.

    certificate in mmc
  4. Select My user account and click on Finish.

    select my user in mmc
  5. Certificate will be added and click on Ok.

    certificate added n mmc
  6. In the left pane expand Certificates, and then expand Personal.
  7. Click on Certificates folder.
  8. Right click on the certificate, click on All Tasks and then click on Export.

    export the certificate in mmc
  9. Certificate Export Wizard will pop up, click on Next.

    certificate expot wizart
  10. In the Export File Format select DER encoded binary X.509 (.CER) format.

    DER encoded binary in mmc
  11. Click on Next.
  12. In the File to Export click on browse, select the location and enter the Name.

    eexpot the file in mmc
  13. Click on Save, the certificate will be saved.
  14. In the Certificate Export Wizard, click on Finish.

    Certificate Export Wizard in mmc
  15. You will be getting the following pop up, click on Ok.

    export successful in mmc
  16. The certificate is exported successfully.

    certificate in mmc
Import an SSL certificate to the windows server:

Steps Involved:

  1. Go to Start => Run => Type MMC and then click on Ok.

    open mmc
  2. In Microsoft Management Console, Click on the File menu and then click on Add\Remove Snap-in...

    Add\Remove Snap in mmc
  3. In the Add or Remove Snap-ins wizard, select Certificates from the available snap-ins and then click on Add.

    Add Certificates in mmc
  4. Select My user account and click on Finish.

    My account in mmc
  5. Certificate will be added and click on Ok.

    Certificate added in mmc
  6. In the left pane expand Certificates, right click on the Personal folder, click on All Tasks and then click on Import.

    import task in mmc
  7. Certificate Import Wizard will pop up, click on Next.

    import wizard pop up in mmc
  8. Click on Browse and select the certificate to be imported.

    select certificate in mmc
  9. Click on Next.
  10. Select where the certificated should be stored.

    select path for certificate in mmc
  11. Click on Finish.

    complete the import wizard in mmc
  12. You will be getting the following pop up, click on Ok.

    successful pop up in mmc


Reference:

http://www.c-sharpcorner.com/uploadfile/anavijai/export-or-import-ssl-certificates-in-windows-server-using-microsoft-management-console/


Configure SSL certificate warning settings using Power Shell


Through User Interface:
  • Go to Central Administration, in the Quick Launch, click General Application Settings.
  • On the General Application Settings page, in the Search section, click Farm Search Administration.

    vi.gif
  • On the Farm Search Administration page, in the Farm-Level Search Settings section, click the value of the Ignore SSL Warnings setting.

    vi1.gif
  • If you want the crawler to proceed to crawl content even if the site name and the name in the SSL certificate do not match select the Ignore SSL certificate name warnings check box.

    vi2.gif
  • Click Ok.
Through Power Shell script:

Set-SPEnterpriseSearchService -IgnoreSSLWarnings $true

Set-SPEnterpriseSearchService -IgnoreSSLWarnings $false
 


Reference:

http://www.c-sharpcorner.com/UploadFile/anavijai/configure-ssl-certificate-warning-settings-using-power-shell/


Configure Search in SharePoint 2010


In this article I am describing how to configure Search in SharePoint 2010.

1. Go to SharePoint Central Administration.

2. Click on Application management then select Manage Service application.

ConSerShare1.gif

3. Click New and select Search Service Application

ConSerShare2.gif

4. Give a name for your Service application.

5. Select Search Service account or register new Service account in the drop down.

6. Better create a new application pool for your Search service as shown below.

ConSerShare3.gif

7. Once done Click OK.

ConSerShare4.gif

8. It will take some time to configure the service.

9. Once configured correctly you will see the service created like below.

ConSerShare4.1.gif

10. Click on the Search Service Application 1 that we create now.

11. Select Content Source.

ConSerShare5.gif

12. Click on the Local SharePoint Site.

ConSerShare6.gif

13. Add the Web applications that you need to put in Search Services as shown below.

ConSerShare7.gif

14. You have to configure Full and incremental crawl schedules in the preceding screen.

15. Now go back and start a Full crawl.

ConSerShare8.gif

16. You will get the following screen.

ConSerShare9.gif

17. Even though you have done all these steps you may get some error while searching "The search request was unable to connect to the Search Service".

18. To avoid this you have to perform the following steps.

19. Go to Application management and select Configure Application Association as shown below.

ConSerShare10.gif

20. Click on your application.

21. From the "Edit the following group of connections" drop down select Custom.

22. Associate your search service with your web application.

ConSerShare11.gif

23. If you done this step you may have to start the crawl once again.


Reference:

http://www.c-sharpcorner.com/uploadfile/Roji.Joy/configure-search-in-sharepoint-2010/


How to Optimize SharePoint 2010 Search With Managed Property


In this article I am showing you how to create a managed property in SharePoint 2010. Normally we should use SharePoint to search and the results includes folders, documents and web pages. Sometimes SharePoint may take a long time to search a page looking for documents and web pages that meet the search criteria. In this article I am showing you a way to make it easier for users to identify content other than folders in their search results.
Create a Managed Property
The managed property can be used to help users filter search results to make it easier for them to identify relevant content.

Create a New Managed Property
  1. Navigate to Central Administration.
  2. Under Application Management, click the Manage Service Applications link.

    img1.jpg
     
  3. Click the Search Service Application link.
  4. In the left navigation panel, click the Metadata Properties link.
  5. At the top of the page, click the New Managed Property link.

    img2.jpg
     
  6. In the Name and Type section, typeDocumentType in the Property name text box.
  7. In the Mappings to Crawled Properties section, click the Add Mapping button.
  8. In the Crawled Property Selection dialog, type ows_contenttype in the Crawled Property Name text box, and then click the Find button.

    img3.jpg
     
  9. In the Select Crawled Property list, select the ows_contenttype (Text) crawled property, and then click the OK button.
  10. Check the Include values from a single crawled property based on the order specified option.
  11. In the Optimize Managed Property Storage section, check the Reduce storage requirements for text properties by using a hash for comparison option.
  12. Click the OK button to finish.
Start a Full Crawl on the Content Source
  1. Click the Content Sources link in the left navigation panel.
  2. Hover your mouse above the Local SharePoint sites and click the drop-down arrow.

    img4.jpg
     
  3. In the context menu, click Start Full Crawl.
  4. After the full crawl is completed, the new managed property can be used in the Refinement Panel Web Part in the next exercise.
  5. Please do an IIS reset, this is to refresh the managed properties cache.
Use a Managed Property in the Refinement Panel Web Part
The managed property can be added to the Refinement Web Part to help users filter search results. We start by adding a new refinement category to the web part. This is accomplished by creating and modifying XML and adding it to the Refinement Web Part's configuration. When this is done, you will do a search and filter the results using the new managed property.

The main task we are going to perform are listed below
  1. Navigate to the search results page and open the Refinement Panel Web Part for editing.
  2. Create and modify XML to add a new filter to the Refinement Panel Web Part.
  3. Execute a search and use the new category filter.
Navigate to the Search Results Page and Open the Refinement Web Part for Editing
  1. Open your browser and navigate to your web application.
  2. On the Site Actions menu, click New Site.
  3. Select an Enterprise Search Center Site and enter Search for the URL and Title.
  4. Click Create.
  5. You will be navigated to the results page URL: http://hostaddress/SearchPages/results.aspx
  6. On the Site Actions menu, click Edit Page.
  7. In the Refinement Panel Web Part, hover your mouse over the upper-right corner until a blue drop-down arrow displays. Click the drop-down arrow to display the Web Part menu, and then Edit Web Part. This opens the Web Part tool pane.

    img5.jpg
     
  8. In the Refinement section, clear the Use Default Configuration check box.
Create and modify XML to add a new filter to the Refinement Panel Web Part.
In the Refinement section, click on the Filter Category Definition textbox, and then click the ellipsis button for the Filter Category Definition field. This opens the Text Entry window for the Refinement Panel Web Part's Filter CategoriesDefinition property.
  1. Next, insert the XML snippet at the place noted in the previous illustration. This represents the new filter category using the managed property you created earlier.

    Category XML
    <Category Title="Document Types" Description="Different types of documents" Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator" MetadataThreshold="5" NumberOfFiltersToDisplay="4" MaxNumberOfFilters="20" SortBy="Frequency" SortByForMoreFilters="Name" SortDirection="Descending" SortDirectionForMoreFilters="Ascending" ShowMoreLink="True" MappedProperty="DocumentType" MoreLinkText="show more" LessLinkText="show fewer" />
     
  2. Click the OK button of the Text Entry window.
  3. Click the OK button of the Refinement Panel Web Part's tool pane.
  4. In the Page section of the Ribbon, click the Save & Close button.
Execute a Search and Use the New Category Filter
  1. In your browser, navigate to your home page of your site.
  2. In the search box, on the home page, type Document.
  3. Click the Magnifying Glass icon to execute a search.
  4. In the search results page, the Refinement Panel displays on the left. Click a different Document Types category, specifically Wiki Page.
Observe that when you click on a Document Type category, the search results are filtered to show just the results of that category. This helps the user narrow the results, making easier to browse.

Reference:

www.c-sharpcorner.com/UploadFile/roji.joy/how-to-optimize-sharepoint-2010-search-with-managed-property/


Configuring Managed Properties in Search Service on Server


Introduction

If you want to make your custom property searchable then you need to create a managed property for that custom property.

I have added a new property "Initials" to my User Profile Synchronization Service and mapped it to a property from AD. That works and the property is properly imported into the user's profiles. I have even managed to successfully show it in search results; however I still can search for it specifically.

This managed property acts as a bridge between the search and custom properties.

Section: Configuring Managed Properties in Search Service on Server

Step 1
In SharePoint Search Service, select the "Search Schema" option.

Search Schema

Step 2
Select "New Managed Property".

New Managed Property

Step 3
The following Managed Properties need to be created.
  1. Country

    • Property Name: Country
    • Type: Text
    • Searchable: Yes
    • Queryable: Yes
    • Retrievable: Yes
    • Allow Multiple Values: No
    • Refinable: Yes-active
    • Sortable: No
    • Safe: No
    • Alias: --
    • Token Normalization: Yes
    • Complete Matching: No
    • Include content from all crawled properties: Yes
Select "Add a Mapping".

Mapping

Map

Select "All Categories" then search for "Country" then click "Ok".
The property is mapped as given in the following screen shot:

Ok

Conclusion
This tracking has an impact on the relevancy of search results. For example, a search result that is often clicked by users will automatically be displayed higher up in the search results.

Reference:

http://www.c-sharpcorner.com/UploadFile/sagarp/configuring-managed-properties-in-search-service-on-server/

Friday, 7 November 2014

Sharepoint Interview Questions

http://pravahaminfo.blogspot.in/p/sharepoint-interview-questions-and.html#!/p/sharepoint-interview-questions-and.html

http://www.softwaredeveloperbootcamp.com/how-to-answer-software-developer-interview-questions/

http://sharepointquicksolutions.blogspot.in/2012/02/tcs-and-hcl-interview-questions.html

http://sharepointquicksolutions.blogspot.in/2012/10/sharepoint-interview-questions-and.html

http://microsoft-techies.blogspot.in/2014/03/tcs-sharepoint-interview.html

http://microsoft-techies.blogspot.in/2014/03/dell-sharepoint-interview.html

http://microsoft-techies.blogspot.in/2014/03/value-labs-sharepoint-interview.html

http://microsoft-techies.blogspot.in/2014/03/cts-sharepoint-interview.html

http://microsoft-techies.blogspot.in/2014/03/tcs-sharepoint-interview.html

http://microsoft-techies.blogspot.in/2014/03/microsoft-sharepoint-interview.html

http://microsoft-techies.blogspot.in/2014/03/hcl-sharepoint-interview.html

http://chithararantech.blogspot.in/2012/07/sharepoint-2010-interview-questions_12.html

http://chithararantech.blogspot.in/2012/07/how-to-move-sharepoint-sites-from.html

http://chithararantech.blogspot.in/2012/07/sharepoint-2010-interview-questions.html

http://chithararantech.blogspot.in/2012/07/sharepoint-2010-code-samples.html

http://chithararantech.blogspot.in/2012/07/sharepoint-interview-questions-july-12.html

http://chithararantech.blogspot.in/2012/07/sharepoint-interview-questionscts.html



http://subhashnetworld.blogspot.in/search/label/sharepointinterviews

http://www.rajeshg.me/2013/05/sharepoint-developer-2010-interview.html

SharePoint 2013 Interview questions

http://www.learningsharepoint.com/2013/03/14/sharepoint-2013-interview-questions/

http://www.learningsharepoint.com/2011/09/03/sharepoint-2010-developer-interview-questions-and-answers/

http://www.learningsharepoint.com/2010/07/26/sharepoint-2010-workflow-interview-questions/

http://www.learningsharepoint.com/2010/06/27/sharepoint-2007-object-model-interview-questions/

http://www.learningsharepoint.com/2010/06/12/sharepoint-programming-interview-questions/

http://infomoss.blogspot.in/p/sharepoint-interview-question-and.html

http://www.nonlinearcreations.com/Enterprise/how-we-think/articles/2011/04/Six-critical-questions-for-any-SharePoint-developer.aspx

http://sharepoint.infoyen.com/sharepoint-faq/sharepoint-faq-1/

http://interviewquestionsharepoint.blogspot.in/2010/03/sharepoint-interview-questions-for.html

http://interviewquestionsharepoint.blogspot.in/2010/02/sharepoint-interview-questions-for_10.html

http://mysharepointwork.blogspot.in/2010/03/sharepoint-interview-questions-moss.html

http://sharepointontop.blogspot.in/2013/03/sharepoint-2013-development-interview.html

http://sharepointontop.blogspot.in/2012/08/differences-between-sharepoint-2010-and.html

http://blog.robgarrett.com/2011/03/09/interview-questions-for-sharepoint-developer-position/

http://www.c-sharpcorner.com/uploadfile/manni_prince/sharepoint-interview-questions-and-answers/

http://sharepointdeveloperinterviewquestions.blogspot.in/

http://sharepointdeveloperinterviewquestions.blogspot.in/p/sharepoint-developer-interview-questions.html

http://blog.pluralsight.com/sharepoint-resumes-interviews

http://blog.pluralsight.com/sharepoint-job-descriptions

http://www.sharepointsecurity.com/sharepoint/sharepoint-development/sharepoint-developer-interview-questions-answers/

http://dotnetdatastuff.blogspot.in/2013/02/sharepoint-2010-developer-interview_14.html

http://www.softwaredeveloperbootcamp.com/how-to-answer-software-developer-interview-questions/