Friday, May 29, 2009

Get SSP URL

 Use the following Chunk 2 get the SSP URL. This uses reflection mechanism.

 private string getSSPURL()
{
     string uri = string.Empty;
     ServerContext sc = ServerContext.Default;
     object ssp = sc.GetType().GetProperty("SharedResourceProvider",BindingFlags.Instance | BindingFlags.NonPublic).GetValue(sc, null);
     Guid sspGuid = (Guid)ssp.GetType().GetProperty("AdministrationSiteId").GetValue(ssp, null);
     using (SPSite sspSite = new SPSite(sspGuid))
     {
       uri = sspSite.WebApplication.GetResponseUri(SPUrlZone.Default).AbsoluteUri + "ssp/admin";
     }
     return uri;
  }

Wednesday, May 20, 2009

Kerberos - Pros & Cons

Pros:

  1. Faster performance is experienced when using Kerberos as it caches information about the client after authentication. This means that it can perform better than NTLM particularly in large farm environments
  2. Delegation - Kerberos can delegate the client credentials from the SharePoint front-end web server to other back-end servers like Oracle. So you are eliminating double hops. (Login Challenges)
  3. You can also with MOSS 2007 utilize RSS feeds "Within your SharePoint Environment" 
  4. Microsoft recommends to "Use Kerberos authentication for sites with a high security service level agreement."
  5. Federated Search between Farms (e.g., will work based as the user credentials are passed automatically.)
  6. Planning on utilizing BDC some LOB Applications will require Kerberos authentication.
  7. SQL Serer Reporting Services integration works well with Kerberos.
  8. Switch back to NTLM is possible.

 

Cons:

  1. In Active Directory, SPN should be configured carefully .If not troubleshooting is difficult

 

Related Links:

http://technet.microsoft.com/en-us/library/cc288475.aspx

http://ablog.apress.com/?p=1127

http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/de88fb8c-0101-4413-9855-34501569e077

http://blogs.msdn.com/martinkearn/archive/2007/04/23/configuring-kerberos-for-sharepoint-2007-part-1-base-configuration-for-sharepoint.aspx

 

Friday, May 15, 2009

Compiling audience object model.

Refer the community content by me at
http://msdn.microsoft.com/en-us/library/microsoft.office.server.audience.audiencemanager.aspx

MSDN Note "Compiling audiences is not supported in the object model."
Actually we can compile the audience.
Following code to compile all the audiences.
Add Reference Microsoft Search Component(Microsoft.Office.Server.Search.dll)
using Microsoft.Office.Server.Search.Administration;

using (SPSite site = new SPSite(txtSite.Text))
{
ServerContext context = ServerContext.GetContext(site);
SearchContext searchContext = SearchContext.GetContext(context);
string[] args = new string[3];
args[0] = searchContext.Name;
args[1] = "1"; //"1" = start job, "0" = stop job
args[2] = "1"; //"1" = full compilation, "0" = incremental compilation (optional, default = 0)
AudienceJob.RunAudienceJob(args);
System.Threading.Thread.Sleep(3000);
}

To Compile a specific audience, add the optional arg[3] after making the String array size to 4 and specify the Audience Name.

Tuesday, May 12, 2009

The lifecycle events of a Sharepoint Connectable WebPart wih a single ViewState backed property;

On Page Load

  1. Constructor
  2. OnInit
  3. OnLoad
  4. ConnectionConsumer method is called if web part is connectable (sets the connection providers interface in the webpart)
  5. CreateChildControls
  6. OnPreRender (if your web part is connectable you would typically call the connection provider here to retrieve data)
  7. SaveViewState
  8. Render
  9. RenderChildren
  10. RenderContents
On 1st Postback
(PostBack click handler sets ViewState via public Property)

  1. Constructor
  2. OnInit
  3. CreateChildControls
  4. OnLoad
  5. PostBack click handling
  6. ConnectionConsumer method is called if web part is connectable (sets the connection providers interface in the webpart)
  7. OnPreRender (if your web part is connectable you would typically call the connection provider here to retrieve data)
  8. SaveViewState
  9. Render
  10. RenderChildren
  11. RenderContents
On 2nd Postback
(PostBack click handler sets ViewState via public Property)

  1. Constructor
  2. OnInit
  3. LoadViewState
  4. CreateChildControls
  5. OnLoad
  6. PostBack click handling
  7. ConnectionConsumer method is called if web part is connectable (sets the connection providers interface in the webpart)
  8. OnPreRender (if your web part is connectable you would typically call the connection provider here to retrieve data)
  9. SaveViewState
  10. Render
  11. RenderChildren
  12. RenderContents
Note that during the 2nd postback, LoadViewState, is called, since in the 1st postback the click handler sets the value of the ViewState backed public property.

Friday, May 8, 2009

SharePoint Developer download Links

MOSS SP2 Available

SP2 = SP1 + InfraUpdate + Feb 2009 CumulativeUpdate.

  1. DB StatisticsTimer Job rebuilds content db indexes everytime to stop fragmentation and maintain performance.
  2. Automatic setting of read-only and updates the user interace so that users cannot perform tasks that write to db.
  3. Browser now supports IE 8, Firefox 2 and Firefox 3.

Windows SharePoint Services 3.0 Service Pack 2 (SP2) – English

http://www.microsoft.com/downloads/details.aspx?FamilyId=79BADA82-C13F-44C1-BDC1-D0447337051B&displaylang=en

 

The 2007 Microsoft Office Servers Service Pack 2 (SP2)

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=b7816d90-5fc6-4347-89b0-a80deb27a082

 

List of sp2 are its details link

http://support.microsoft.com/kb/968170

Wednesday, May 6, 2009

SharePoint WSS Extensions 64-bit and 32-bit Visual Studio 2008

  1. Download Visual Studio 2008 extensions for Windows SharePoint Services 3.0, v1.3 - Mar 2009 CTP
  2. http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=fb9d4b85-da2a-432e-91fb-d505199c49f6
  3. To Successfully Deploy Solutions follow these steps
  4. From Cmd, go to 
  5. C:\Inetpub\Adminscripts>
  6. and run the following.
  7. cscript adsutil.vbs set w3svc/1/root/NTAuthenticationProviders "Negotiate,NTLM" 
The last step is explained in detail the following link
(NTLM must be enabled on the IIS server. See the following for instructions on how to enable it:  http://support.microsoft.com/kb/215383)

Microsoft Sharepoint Language Codes

I have compiled from the following link
Please confirm before use. I used some of these and it was fine.

Arabic ar-sa
Bulgarian bg-bg
Catalan ca-es
Chinese - Simplified zh-cn
Chinese - Traditional zh-tw
Croatian hr-hr
Czech cs-cz
Danish da-dk
Dutch nl-nl
English en-us
Estonian et-ee
Finnish fi-fi
French fr-fr
German de-de
Greek el-gr
Hebrew he-il
Hindi hi-in
Hungarian hu-hu
Italian it-it
Japanese ja-jp
Korean ko-kr
Latvian lv-lv
Lithuanian lt-lt
Norwegian nb-no
Polish pl-pl
Portuguese - Brazil pt-br
Portuguese - Portugal pt-pt
Romanian ro-ro
Russian ru-ru
Serbian - Latin sr-latn-cs
Slovak sk-sk
Slovenian sl-si
Spanish es-es
Swedish sv-se
Thai th-th
Turkish tr-tr
Ukrainian uk-ua