RBAC(Role Based Access Control) is something that is very common in the day-to-day world.
    So what is this all about.It is just about a authorization check on whether you have the access to a particular resource or not.
    When faced with scenarios like this when developing applications, where you have to implement Role based access for the different users that are to use the system you might be confused on how to implement this.
    Say you have a WCF service exposing a set of services.You have a WPF thick client consuming this service.Say for example you are exposing a service to Add/Delete/View Employees.Based on the various roles you need to allow/disallow the access to the functionality.The easiest way would be enable/disable the controls that would be used invoke the corresponding functionality,based on the user role.
    So am I done?
    What if tomorrow you are exposing this service to some other client of yours,who is to develop his on User Interface(UI) for the service.
    Do I have a problem here?
    Yes of course!!!
    What if he does not make the same check on the UI to enable/disable the controls that would act as his inputs.So here exactly is where you have a access break.Any user will be able to perform all functions irrespective of the access specified for him.
    So how do I go about?
    Make this check at the service level itself.Check for access and throw a NoAccess exception if not authorized.What exactly happens when you try to enter a no-access area in your office :)
    UI synchronization is an added level to this,so that you can stop unnecessary service calls.

    Will soon post a implementation sample :)

    visual studio debug not working Quite a few days back,I faced a peculiar problem :).Visual Studio was not having the green play button(the one for Start Debugging) enabled.No way was I able to start debugging.
    Google gave many suggestions,none was of help.
    I soon found out that,in Startup Projects(From the menu Project -> Properties),the option multiple was selected and all the projects were set to an action None)(Setting this to Start Without debugging also creates this same problem) :)

    Yet to find out how this happened automatically but still setting up the startup project,made the green button glow :)

    Be sure to check this the next time if the green button doesn’t glow :)

    Since this comes under the ‘WF’ tag it would not be difficult for anyone to understand what I am talking about.
    Yes its ‘Activity’.
    Activity is nothing but a piece of re-usable component performing a specified task.When I say re-usable it means across multiple workflows and thats where the catch is.Write Once ,Test Once and there you have something which works fine wherever put into.
    WF ships with many activities,a list of which you will find here.The real power of WF is not in the out-of-the-box activities it ships with..it lies within you..Custom Activities.

    My first question to such a statement would be,WHY?
    WF is nothing but organizing activities in a logical manner addressing the requirement at stake.So the more of custom built activities you have the more easier and faster it is to address your needs.It all becomes the drag’n’drop funda microsoft boasts about and the reason why more developer turn towards it.The same reason why a GUI developer would go for a custom control rather than tweaking existing controls in every page he needs a similar look’n’feel.

    Activities are of 2 type
    1. Basic/Simple Activity
    2. Composite Activity

    Put everything in the code activity(the best example for a simple activity) and get done with the work assigned would be another approach amongst us.A definite YES keeping in mind the short term task at hand.But a big NO on the long run.
    Code Activities ends within the current workflow.Re-usability across workflows is the key factor that is at stake in this approach,which should makes us think twice before using one.CodeActivities,mostly would be fully dependent on the instance properties of the workflow,which makes testing of something performed within the activity require the full workflow to be executed.
    On the other hand a Custom Activity has its own properties on which it depends,can be tested individually and above all can be re-used across workflows.

    So the next time you drag’n’drop a Code Activity from the toolbox think twice :)

    Will catch you on developing a custom activity soon :)

    With WPF(Windows Presentation Foundation), we saw the complete designer-developer separation,making it one of the best presentation technologies available at present.
    Windows Workflow Foundation(WF) brings about the separation of the ‘when-and-what’,says Bruce Bukovics,author of Pro WF: Windows Workflow in .NET 4 (Expert’s Voice in .NET).You get to change the when without touching the what.All the business logic are packed into components,activities rather(in WF terms) and the control flow is between the activities is ‘declaratively’ controlled.Don’t be surprised,its XAML again.

    Though being newbie on WF,I got to take a session on WF,at my workplace, which made me dive little more deeper into it(so that I don’t bluff my way through the 1 hour session :) ).All I could explore was the overview of the features,which seems promising and interesting.
    This book I got hold of seems to clear the way ahead and make it easy.

    More on WF soon :)

    nokia n95 review Of all the mobiles I have used till date this one goes top on my rating.With its elegant design,built quality and power packed features,the N95 8GB was worth every penny spent.8GB was not much of an attraction though, but definitely it being internal memory,boosted the performance.No longer I felt the time lag in apps opening,as in the previous models of Nokia.
    Though its been a long time this big monster has been released it demands this piece of space here.
    Not going into the specs of the phone,for there are sites which gives them in and out like this one here.
    The 5 mega pixel camera is definitely a lookout feature,for you no more need a dedicated camera,if all you want is a snap of the moment.
    The two way slide feature with dedicated music keys makes it to be on the race with pmp’s out in the store,with the battery lasting pretty enough for an average music lover.
    With the wide range of apps available for the symbian os , this definitely was the king of its times…..Nokia N95 8GB

    **edit: **here goes a list of must have apps in the n95

    With all banks stopping on EMI(Equated Monthly Installment),with recession at its high,I was left with no choice for a long time,but to depend on internet cafe’s,as my compaq V2624TU got some hardware problems and wouldn’t start up.Blogging was on the verge of stopping…..thanks to my brother,Sagar,who turned my new banker for the brand new HP DV4.

    Thanks a lot bro :)

    Got to start saving though,for always bankers might not be there nor will EMI’s(they really helped for my previous purchases).
    Hoping to make it a resolution(you always want something’s to be broken),for the year 2010.

    Happy New Year :)

    Quite a few of you might be thinking on what this “Stars” are :).It’s nothing other than the “ little medals under ones Display Name “.Think I have put you again in thought.Not for too long but,it is the MSDN forum rating that I am talking about.
    I started answering posts as a pastime.Soon I noticed this little stars ,varying in count, under different display names.A little bit of exploration gave me this piece of information.
    The ‘Pastime’ turned an ‘Addiction’.

    “Do they pay you??”
    “Are you rewarded??”
    “They might give you something!!””

    The common statements that I heard, whenever people see me browse the forum.
    None of these were the reason for my addiction though.It was just the personal satisfaction I get from answering the questions, a new learning and a different perspective for some of the problems I had already faced.

    “It’s not money that always counts….. …..Stars too count”

    Of late I have developed the habit of reading books,most of them technical and few others which i feel interesting or of controversial topics.Now in the era of computers you get all the books of choice available right at the click of a button.But I prefer the Hard copies rather than the soft one.
    Usually I go through the e-version of the book to get a feel about it,before buying.
    Whether to read the ebook or the hard copy is purely of personal interest.I prefer the latter just coz of the feeling of having a book in hand and reading is great rather than sitting in front of a monitor/pda.Moreover I spent a lot of time in front of the monitor,coz my work demands it ,so i just don’t want to add a reason to spend more.

    The question is not “which is better”,it’s just about getting into the habit of reading :)

    Happy Reading :)

    Hi, Many a times while using listbox,listview etc there might be a need to delete the multiple selected items. This can be easily achieved by the following piece of code

     While ControlName.SelectedItems.Count > 0 
    End While

    Happy Coding :)

    After a long time after my first microsoft certification,70-536,.NET Framework - Application Development Foundation today i have taken the certification for WPF, Microsoft .NET Framework 3.5, Windows Presentation Foundation Application Development,70-502.
    This one is easy for anyone who has some hands on experience in WPF.One has to be familiar with the different panels and layout,Binding,Styles and Templates.Other than that some knowledge on click once deployment would also be of help.
    The best way to prepare for this,would be to have a visual studio up and running and try out different things on WPF.
    I would suggest the books Sams WPF Unleashed and Pro WPF to start with.Both are really helpful.Apart from that check out the various blogs and forums out there.Just google and you would find a hell lot of those,just like you found this one:)
    Just gonna relax the day ahead after the hard earned certification :):)