Using the My Site Organization Browser Web Part inside Non-My Site Application

People have liked the Organization Browser web part so much that they want the web part to be added to their companies main Portal web application. I too recently came across this interesting situation, wherein we were supposed to show the My Site Organization Browser web part inside our publishing site. It was a task that according to me was very small. Just add the Organization Browser web part from the Social Collaboration group (as shown in the figure below) in the webpage and you are sorted.

I started working on it. As mentioned, I just added the web part from the Social Collaboration group, and whoa!!!.. I was done. Wait......there was something wrong. The Silverlight web part did not show anything inside it. There was no rendering done. I tried to do a lot of tweaking, but to avail no success : (

I started searching for the solution over the internet, and noticed that I was not the only one facing the problem. Instead there were many with the same problem. Finally I got something that helped me resolve the issue. There are two approaches to resolve the issue. They are:

Solution 1:

The web part is available and functions as expected IF the Portal and My Sites are on the same web application. This implies that the My Site and the Portal should be configured on the same web application.

Solution 2:

Having the Portal and the My Site in the same web application is not a best practice approach. There are also the situations when the environments are entirely different. In such a scenario, when the Organization Browser is added on a page in the Portal web application, the web part is added properly, but it displays blank as shown below:





In order for the web part to function on the portal web application as it does on the My Sites, following are the steps to be followed:

    Create a clientaccesspolicy.xml file. This file will contain the following lines on xml:




 To follow the security best practices, limit this policy to allow access only to your portal web application.

2.Add this xml file inside the root of the virtual directories of both the portal web application and the My Sites web application. The virtual directories for the web sites are located within "C:\inetpub\wwwroot\wss\VirtualDirectories"

After you are done adding the file to the root directories of both the applications, open the portal web application and you would see the Organization Browser web part functioning properly. 


Comments

Popular posts from this blog

"There's a configuration problem preventing us from getting your document. If possible, try opening this document in Microsoft Word." Office WebApp Error

"We’re sorry. We ran into a problem completing your request. Please try that again in few minutes." Excel Service SharePoint

Deployment error "The web.config is invalid on this IIS Web Site"