Wednesday, November 29, 2006

Determining the Current User Context inside Sharepoint
 
What's the best way to determine the current user within a custom web part
developed for MOSS 2007?  I've found four solutions so far, but I'm pretty sure
there are more:

1. Use System.Web.HttpContext.Current.User.Identity.Name, like in any 
    ASP.Net web application


2. Use System.Security.Principal.WindowsIdentity.GetCurrent().Name


3. Have the Current User Filter send the current user to your web part,
    and (of course) make your web part a consumer of that value.

4. SPWeb web = SPControl.GetContextWeb(Context); 
    SPUser currentUser = web.CurrentUser;

Monday, November 27, 2006

Resolving : Server is either too busy or not responding in SQL Server 2005 Analysis Services
 
I recently faced this error while connecting to Microsoft SQL Server 2005 Analysis services from Microsoft
Excel 2007. Inspite of the several solutions given on various sites none of them seemed to work.
 
The solution was simple, you need to install Microsoft OLE DB Driver 9.0 for SQL 2005, old 8.0 drivers
doesnt work.
 
To install the driver go to this page :
 
and choose the appropriate download. Note that the download needs to be installed for every client access machine.