SharePoint 2010 and Lync Integration different email address problem.

You wish to implement a custom webpart for SharePoint that integrates with OCS(Lync) to display user information such as presence
You’ve developed a custom code or webpart that using the javascript described here
http://blogs.msdn.com/b/uksharepoint/archive/2010/05/07/office-communicator-integration-presence-in-a-custom-webpart-for-sharepoint-2010.aspx
But you have faced that presence/pawn information look incorrect. Email adress are different. Like real  bugra@sip.blog.bugrapostaci.com shown instead of real email address of bugra@blog.bugrapostaci.com .

So this is a bydesign issue. Let explain how it is working:

Inside SharePoint we have a javascript library that resposible to show “presence” information named “INIT.JS” . It is a localized javascript file you can find this file
in SharePoint hive C:\program files\common files\microsoft shared\web  server extentions\14\TEMPLATE\Layouts\<your LCID code>\INIT.JS 
If you examine inside that code you will find that we are using an Office ActiveX control named NameCtrl . At the background the assembly of C:\Program Files\Microsoft Office\Office14\Name.dll which is loaded by browsers when you install office.
This ActiveX has responsible for communication and gather “Presence” information.
Users must have Office 2010, Office 2007, or Microsoft Office 2003 with the latest service pack installed to view extended presence information on a SharePoint Server page.
To display the presence indicator and its associated contact card (in Office 2010) or menu (in Office 2007 and Office 2003), SharePoint uses the Microsoft ActiveX control name.dll. The ActiveX control makes calls directly to the Microsoft Lync 2010 API, and then Lync makes MAPI or Exchange calls to supply the requested information.” http://technet.microsoft.com/en-us/library/gg398806.aspx

Presence is enabled in SharePoint by default; there are no configuration steps for the SharePoint administrator to perform. Each SharePoint page includes Microsoft JScript® code, which enables presence for that site. JScript uses name.dll to call the Lync API and pull presence for users names who appear on the site. JScript uses the users’ SIP URI to pull presence for names that are listed on the site. The following JScript code is an example of presence being pulled for a user named Bob Kelly, whose SIP URI is bobkelly@contoso.net. The SIP URI is added by using variables to the JScript when the script is loaded and presence is being pulled.

<a href=’jscript:;’ onclick=’IMNImageOnClick(event);return false;’ class=’ms-imnlink’><img name=’imnmark’ class=’ms-imnImg’ title=” border=’0′ height=’12’ width=’12’ src=’/_layouts/images/blank.gif’ alt=’No presence information’ sip=’bobkelly@contoso.net’ id=’imn_74,type=smtp’/></a><a onclick=”GoToLink(this);return false;” </a>

Please Check Resource Kit Book: SharePoint Integration
http://go.microsoft.com/fwlink/?LinkId=210991

it is not only bordered by SharePoint. You can easely develop a small ASP.Net application and can able to show Presence information.
Look for belowed code.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestIM._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">

var sipUri = "bugra@blog.bugrapostaci.com";
var nameCtrl = new ActiveXObject('Name.NameCtrl.1');
if (nameCtrl.PresenceEnabled)
{
  nameCtrl.OnStatusChange = onStatusChange;
  nameCtrl.GetStatus(sipUri, "1");
}

function onStatusChange(name, status, id)
{ 
   alert(name + ", " + status + ", " + id);
}
function ShowOOUI()
{
   nameCtrl.ShowOOUI(sipUri, 0, 15, 15);
}
function HideOOUI()
{
   nameCtrl.HideOOUI();
}
</script>
</head>
<body>
 <form id="form1" runat="server">
   <div>
    <span onmouseover="ShowOOUI()" onmouseout="HideOOUI()" style="border-style:solid">Here is the contact info</span>
   </div>
 </form>
</body>
</html>

Also within the blog mentioned in the issue description http://blogs.msdn.com/b/uksharepoint/archive/2010/05/07/office-communicator-integration-presence-in-a-custom-webpart-for-sharepoint-2010.aspx

The key piece of information to make the presence work is the user’s SIP Address which is basically their IM address (This is not always the same as email address). When a users is either added to a site in SharePoint or has their profile imported, the SIP Address will be drawn from Active Directory which is where OCS stores it and placed into the SIP address field in either the user’s profile which will in turn synchronise down to the site’s local ‘User Information’ page.”

The problem is if your SIP address and default email address are different that you will see sip address on presence information by design:
So you can do:

1. To be sure for preventing other problems by Installing latest office pathces. For Today it is SP1 for Office 2010 + the hotfix 2553112 2553112 Description of the Office 2010 hotfix package (name-x-none.msp): August 30, 2011 http://support.microsoft.com/kb/2553112/EN-US

2. If a user’s SIP proxy address and the user’s default e-mail address are different the presence information cannot be shown.Make sure the user’s SIP proxy address and the user’s default e-mail address are the same.Make them same.
http://support.microsoft.com/kb/2006610

Advertisement

Problem about Reporting Service (SSRS) for SharePoint 2010 Integration

Recently i faced fallowing error and decided that write about an article about SSRS with Sharepoint Integration because of MSDN articles is very detailed but sometimes the people can miss the basic points.Lets see what we faced:

The configuration parameter SharePointIntegrated is set to True but Share Point Object Model cannot be loaded.

System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ or one of its dependencies. The system cannot find the file specified. File name: ‘Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ at Microsoft.ReportingServices.SharePoint.Objects.RSSPImpSecurity.set_StaticCatchAccessDeniedException(Boolean value) at Microsoft.ReportingServices.SharePoint.Server.SharePointServiceHelper..ctor() at Microsoft.ReportingServices.SharePoint.Server.SharePointServiceHelperFactory.get_ServiceHelper() WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. . (rsSharePointObjectModelNotInstalled) Get Online Help

The cause of the problem is the server which SSRS installed has not  sharepoint installation.SSRS server and the sharepoint technology instance are on separated machines.If you deep in MSDN articles you can find fallowing informations :

You plan to immediately install the Reporting Services Add-in and configure report server integration settings on the SharePoint site. If the report server provides report processing capability to a SharePoint farm, you must also install a SharePoint Web front end on the report server computer so that you can join it to the farm
http://technet.microsoft.com/en-us/library/cc281311.aspx
“For deployments that include a SharePoint server farm, install a SharePoint Web front-end on the report server computer. The Web front-end joins the report server computer to a SharePoint farm. Installing the Web front-end on the report server computer is only necessary if you deploy the report server and the SharePoint technology instance on separate computers.”
Configuring Reporting Services for SharePoint 2010 Integration http://technet.microsoft.com/en-us/library/bb326356.aspx

Conculution:
So the SSRS server must be a member of the sharepoint farm. In order to join the farm, the farm must aware of the SSRS server. So we need to install the sharepoint web front-end on the SSRS server to make it able to communicate with other machines.

Please check for more info:
Requirements for Running Reporting Services in SharePoint Integrated Mode
http://technet.microsoft.com/en-us/library/bb283190.aspx