Top rated post today

  • N/A

Top rated post for the last 7 days

  • N/A

Top rated post for the last 28 days

  • N/A

Top rated post for the last 90 days


Madhawa Learns To Blog

Add Permission Level to a Sharepoint user group collection

        /// <summary>
        /// Add Permission Level to a Sharepoint user group collection
        /// </summary>
        /// <param name=”spWeb”>The sp web.</param>
        /// <param name=”permissionName”>Name of the permission.</param>
        /// <param name=”groupCollection”>The group collection.</param>
        public static void AddPermissionsToGroupCollection(SPWeb spWeb, string permissionName, string[] groupCollection)
        {
            SPSecurity.RunWithElevatedPrivileges(delegate
            {
                try
                {
                    //Allow updating of some sharepoint lists, (here spUsers, spGroups etc…)
                    [...]


Madhawa Learns To Blog

Get value collection of a SharePoint Choice Field

 public static List<string> GetChoiceFieldValues(string listName,string fieldName, string siteCollection, string webSite)
        {
            List<string> fieldList;
            SPSite spSite = null;
            SPWeb spWeb = null;
            try
            {
                if (siteCollection != null)
                    spSite = new SPSite(siteCollection);
                else
                    spSite = SPContext.Current.Site;
                if (webSite != null)
                    spWeb = spSite.OpenWeb(webSite);
                else
                    spWeb = spSite.OpenWeb();
                SPList spList = spWeb.Lists[listName];
                SPFieldChoice field = (SPFieldChoice)spList.Fields[fieldName];
                fieldList [...]


Madhawa Learns To Blog

Renaming a Report Server Computer and next….

You know what happens when we change the name of a SharePoint server right? It simply won’t work again unless you run the SharePoint Server configuration wizard.
So what would happen if you do the same for the SSRS (SQL server reporting services) server? Some say you might not be able to connect to the reporting [...]


Madhawa Learns To Blog

Errors “Microsoft .NET Framework 3.5 installation has failed. SQL 2008 Setup requires .NET 3.5 to be installed.” and “This server version is not supported. Only servers up to Microsoft SQL Server 2005 are supported.”

Today I had to work on a project which uses VS2008 and SQL Server 2008. I haven’t used SQL2008 but had used VS2008 a little bit. When I tried to install SQL2008 (Developer edition) got this strange error which says “Microsoft .NET Framework 3.5 installation has failed. SQL 2008 Setup requires .NET 3.5 to be [...]


Madhawa Learns To Blog

Add a user programmatically to a User Group in SharePoint

        /// <summary>
        /// Add a user to a Sharepoint group
        /// </summary>
        /// <param name=”userLoginName”>Login name of the user to add</param>
        /// <param name=”userGroupName”>Group name to add</param>
        private void AddUserToAGroup(string userLoginName, string userGroupName)
        {
            //Executes this method with Full Control rights even if the user does not otherwise have Full Control
            SPSecurity.RunWithElevatedPrivileges(delegate
            {
                //Don’t [...]


Madhawa Learns To Blog

Understand SharePoint Permissions

Check these really good articles by James Tsai.
Understand SharePoint Permissions - Part 1. SPBasePermissions in Hex, Decimal and Binary - The Basics
Understand SharePoint Permissions - Part 2. Check SharePoint user/group permissions with Permissions web service and JavaScript
Thanks Suranja for sending me these links.
 


Madhawa Learns To Blog

Can we deploy a Content Type as a feature with some extended settings like “Workflow settings” and “Information management policy settings”?

I have a small question for sharepoint experts. :) Can we deploy a Content Type as a feature with some extended settings like “Workflow settings” and “Information management policy settings”?
If so please enlighten me on how to do that.


Madhawa Learns To Blog

Connecting to the VPC Console Session Directly from RDP

Type below in the command line replacing <MC name or IP> with the machine name or IP you want to connect. This works with WinXP and Vista.
mstsc -v:<MC name or IP> /f -console


Madhawa Learns To Blog

STSDEV: Simple Tools for SharePoint 2007 Development, With different project name support

STSDEV is a simple tool for SharePoint developers. It helps you to create SharePoint projects (with solutions precisely) and deploy templates and components into the SharePoint 2007 platform.
http://www.codeplex.com/stsdev
This tool creates project and solution in same name and in the same folder. We all know we never put the solution and project files in the same [...]


Madhawa Learns To Blog

Effective Error handling in SQL Server 2005

One of the main things you should consider if you believe in good coding is error or exception handling. When it come to programming languages, now all popular object oriented languages have try, catch method to handle an exception.

We can put our code (which might gives errors or exceptions) inside the try block and error [...]


Madhawa Learns To Blog

Deploying Sharepoint sites in x64 servers

Well… After 6 months I’m gonna do it again. I don’t know people who used to visit my blog still are doing that. Anyway will tell ya what happened in last 6 months later. :D

Well today I was working on deploying a SharePoint site in 64 bit server. This is the first time I’m putting my hands [...]


Madhawa Learns To Blog

Google Singleton Detector

Google announced that they have opensourced the Google Singleton Detector, or GSD. Simply GSD is a tool which analyzes Java byte code and detects the use of Singletons.
As they say:
It’s not quite as simple as that, however. First, GSD doesn’t only detect singletons; it detects four different types of global state, including singletons, hingletons, [...]


Madhawa Learns To Blog

Is .net answer for GWT more powerful?

Visual WebGui is the .net answer for GWT (Google Web Toolkit). But it’s seems more powerful than GWT even though it’s not coming from Microsoft and yet it’s open source. Still I hadn’t got time to put my hands on deeply but you can feel it by just browsing their web site and checking the [...]


Madhawa Learns To Blog

Titan-IOC : A lightweight, flexible, general purpose inversion-of-control container for .NET applications

Well guys… If you have read my previous blog post about Guice and you are using only .net technologies you might got little bit worried of that why you can’t use such a nice framework. Don’t worry, there is a project going on at Google called Titan that inspired by Guice. It’s still in the [...]


Madhawa Learns To Blog

Guice: Google way of implementing Dependency Injection aka Inversion of Control

Doing some R&D works on GWT a few weeks back, I really fascinated on the Google frameworks. Next Google framework I’m gonna puts my hands on is Guice: Google way of implementing Dependency Injection.  That isn’t a company assignment but I think its worth to learn and try. Guice (pronounced “juice”) is an ultra-lightweight, next-generation [...]


Madhawa Learns To Blog

Simply the best video clip I have ever watched…..

Check this out. Worth to see.
http://www.glumbert.com/media/battlespecies
Thx Senthil for the url.


Madhawa Learns To Blog

Audio talk show in .net Rocks with Mark Pollack on Spring.Net

There is a good audio talk show in .net Rocks with Mark Pollack who founded Spring.Net. Particularly this show would be more useful if you are not aware of the potential of Spring.Net.
BTW Spring.Net has announced the release of  Spring.NET 1.1 M1 (Milestone 1). 
New features and improvements in the release are below.
    * [...]


Madhawa Learns To Blog

Develop Ajax applications in java using GWT

Last couple of weeks I was really busy with some R&D works on Google Web Toolkit (GWT).
May be you already know GWT is an open source software development framework for creating Ajax enabled web applications like Gmail. Wonderful thing about GWT is may be you don’t have any knowledge about Ajax or in depth [...]


Madhawa Learns To Blog

I’m back….

Well… folks it’s have been a long time that I didn’t post anything in the blog or in the forum. People were asking me, dude… what’s going on?
Actually what going on was mmm… nothing. Its just I didn’t post anything. I was kinda busy sometimes but that doesn’t mean I hadn’t got time to [...]


Madhawa Learns To Blog

Easy way to create a temp SSL for your local web server for testing your web application

It’s seems to me that lot of developers still don’t know there is a very easy way to create a temp SSL for your local server for testing your web application.
 
You don’t have to obtain a trial SSL’s from third party venders or installing and using certificate service.
 
All you have to do is just use [...]


Madhawa Learns To Blog

How to get XML view of a typed DataSet in Visual Studio 2005?

If you are coming from vs2k3 background you might know how easy to get the XML view of a Typed DataSet. But unfortunately in vs2k5 they have removed that convenient XML view tab.
So how we gonna see the xml of the typed dataset. One of my friends asked me today and my instance answer was [...]