SharePoint – The MOSS

My SharePoint Treasurechest

Archive for the ‘SharePoint’ Category

SharePoint Platform & Data Storage

Posted by kusek on July 8, 2009

 

    Yesterday I attended a Microsoft webcast on how they have implemented the IT Web (Microsoft’s Intranet) which was in SharePoint. I have captured few points that highlighted tips on the SharePoint Platform and the Data Storage (To List or not to List). Please find the Screen clip of the Presentation. One another nice thing is they have used Content Query Web Part also they have customized it and named it as Content Query Web Part Override I didn’t get the location for it.[May be I will update link once I get it] basically it had couple missing pieces in the out of the box CQWP, like add the view fields in the Toolpart etc,editing the CAML query etc.

 

Posted in Customizations | Leave a Comment »

Enable Client Integration – User permissions for Web Application – Caution

Posted by kusek on June 26, 2009

    First a little background. We all know that SharePoint by default comes with the some pre-defined permission levels. Represented by class RoleDefinitions in Object model. You can browse through the following URL http://Sitename/_layouts/role.aspx and find the set of permission level your site has.

    In addition to the above permission level you have an option of creating a new Permission Level (RoleDefinition) as per your needs. This doesn’t stop there; we have an option to restrict the permissions that can be used in the Web Application. Well what it means is, Say for Example if you don’t want any user (ANY USER yes I mean it Site Collection Administrator as well) of site to delete or Manage Web, but wait how can I prevent Site Collection Administrator from deleting the site, s/he is a big guy he got all power to do all s/he wants in a Site Collection. That’s true but there is another real big guy Farm Administrator. If he decides not to allow Site Delete for a Web Application he can do so by just un-checking the to Manage Web Site permission in the User Permissions for Web Application page http://Central AdminSite/_admin/vsmask.aspx. With this background we can see what gets interesting.

    Say you have a Code in your application that check to see if the user has Contributor right in a web, as below

Code Block # 1

 using (SPSite oSite = new SPSite(http://xxx))

{

   using (SPWeb oWeb = oSite.RootWeb)

{

    if(oWeb.DoesUserHavePermissions( oWeb.RoleDefinitions["Contribute"].BasePermissions))

        //Do Something
    else

        //Do Something 

      }

}

    

    Above code will work fine until our real big guy Farm Administrator comes in, now he decides to revoke the Delete Permission from the Web Application. Now above code will start to break, it will keep returning false as the Contributor Role definition was built with the Delete Permission with it, and as it has been removed by the Farm Administrator, your EffectivePermission will not match the RoleDefinition of Contributor. Below statement will not be true.

Code Block # 2

oWeb.EffectiveBasePermissions== oWeb.RoleDefinitions["Contribute"].BasePermissions

 

Okay how do I fix it, just go to your permission Level page, edit the Contribute permission level do nothing, just save it. Now the absence of the delete permission has been informed to RoleDefinition
Contribute and your code will start working.

But still I got more interesting information for you; in SPBasePermission enum out of 33 Permission we have a value called SPBasePermissions.UseClientIntegration, Which launch client applications. Without this permission, users will have to work on documents locally and upload their changes. Like any permission you can disable this at the User Permissions for Web Application page of central admin. But there is another place where you can disable this as well, yes that is at the Authentication Provider page. Select authentication provider and end of the page say no to Enable Client Integration? Well that was simple change but to find it we had real tough time. When you say no to Enable Client Integration?

What happens is that SPBasePermissions.UseClientIntegration will be removed from the permission but it will not get reflected in the UI both at the User Permissions for Web Application page and at the Permission Level page. With this state you will always get the Code Block # 1 executed to false. Because your EffectivePermission doesn’t include the SPBasePermissions.UseClientIntegration. So you need to manually remove this option from the RoleDefintion to make the code work.

Should I call it a bug, when it is really not there why should UI show that ????

Posted in Customizations, SPBasePermissions, SPBasePermissions.UseClientIntegration, SharePoint | Leave a Comment »

This field can have no more than 255 characters.

Posted by kusek on May 21, 2009

    Well you should have seen this message if you have a custom multiline column added to the SharePoint document library and try to add a text that is more than 255 Characters. And there is no way around to solve this issue in the SharePoint UI/ at least I didn’t find one so far.

Today I was trying to create a custom list template, and found an attribute called UnlimitedLengthInDocumentLibrary. This is the attribute that will solve your issue. And in case if you don’t want to create a custom List Template to solve this issue , there is a easier way around this.

Hope this helps!!!!

Posted in Customizations, SharePoint | Leave a Comment »

Get ! Set ! SP2 – SharePoint Server – MOSS -SP2

Posted by kusek on April 28, 2009

Today Microsoft has released the SP2 for Office Products which includes the SharePoint as well, Refer this link  (I saw this announcement first ) for more details or refer the SharePoint team blog post  Link 

Items that attracted my Attention in SP2.

  • FBA & Office Integration:…..provide a much smoother user experience and make client integration a viable option for forms-based authentication users…..
  • InfoPath form: Performance enhancements in SP2 reduce both the memory requirements and the page load times for large browser-rendered forms
  • Browser Support  (IE8)
  • Pre-Upgrade Check for Microsoft SharePoint 2010 – Big Wow

Posted in SharePoint | Leave a Comment »

List all SharePoint Databases

Posted by kusek on April 15, 2009

 

Have you lately tried to find list of DB’s used by SharePoint. Sure you would have at least one time. I used to go searching the Central Admin – Content DB option and take note of the SSP, Search db etc. Today I landed up here a smart way to do that :) .

Trick is to navigate Central Admin -> Operations -> Perform a Backup. All at one place nice Isn’t ?

Posted in SharePoint | Leave a Comment »

SharePoint designer is Free now

Posted by kusek on April 2, 2009

 

    From April 2, 2009 SharePoint designer is free tool and all the releases down the line will also be free as well. For those you have a SPD licenses already can avail Express Web upgrade.

    You can download the free version here Direct Download page.

    SPD Landing page.

    More information – FAQ and Announcement.

Cheers J

Posted in Customizations, SharePoint, SharePoint Designer, SharePoint Tools | Leave a Comment »

Could not find exactly 1 Member with name ‘%s’ Parameter name: fieldname – Business Data Catalog Definition Editor

Posted by kusek on March 17, 2009

    Recently I was building a BDC application using the “Business Data Catalog Definition Editor”. It’s a nice free tool that comes with the MOSS SDK, By default it generates the SpecificFinder and IdEnumerator methods.It doesn’t do the same for the Finder method. I was trying to create one Finder method and landed up in the following error that says “Could not find exactly 1 Member with name ‘[ColumnName]‘ Parameter name: fieldname”, before figuring out it is not my mistake I spent couple of hours to make sure that all the steps I have followed is right . Finally I came across this article that helped me to solve the issue {Thanks Chris}. As it was hard to find the solution in the net I am reposting the steps to resolve the error.

                         Key point here is that In Parameters should be specified before the Return parameter. That will solve the issue.

Posted in BDC, Business Data Catalog, MOSS2007, SharePoint, SharePoint Tools | Leave a Comment »

SharePoint & ASP.NET 3.5 Quick Tips

Posted by kusek on January 2, 2009

    Recently I was working on a task of converting the SharePoint site running in ASP.NET 2.0 to ASP.NET 3.5. If you are doing the same there is an easier and nice way to do the same. Please follow this link which guides you a kind of automated way to achieve it. Make sure that you include the System.Web.Extensions assembly in the SafeControls.

Also after done with the conversion I tried to code come web Services by using Hand much without intelli-sence help of Visual Studio, when which I encountered an interesting issue in fact a compiler error which says ‘System.Data.DataRowCollection’ does not contain a definition for ‘Cast’ and the best extension method overload ‘System.Data.EnumerableRowCollectionExtensions.Cast<TResult>(System.Data.EnumerableRowCollection)’ has some invalid arguments. Initially I narrowed down it to be some configuration issue, but it was because of missing Namespace. System.Linq By the fact that all the extension methods are defined in the System.Linq Namespace.

Posted in ASP.NET 3.5, LINQ, SharePoint | Leave a Comment »

SharePoint Role Definition / Permission levels

Posted by kusek on December 10, 2008

    By default SharePoint has list of predefined Role Definitions that gets created during the site creation. If you want to create Additional Role Definitions you can do so by navigating to the Site Permission page and selecting Permission Levels from the Action menu. There will also be cases where we might need to create them programmatically. Here (Please use Save Target as option to down load the file) you can find a small project that creates permission levels programmatically.

    I have created this utility, to give more option to the user that is not available/easy in the SharePoint UI. But the one attached here is at very beginning stage; it just does what SP UI does, you can use it to learn how to create Permission levels programmatically. Will update the code once I add more options to it.

Posted in SPBasePermissions, SharePoint, SharePoint Security | Leave a Comment »

My First MOSS Project is Live

Posted by kusek on December 9, 2008

Today morning, my mentor, friend, brother [Will update moreJ] Senthil Sathyamoorthi called me for my surprise and informed that the project in which I was part of in the previous Organization went live. I was so happy and emotional to find my name in the comments. I browsed through all the pages in the site, recollecting the days we worked, fun we had hurdles we faced.

    The reason why am so existed is that it was my first MOSS 2007 project, that started when MOSS 2007 was in Beta 2, and evolved through the migration path Beta2->B2TR->RTM.It used Web Content Management feature of MOSS 2007.We learnt so much out of it especially for me it was a great learning that laid a foundation for what I am now.

    Though it has been completed a year back, just now it is getting released am unaware of the reason for the delay. Here is the list of people, who were part of it and my thanks to all of them

  • Rajesh Mouli (My Manager)
  • Roxy (Manager)
  • Shahid Banday (Nice and Cool guy to work with)
  • Vijay Nats (Cool guy)
  • Santosh (Graphic Designer – I was bugging him a lot)
  • Nagammai ( One who kept searching for Bugs all the time)
  • Hari (Tech Lead guidance for the integration part)
  • Edwin (BizTalk expert)
  • Sayee ( Directory – IT)
  • There are others to whom I am not directly worked (UI designer, Project sponser, CEO, Operations head, Interns….)
  • Senthil (Sanjay) & Ramesh – Who helped me in the Initial stage of the project when I got struck up with ASP.NET issues; they thought me some core concepts of ASP.NET.

Here is the link                 

Posted in SharePoint | Leave a Comment »