Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

    Advertisements
  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand
  • Advertisements

Archive for the ‘SharePoint 2013’ Category

Export Certificate

Posted by Paul on March 30, 2018

This is a part of the article-series:

http://www.jeanpaulva.com/index.php/2015/04/25/app-development-pre-requisites/


Export Certificate

Now we need to Export the Certificate in a particular format to use with the PHA Servers.

Open IIS Manager.

Note

We should not use the Export option available in the Certificate window. This will include the private key and not compatible with PHA deployment.

For exporting, double click the Certificate.

image

In the appearing window choose the Details tab.

image

Click the Copy to File button.  You will get the following wizard.

image

In the next page choose not to include the private key.

image

Leave the other page values as default.

image

Enter the file name for the Certificate.

image

Click the Finish button to complete export.

image

Now you need to copy the exported certificate file in further steps.

Advertisements

Posted in SharePoint, SharePoint 2013 | Leave a Comment »

Manage App Catalog

Posted by Paul on October 3, 2017

This is a part of the article-series:

http://www.jeanpaulva.com/index.php/2015/04/25/app-development-pre-requisites/

App Catalog

App Catalog is a special Site Collection where we can Manage Apps:

  • View Apps for SharePoint
  • View Apps for Office
  • Manage App Requests

Configuration

We need to start configuring App Catalog before users can use it.

Open Central Administration > Apps > Manage App Catalog page

image

You will get the following page.

image

We need to create a new App Catalog.  Click the OK button to continue.

In the appearing page enter the Administrator info & Click OK.  Your new App Catalog site will be created.

image

Now you can try opening the App Catalog by clicking the URL.  You will see the following page.

image

Posted in SharePoint, SharePoint 2013 | Leave a Comment »

Configure App URLs

Posted by Paul on April 25, 2017

This is a part of the article-series:

http://www.jeanpaulva.com/index.php/2015/04/25/app-development-pre-requisites/

Configure App URLs

After the Zone Configuration, We need to Configure App URLs.  Follow the steps below.

Open Central Administration > Apps > Configure App URLs link

image

You will get the following page.

image

Enter the Zone Names here.

image

Please note that my case is:

  • Machine name is sharepoint
  • Domain name is windows.net
  • FQDN is sharepoint.windows.net
  • App Domain name is sharepointapps.net

Save changes. Now you can proceed with next steps.

Posted in SharePoint, SharePoint 2013 | Leave a Comment »

Sandboxed Solution & SharePoint Online Compatibility

Posted by Paul on February 12, 2017

In this article we can explore Compatibility of Sandboxed Solution with SharePoint Online.

Scenario

I am seeing that many developers are recommending Sandboxed Solutions for On-Premise and Online deployments.

But, the Twist is that SharePoint Online does not support all sandboxed solutions. So if your solution has a Strategy Architecture comprising of SharePoint Online, you need to be really careful recommending Sandboxed Solutions.

Recommendation

Sandboxed Solution is of two types:

1. No-Code Sandboxed Solution (NCSS)

2. Code Sandboxed Solution

image

NCSS contains only HTML & CSS markups. No code will be there.

Recommendation

NCSS is the recommended & only allowed one in SharePoint Online.

Testing

Create a new Sandboxed Solution.

image

Add a Visual Web Part. Do not add any code. Build the project.

Now Upload the NCSS and we get the Activate button enabled. This proves No-Code Sandboxed Solutions can be activated in SharePoint Online. (as of today)

image

Now come back to Visual Studio & Add place a button on the Visual Web Part.
image

Add code to the click event handler.

image

Build the project.

Now upload the Coded Sandboxed Solution to SharePoint Online. You can see the Activate button is disabled.

image
So this demonstrates that SharePoint Online does not support Coded Sandboxed Solutions.

image

Sandboxed Solutions were the Solutions of the past and now being deprecated. In the modern SharePoint development world REST, CSOM, Apps are the recommended approaches. Plus, there is a risk that Sandboxed Solution can get disabled in future versions of SharePoint/Online.

References

https://blogs.msdn.microsoft.com/sharepointdev/2014/01/14/deprecation-of-custom-code-in-sandboxed-solutions/

Summary

In this article we have explored Compatibility of Sandboxed Solution with SharePoint Online.

Posted in SharePoint, SharePoint 2013 | Tagged: , , , | Leave a Comment »

Playing Video in Restricted SharePoint Environments

Posted by Paul on January 25, 2017

Few months back I came across a scenario where User wanted to play Video in SharePoint Pages. But the Environment restricts usage of Video Streaming.

Solution

In this case we can use HTML5 Video Tags.

HTML5 Video

HTML5 included the Video & Audio tags which allows playing multimedia without any extra plugin requirement.

Previous to HTML5, Flash Or Media Player was required to play video Or audio files. Now all HTML5 compatible browsers support the Video tag by incorporating necessary multimedia infrastructure within them.

Following are the Browsers & Versions supporting HTML5 Video & Audio tags.

image

Reference: http://www.w3schools.com/html/html5_video.asp

SharePoint & Video Tag

Coming back to our problem, Perform the following activities for testing the Video tag.

Open SharePoint Designer. Go to Site Pages.

image

Choose the new HTML or ASPX option. Edit the file. Add the following code inside body tag.

<video width=”300″ height=”250″ controls>
<source src=”/siteassets/video.mp4″ type=”video/mp4″>
  Your browser does not support the video tag.
</video>

The code performs the following:

· Set the Video tag with wdith & height

· Specify the source as mp4 file

· Set the Error text if browser does not support video tag

Your code in HTML file looks like below.

image

Video File

Now we need to create a video file. You can download the Video file from link below.

http://techslides.com/sample-webm-ogg-and-mp4-video-files-for-html5

image

Choose the MP4 file, download, rename & upload to Site Assets library.

image

Testing

Now open the HTML file in a Video supported browser. You will get the video played as shown below.

image

Now open the HTML file in a non-supported browser. You will see the following error message.

image

image

You can also set a Preview Image for the Video tag. This image will be displayed in the non-play state.

Restricted Scenarios

The video restricted scenarios can be:

1. SharePoint Restricted Content Types

2. SharePoint Restricted File Extensions

3. IIS Video Streaming Restrictions

References

http://www.w3schools.com/html/html5_video.asp

Summary

In this article we have explored using Video Tag for a restricted SharePoint environment scenario.

Posted in SharePoint, SharePoint 2013 | Tagged: , , , , | Leave a Comment »

Claims Viewer Web Part – Installation

Posted by Paul on June 17, 2016

In this article we can explore how to Download & Install the claims viewer web part for SharePoint 2013.

Download

You can go the following location to get the web part:

https://sharepoint2013claimsviewer.codeplex.com/

From there choose the Downloads page:

image

You will get the WSP file.

image

The web part is Free for development & commercial use.

Installation

Once you have downloaded the WSP file, you need to install it. This is a Farm Solution so you require PowerShell.

Go to your SharePoint Server & Open the PowerShell window in Administrator mode.

image

You will get the following command window.

image

Run the following command to add the WSP package to Farm Solutions.

· Add-SPSolution “full path”

· Eg: Add-SPSolution “c:shared ClaimsViewerWebPart2013.wsp”

If things went well, you will get the following message.

image

Now run the following command to install the WSP package.

· Install-SPSoluiton ClaimsViewerWebPart2013.wsp –gacdeployment –webapplication http://yourserver

If things went well, you will the following output with no error messages.

image

Now you can come to your SharePoint site > Go to Site Collection features > Activate the following feature.

image

Once you have activated the feature, you can add the Web Part to a page.

Create a new page & choose the Insert web part option. You should be able to see the Claims web part as shown below.
image

Insert the web part & Save the page. You are ready to use the Claims Viewer web part.

image

image

Your claims may be different from the items shown above.

References

https://sharepoint2013claimsviewer.codeplex.com/

Summary

In this article we have explored how to install the Claims Viewer web part.

Posted in SharePoint, SharePoint 2013 | Tagged: , , , | Leave a Comment »

Claims Viewer Web Part

Posted by Paul on June 5, 2016

In this article we can explore the Claims Viewer Web Part.

About Web Part

I was working in a Claims enabled SharePoint Web Application where I felt the need of a Claims Viewer component which could display the current claims of the logged-in user.

Download

You can go the following location to get the web part:

https://sharepoint2013claimsviewer.codeplex.com/

Example

An example is displayed below.

image

Web Part

The above component is developed as a Web Part and requires Farm Solution for deployment. The C# code runs in the server-side and renders the claims values to the output.

Code

Following is the code which retrieves the claims.

protected void Page_Load(object sender, EventArgs e)

{

IClaimsPrincipal principal = Thread.CurrentPrincipal as IClaimsPrincipal;

IClaimsIdentity identity = principal.Identity as IClaimsIdentity;

IList<ClaimEntity> list = new List<ClaimEntity>();

foreach (Claim claim in identity.Claims)

list.Add(new ClaimEntity()

{

ClaimType = claim.ClaimType,

Value = claim.Value,

ValueType = claim.ValueType

});

RefreshGrid(list);

}

Once the user is logged in, the thread will contain the Claims Principal object. We can get the Claims from this object.

Each claim will have the following:

· Claim Type which is the pre-defined URL eg: http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier

· Claim Value which is the actual claim value eg: windowsadministrator

image
You can use the References for articles on Installation of the Claims Viewer web part.

References

https://sharepoint2013claimsviewer.codeplex.com/

Summary

In this article we have explored the usage of Claims Viewer web part.

Posted in SharePoint, SharePoint 2013 | Tagged: , , | Leave a Comment »

Configure Zone

Posted by Paul on April 15, 2016

This is a part of the article-series:

http://www.jeanpaulva.com/index.php/2015/04/25/app-development-pre-requisites/

Configure Zone

As part of Configuring App Domain, We need to create a Forward Lookup Zone.

Forward Lookup Zone

Forward Lookup Zone will use a Domain Name to find the IP Address.  In our case we need an App Domain Name.

Open DNS Manager.

image

Expand the Server > Forward Lookup Zone and choose New Zone.

image

Choose the Primary Zone which is default.

image

Leave the defaults in next pages too.

image

Enter the Zone name.  You can choose yours.  Mine is as following:

  • Machine name is sharepoint
  • Domain name is windows.net
  • App Domain name is sharepointapps.net

We need to enter the App Domain name as the Zone Name.

image

You can complete the wizard.

image

You will see the new zone name created in the left pane.  Right click on it to create the CNAME (Canonical Name is Aliasing an existing Domain name)

image

In the properties enter as following.  Here we are using sharepointapps.net as an alias pointing to sharepoint.windows.net which is the original computer fqdn name.

image

Note This step is very crucial.  Any wrong entry would cause the Apps to behave weird.

Posted in SharePoint, SharePoint 2013 | Leave a Comment »

Test SHA

Posted by Paul on April 7, 2016

This post is part of the article-series:

http://www.jeanpaulva.com/index.php/2015/04/25/app-development-pre-requisites/

Test SHA

In this post we can test the SharePoint Hosted App.

Following are the pre-requisites:

  • Create an App User
  • Zone should be configured
  • Apps should be Configured
  • Internet Explorer is required

Deploy

Right click on the solution & Deploy the App.

image


Viewing

You can view the App by logging into the SharePoint site as the App User.

You will see the App is displayed in the Quick Launch.

image

Clicking on it will get you get the Login prompt.

image

Enter the credentials and you will get the app launched.

image

Note

You may get repeated Login prompts if the Zones are configured in a wrong way.

Posted in SharePoint, SharePoint 2013 | Leave a Comment »

Promote as Domain Controller

Posted by Paul on March 17, 2016

This is a part of the article-series:

http://www.jeanpaulva.com/index.php/2015/04/25/app-development-pre-requisites/

Promote as Domain Controller

In order to Configure Apps, your Server should  be a Domain Controller.  To promote your Server as Domain Controller, follow the steps below.

Open Server Manager and Choose Manage > Add Roles and Features.

image

In the appearing window check the following highlighted item.

image

Click Next to continue and complete the wizard.

Once the wizard is completed come back to Server Manager and click on the Exclamation mark.  In the appearing menu below choose the Promote this server to a domain controller item.

image

In the appearing dialog choose the Add a new forest option.

You can enter your domain name.  For example:

  • I am using my computer name as sharepoint
  • My domain name is windows.net

image

Enter the password in the upcoming page.

image

Click the Wizards to end to complete the Domain Creation process.

You will be automatically restarted & once you log back in you can see the Domain Controller is installed.

Open My Computer > System Properties to view the following domain name.

image

This concludes promoting your server as a domain controller.  You can now continue with the rest of the posts.

Posted in SharePoint, SharePoint 2013 | Leave a Comment »