Skip to main content

Posts

Showing posts from June, 2007
Use SharePoint Context Menu in Pure Web Application Include required styles and JavaScript files <script src="http://catorontdv71/_layouts/1033/owsbrows.js"></script> <script src="http://catorontdv71/_layouts/1033/ows.js"></script> <script language='javascript' src='http://catorontdv71/_layouts/1033/ie55up.js'></script> <script src="http://catorontdv71/_layouts/1033/Menu.js" type="text/JavaScript" language="JavaScript"></script> <script type="text/JavaScript" language="JavaScript"> <!-- var L_Menu_BaseUrl="http://catorontdv71"; var L_Menu_LCID="1033"; var L_Menu_SiteTheme=""; //--> </script> <script> if (browseris.mac && !browseris.ie5up) { var ms_maccssfpfixup = "http://catorontdv

Site Group .vs. Cross Site Group

Site group and cross site group are a great way to manage SharePoint site permission. Cross site group, compared to site group or Active Directory group, has more benefits. Cross site group is created in site collection level. Its working scope is the site collection, that is top level site and all its sub sites. While site group is only working in one individual site. Cross site group name can be the same in different site groups, but contains totally different users. While using Active Directory group, the group name must be unique across all site collections. Cross site group is much easier to manage. It does not need the IT department to create every single group you need in Active Directory for your SharePoint sites. When your SharePoint sites grow more and more, these Active Directory groups management will be a big issue.

SharePoint Web Part Cache .vs. ASP.NET cache

One major difference between web part cache and ASP.NET cache is web part cache can be stored per user or per web part, while the ASP.NET cache is global in one web application. Using web part cache, it is impossible to share cache between different web part instances (Same type web parts). C# protected void PartCacheWrite ( Storage storage, string key, Object value, TimeSpan timeout ) In the web part cache write method, the first parameter storage is an enumerate value, it can be Personal or Shared. When it is set to Personal, the cache is per user basis; when it is set to Shared, the cache is per web part basis. Also we can notice that there is no dependency capability in web part cache.

Develop Asynchronous Web Parts

By default, custom web part uses synchronous mechanism. If in a web part page, there are many web parts, each web part takes some time to retrieve data from either web service or back end database. The overall performance of the web part page will likely be bad. All the web parts rendered in sequence. Second web part must wait until first web part finishes its rendering, third web part must wait until second web part finished its work. The solution is to use asynchronous mechanism. Asynchronous support is built into the SharePoint web part framework and is very easy to use. You need to follow these steps to use asynchronous call. Derive a custom Web Part class from base WebPart class in Microsoft.SharePoint.dll assembly. Override method named GetRequiresData . Override method named GetData In GetRequiresData method return a value of true. It tells the Web Part framework to call your overridden version of GetData method. In GetData method, register a custom callback method by calling

SharePoint 2003 Single SignOn

There is a very good article in Microsoft TechNet talking about Microsoft Single SignOn service. It discusses Single SignOn architecture, configuring and managing Single SignOn and how to use Single SignOn in web parts. Single Sign-On in SharePoint Portal Server 2003 There is another good posting in MSDN blogs providing a good example about how to use Microsoft Single SignOn service. It also contains sample code to download: Impersonation, Single Sign-on, and SPS If you want to integrate 3rd party Single SignOn service into SharePoint 2003, read this article. It gives an example of how to use SiteMinder Single SignOn service for SharePoint 2003 server. Integrating 3rd Party Single Sign On in Sharepoint Portal Server

MOSS 2007 Shared Service Provider (SSP)

Shared Service Provider. This is a collection of application servers that provide shared services out to any portals or sites that need them. These services include: Search Index Audience compilation User profiles database My Sites Business Data Catalogue Excel Services Any of the above services can exist on any number of servers on SSP except Index service, which can only have one per SSP. SSP has no affiliation to portal. In MOSS 2007, portal (web application) is just a site collection with no application services inside. All the application services will be provided by SSP. It's possible to create two different SSPs within the same server farm, each with its own configuration. Within a MOSS 2007 farm, each Web application is associated with exactly one SSP. Reference: MOSS Architecture and Shared Services

SharePoint 2003 and Exchange 2003 Integration

There are 3 possible ways to integrate SharePoint 2003 and Exchange Server 2003: Using the Exchange Web Parts Displaying Exchange Data in a Page Viewer Web Part Creating an E-Mail-Enabled Document Library Using the Exchange Web Parts: SharePoint 2003 provides 4 web parts that can display Exchange mailbox data. These web parts are: My Calendar My Inbox My Mail Folder My Tasks Display Exchange Data in a Page Viewer Web Part: You can use Page Viewer web part to display content in Exchange Server 2003 public folder. Configure the URL in page viewer web part to point to: http:// exchangeservername /public/company%20meetings/?cmd=contents&view=monthly Possible view parameter can be daily, weekly and monthly. It is case sensitive. Creating an E-Mail-Enabled Document Library SharePoint 2003 document library can be linked to Exchange public folder, so any files attached to the message sent to public folder will be copied to linked document library. Exchange will also populat

Javascript null and undefined

In javascript language, null is a special object. When you declare a variable and do not assign any value to it, the following evaluation will return true: var a; if(a == null) alert("a is null"); if(!a) alert("!a is true"); You will see both alert boxes. However, if there is no variable a defined in your javascript function, the evaluations above will cause a javascript error. To avoid the javascript error, you should use the following statement to check if the variable is defined or not: // a is not defined anywhere in your javascript // if(!a) will throw an exception // if(a == null) will also throw an exception // following statement will show the alert box if(typeof(a) == 'undefined') alert("variable a is not defined yet");