Sridhar's blog

SharePoint programming and customization.

Browse by Tags

Tagged Content List
  • Blog Post: SharePoint IRM Protectors implemented in managed code

    Can SharePoint IRM (Information Rights Management) Protectors be implemented in managed code (C#)?  - was the question I asked when I had a customer who implemented an IRM protector in C# and was running into a problem in registering it with SharePoint. Technically, SharePoint IRM Protector is a...
  • Blog Post: Working with SharePoint 2010 Client Object Model on an SSL enabled site

    When working SharePoint 2010 Client Object Model on an SSL enabled SharePoint 2010 site, we also need to pass in the certificate and validate it for the client object model calls to work. Below is a sample. 1: private void button1_Click( object sender, EventArgs e) 2: { 3: ClientContext...
  • Blog Post: Uploading files using Client Object Model in SharePoint 2010

    There are 2 ways to upload files to SharePoint 2010 document libraries using managed client object model. The first method uses a client library batch mechanism.  It will encode the binary using BASE64 encoding, which could increase the message size by one third.  There might be problems if...
  • Blog Post: LINQ to SharePoint 2010

    Wow! LINQ to SharePoint 2010 is awesome! You have to work with it to see how it simplifies development tasks.  I especially love the ability to see what underlying CAML that’s generated on the fly and passed to the server for execution.  With LINQ to SharePoint, I believe, we need to have our...
  • Blog Post: HowTo: Create a quizzing application with SharePoint 2007

    With SharePoint 2007 "Survey" list template, I recently created a quizzing application. The thing with survey list is that it stack ranks the questions taking into account how many of the respondents favored each options within that question. But for a quizzing application, we need to be able to stack...
  • Blog Post: How do I use SecureString type in SharePoint 2007?

    SecureString is the type that's used for passwords in SharePoint 2007. You might find its use when you are automating some "higher level" administration operation (like creating a web application for example). How do you use it is shown below: 1: private static SecureString ConvertString( string...
  • Blog Post: Using Post Caching Substitution in SharePoint 2007 Web Parts

    There are good number of articles that explains the different caching option Microsoft Office SharePoint Server 2007 provides and ways to leverage them to achieve better site performance. However, there are scenarios where you might want to implement output caching on your site/page, but have some controls...
  • Blog Post: Wildcard Search in SharePoint

    Being able to perform wildcard search is probably an area that's missing in out of the box search in SharePoint. Here's a small web part sample you can use to perform wildcard search in MOSS 2007 (and it can be engineered backward to fit into SharePoint Portal Server 2003 as well). The code in it...
  • Blog Post: "Failed to verify user permissions" error when using DspSts.asmx web service

    I recently handled a case where the customer sees a "Failed to verify user permissions" error when accessing the DspSts.asmx web service in SharePoint 2007. Below is the code similar to what they were using to invoke the Query method of DspSts.asmx web service. It's also very similar to the same provided...
  • Blog Post: The buzz with "UrlQueryString" in SharePoint navigation

    SharePoint's navigation APIs have a property exposed that allows us to set query string properties for a URL. Sadly, but not surprisingly, this only works when root site collection has publishing feature enabled. Reason is simple... One a WSS only OR on a site where publishing feature is not enabled...
  • Blog Post: FBA and User Display Names in SharePoint 2007

    If you have been working with FBA for a while, you might have noticed that the user name displayed in the Welcome control shows the account name of the FBA user. This is because of the field the welcome control is mapped to. As shown here, the welcome control simply points to the name property...
  • Blog Post: Why are my SharePoint Groups drop-down disabled?

    This was an interesting issue.  The problem a customer reported was that when they wanted to add a user to a SharePoint Group, the "Add users to a SharePoint group" drop-down was disabled.  On investigation, it was found the customer was creating a web application and a site collection...
  • Blog Post: What permissions are behind the permission levels (roles) in SharePoint

    Recently, I was involved in a support request where I had to find out what SPBasePermissions are assigned behind permission level in SharePoint using SharePoint OM code. First some basics about permission level and base permissions. If you are in your SharePoint site, click Site Actions > Site...
  • Blog Post: Create and Publish web pages in Publishing SharePoint sites programmatically

    Microsoft.SharePoint.Publishing is the assembly that we need to use to get pages created and published. A sample is provided below: using ( SPSite site = new SPSite ( "http://moss" )) { using ( SPWeb web = site.OpenWeb()) { PublishingSite pSite = new PublishingSite (site); SPContentType ctype...
  • Blog Post: "The security validation for this page is invalid" error when updating objects through SharePoint object model

    This error is often encountered when SharePoint OM is used to update site/web/list objects from within a web context. Some thing so basic as the code below could fail: using ( SPSite site = new SPSite ( "http://moss" )) { using ( SPWeb web = site.OpenWeb()) { SPList list = web.Lists[ "List1" ...
  • Blog Post: Programming navigation in WSS 3.0

    Modifying navigation elements through code is quite tricky in WSS 3.0. Here are few scenarios, I’ve tried to cover that I think will be helpful in playing around with WSS 3.0 navigation elements. I’ve used the top navigation bar in these examples. But the same code should work for quick launch as well...
  • Blog Post: Add/Update "sealed" properties in SharePoint lists

    There’s always a question about updating properties in a list in SharePoint. Specifically, properties like “Modified By”, “Modified” etc., WSS 3.0 provides greater flexibility for enabling developers to do this with ease. Usually, this scenario would be required when users with “Read” rights need to...
  • Blog Post: "Out of Memory" exception - when adding item to a list using SharePoint OM

    Here’s the scenario: A tool that’s designed to add log messages from an application to a SharePoint list. The log messages are themselves “strings”, which when put in a text file may vary anywhere between 1kb to 10mb in size. At a single time, this logging process can run for anywhere between 20-30 minutes...
Page 1 of 1 (18 items)