kashyapa's .NET Rumbles

My personal encounters with .NET

  • ADIOS Weblogs

    I have been blogging on Weblogs.asp.net for a while now. I don't remember when actually i got a berth on to Weblogs. I think it was MS Joe – Joe Stagner way back somewhere in 2005 or sometime around that time frame (i don't remember the exact dates) that he had opened up weblogs.asp.net blog space. I remember sending an email to him and i had got a space for myself.

    So far weblogs has been a great starting platform for me. After close to a decade in the industry (this is my 9 year in the industry) i finally realized that i too can write and i have been lately passionate about writing. So far i just have 15 posts under my belt and close to 5 community speaking sessions.

    I have been lately enjoying writing and community things that i decided to have my own identity on the web. Yes i have purchased my own domain and i have taken up a hosting for my own blog.

    My new web identity would be 2 domains under my name – www.kashyapas.com and www.lohithgn.com.

    I will be discontinuing writing on weblogs.asp.net and will be fulltime at www.kashyapas.com.

    My RSS feed at weblogs.asp.net has been redirected to point to my new site. So whoever had subscribed to my RSS will still be getting the updated content from my new site.

    So do drop into my new home and let me know your feedback.

    As i say always – Happy coding and Code with passion !



    Its again a time for me to get on to a stage and present something. Yes i will be speaking at Microsoft sponsored event known as “Community Tech Days” which will be held at Mysore on Nov 14. This event is supported by Mysore User group known as “Mysore Geeks”.

    Here is the official schedule for the event:


    This time i will be taking a session on “WCF Data Services”. I will be going through the basics of building a WCF data service using Visual Studio 2010 and C#. Will be covering the basics such as What, Why and How of WCF Data Services.

    The keynote for the day will be delivered by my very dear friend and whom i personally call as “Doc”, Dr. U. B. Pavanaja. Other session on the day include some interesting topics such as below:

    Windows Azure – the operating system for the cloud by Microsoft. This session will be taken by Mr. Manoj Kumar Sharma. If you want to be on cloud too, then dont miss this session. Great way to start the day :).

    Virtualization – More has been talked on virtualization nowadays. Be it a desktop or a server, enterprises are looking at Virtualization as a cost effective alternative to physical assets. Sit through this session to learn a whole new concept. This session will be taken by Mr. Anand M. S.

    Windows Phone 7 – This is one of the not to be missed sessions. Windows Phone 7 which was released recently by Microsoft on October 12. This is yet to reach India. But you can catch all the action about Windows Phone 7 thro some cool demos that will be showcased. This session is taken by one my close friend Mr. Kalpesh Parmar (a.k.a Vic). Don’t miss this session.

    Silverlight RIA Services – Silverlight is one of the newest technology stack from MS for web based development. Catch all the insights on what is RIA services and how it goes along with Silverlight. This session is taken by one my good friend Mr. Pooran Prasad.

    Sharepoint 2010 – Sharepoint 2010 opens up a whole lot of new opportunities to work upon. Sit through this session for insight into the collaborative platform. This session is taken by Mr. Venkat K L.

    IE 9 Demo – IE 9 is the latest offering on the browser front by Microsoft. This is a very rich and powerful browser which takes into account the GPU on your system and uses that to render. Sit through this session to know many ore interesting things on IE 9. This session is taken by one of my good friend Mr. Renuka Prasad.

    And last but not the least:

    INDIC on Windows 7 Demo – Ever wondered how can you write in Kannada or search in kannada or what is “File” called in Kannada on windows operating system ? Well i always wondered how Indian Language work with the Windows OS. Well there is nobody else other than doc who can talk about this in depth. So dont miss this session. Some cool demos in line by doc. This session is taken my friend Dr. U. B. Pavanaja.

    So i am very much excited to be part of the Community Tech Days to be held at Mysore. Looking forward to meeting many of you. Come over and have a tech filled day.

    For more information you can check the official site which is :


    AS always, till next time – Happy coding. Code with passion.

    del.icio.us Tags: ,,


  • webmatrix–helpers–antiforgery

    On Oct 6 2010, ScottGu (I prefer to call him His Guness : ) ) announced BETA 2 release of WebMatrix. You can check the official release blog post here. You can read the beta 2 release readme here.

    I have been following WebMatrix lately. This is one of the blog post series on the WebMatrix helpers. As part of Beta 2 following helpers were added to WebMatrix:

    • Antiforgery
    • Bing
    • Json
    • Themes

    In my last blog post i talked about Bing helper. This blog post i will be looking in to “Antiforgery” helper. So lets dive into topic then.

    What is Anti Forgery in web application?

    To answer this we should first know what is CSRF – Cross-Site Request Forgery. Here is the WikiPedia explanation for this:

    Cross-site request forgery, also known as a one-click attack or session riding and abbreviated as CSRF ("sea-surf"[1]) or XSRF, is a type of malicious exploit of a website whereby unauthorized commands are transmitted from a user that the website trusts.[2] Unlike cross-site scripting (XSS), which exploits the trust a user has for a particular site, CSRF exploits the trust that a site has in a user's browser.

    To know more about the subject please visit WikiPedia.

    Anti Forgery is nothing but one of the mechanism to stop the CSRF attack.

    How does the Anti Forgery Helper help us?

    This helper works in two folds. First this will help you to embed a anti forgery token as a field in your form. Second this will help you to validate the token whenever you have a form posted. This also has the capability to generate a default token or take a salt to generate a very specific token for you. Using salt is always better so that its like your own secret key for the token generation. 

    Anti Forgery Helper API in WebMatrix:

    We can find the Anti Forgery Helper API in the following assembly:

    System.Web.Helpers, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35

    This API exposes 2 public methods. Lets have a look at them one by one.

    i. public static HtmlString GetHtml(string salt)

    -   This method will out put the anti forgery token as a hidden form field in your form. Have a look at the screen shot below:


    As you can see this will output the value of the hidden field as a binary encoded data.

    - The only parameter to this method – what  we call as salt – is optional and default value is “null”. If you provide a salt while generating the anti forgery token using the this method, while validating you need to make sure that you provide the same salt. More on this in the below section.

    ii. public static void Validate(string salt)

    - This method is used to validate the anti forgery token on the server during your processing.

    - This will method will validate your form posting for the presence of the token. If not found meaning if this was a cross site request – will raise a HttpAntiForgeryException.

    As you can see the API itself is very neat and cute one : ). It has only 2 methods but does all the work required for your to protect your site from the CSRF. Now lets see some code syntax on how to use this.

    Anti Forgery Helper API Usage Syntax:


    As you can see from the above code, the usage of the anti forgery helper API syntax is quite simple. You use the GetHtml() method inside the form so that it embeds the token. Then on the server side when you are processing the form – call the Validate() method to check if the request is a cross site request. That’s it. And you have evaded the cross site request attack.

    So what exactly happens is – The GetHtml() does 2 things. It creates a HttpCookie for the site which contains the same token value as the form field. In the Validate method you just check if the cookie and the form value tokens match. So if somebody somehow does do a cross site request forgery they will be missing the cookie or the form field for the anti forgery token and that’s how your code will be alerted when you are doing the form processing.


    Well this was just my attempt to understand the Helper. Hope it helped you too. Let me know your comments if you do read this. That will help me a lot.

    Till next time, Happy coding. Code with passion.


    del.icio.us Tags: ,,

    Technorati Tags: ,,


  • devcon 2010

    On Saturday, October 9 2010 – Bangalore the Silicon Valley of India is going to witness one of the great technical events. Especially i have been yearning to be in this event. Well wondering what it is. Here it goes. BDOTNET – Bangalore Dot Net User Group is conducting what we call as DevCon 2010 i.e. Developer Conference 2010. Yes the much awaited event for some of us is finally up on the cards. Venue is decided, Speaker list is decided, Agenda is decided and more over we have our sponsors for the event too. Yayyy i say.

    Following is a flyer that i did out of my own curiosity. This will get you a glimpse of the technology that is going to be presented and our sponsors for the event:    DevCon2010Flyer

    Following is the schedule/agenda for the day:


    Here is some of the session insights:

    Windows Azure AppFabric: This will be delivered by Manoj K Sharma who is a corporate trainer. I haven’t attended any of his previous talks. So i will be sitting for the first and time. He is going to be delivering some interesting topic. Here is the official documentation for what is a “AppFabric” –

    Windows Azure platform AppFabric helps developers connect applications and services in the cloud or on-premises. This includes applications running on Windows Azure, Windows Server and a number of other platforms including Java, Ruby, PHP and others. It provides a Service Bus for connectivity across network and organizational boundaries, and Access Control for federated authorization as a service.

    Everybody is on the cloud nowadays. So get yourselves geared for the new paradigm that’s starting to emerge. Know more about the cloud : ).

    WPF 4 and Silverlight 4: This session will be delivered Chaitra Nagaraj. She is a Microsoft MVP in the area of Web Application Development. I started to attend BDOTNET sessions way back in 2004-2005. And she is a regular speaker in the UG sessions. She has always concentrated on the client application development be it ASP.NET, WPF etc. Anything new on this areas she will be there to give a session. This time she will be speaking on 2 hot things – WPF 4 and Silverlight 4. Some cool new stuffs in both of these technologies. So be there to get updated yourselves within just 1 hour.

    Windows Phone 7: This session will be delivered Vic Parmar. He is a Microsoft MVP. I have been personally envying him because he has one of the coolest gadgets on his hand – a Windows Phone 7 – handset. This is currently available to only a few people within in India. So be there to see some interesting thing on Windows Phone 7. The much awaited phone from everybody – i am excited to see what Vic is up to this time. Don’t miss this session.  

    Tips n Tricks: We have a 45 minutes slot in between the session where we tried to encourage people to come forward and give a 10 minute presentation/demo. This is actually open for the public. If you think you have an interesting tip or tricks or you have an interesting demo to do just catch hold of any of us i.e. the BDOTNET organizing committee. We will be able to help you out with your slots. We currently have 3 slots filled out.

    - VS2010 IDE Tips n Tricks by Wriju Ghosh, Microsoft

    - Indic and Windows 7 by Dr. Pavanaja – don't miss this as you will see a whole new thing about how Indian language support is available within Windows 7.

    - Building Websites with WebMatrix by Me – yes i will be on stage for a 1- minute demo on how to build a website within 10 minutes which is a fully functional and has all aspects of a website using the recently released WebMatrix. Beta 2 was released just yesterday. My laptop is up to date to the Beta 2 now.

    SysInternals Tools: This session is delivered by good friend Vijay Raj. He is a Microsoft MVP in the area of Application Setup/Deployment. Some cool stuff he is gonna show on the lines of system internals. Catch this session if you want to know more about how to tweak you system and change some stuff around. Vijay blogs at www.msigeek.com and tweets as @msigeek. (Hope he wont mind me putting out his social handles here : ) ).

    Intellitrace: This session is delivered by Phani of  Brainscale/Pluralsight. This is one of coolest addition in VS.NET 2010. If you are working on 2010 and you haven’t heard of Intellitrace then check out this session. Intellitrace opens up a whole new world in debugging code. So don’t miss this one if you are a developer.

    Migration Strategies: This session is delivered by Kaliyan of  Dell. He is also a Microsoft MVP. He will be speaking about the migration strategies for moving from Windows XP to Windows 7. This is session is for all IT admin people. This will give you insight into how you have to strategize your migrations within your organization. So you will surely get some idea from this session.

    Robotics – TINA: This session is delivered by Ram Prasanna. He is from Microsoft India. One of the much awaited session for me. He is known as the Robotics guru as far as i know. So he is gonna show a cool new robot i believe that named as TINA. I am super excited to be watching him live. I have seen his Buddy Home project/concept which was showcased during TechED 2010 in Bangalore. This time i get to watch him live on stage. This is one session i encourage everybody to attend and not to miss this.

    Now coming to the sponsors of the event – this time we have the gracious helping hand of Microsoft, Aditi, INETA and Pluralsight. Pluralsight has come out with a fantastic offer for all of those who attend the event. They are giving out FREE 1-month Standard subscription to Pluralsight On-Demand!. This will give access to all Pluralsight courses for 1 month. That’s not it 3 Winners will get 1 year subscription which is worth US$1499. Wow i say. Wishing if i could win this. I am gonna try hard. I too don’t know if this is going to be a raffle draw or something else. But do be there to grab this opportunity.

    For more information on the DevCon 2010 event details do visit the following site:


    It has all the information like, Venue, Agenda and Registration link.

    Please note that if you are planning to attend you need to register and carry a printed copy of the registration. This is to insure that we manage the food and other consumables and avoid wastage.

    It will be a super Saturday for me. Hope you will there. Catch me if you wanna have a quick chat with me. So see you there at 9 AM.

    Till next time, Happy coding. Code with passion.

    del.icio.us Tags:
    Technorati Tags:


  • BDOTNET user group meeting–sep 18

    Its been a while that i wrote an entry in my blog. Actually didn’t had anything to rant or well may be lazy to rant out. Now i do have some news so let me pen those down.

    BDotNet which is one of the India’s largest and most active Microsoft User Group is having a UG meet this Saturday i.e. September 18. Following is a new Logo that was designed for BDotNet. I like this logo and the tag line – “People, Technology and Passion”. The tag line is so apt – if you have people and technology and people have passion for technology – that’s what UG’s are all about.

    UG meeting -  Sept 18th 2010 @ 11AM

    Well this time i have one of the slots as a speaker. Yes i am up for speaking again. This will be my 3rd ever community speaking and presentation. What interesting is my master Mr Vinod Kumar (@vonodk_sql)– who i really take as a sensei in public/community speaking – has told me that he is gonna be there. So little jinxed about the presentation. But i am looking forward to his feedback and comments. If any of you readers out there had attended Community Tech Days held in Bangalore, you will know how Vinod floored everybody with SQL gotchas.

    The topic i am gonna be speaking this time is – WebMatrix. This was a new tool released by Microsoft couple of days back. So if you want to know more about this tool – just hop into the UG meet.

    Here are the event details:

    UG Event / meeting -  Sept 18th 2010 @ 11AM

    Session 1: WebMatrix
    What is WM? WebMatrix is everything you need to build Web sites using Windows. It includes IIS Developer Express (a development Web server), ASP.NET (a Web framework), and SQL Server Compact (an embedded database). It streamlines Web site development and makes it easy to start Web sites from popular open-source apps. The skills and code you develop with WebMatrix transition seamlessly to Visual Studio and SQL Server. For more details visit: http://www.microsoft.com/web/webmatrix/
    Speaker: Lohith, Sungard

    Session2: Silverlight
    Getting Started with Silverlight, a beginner level session, which will help you to quickstart silverlight development...
    Speaker: Pooran Prasad, Microsoft MVP

    ThoughtWorks Technologies (India) Pvt Ltd. view map
    ACR Mansion, 2nd floor, 147/F, 8th Main Rd.
    3rd Block, Koramangala
    Bangalore - 560 034, India
    t: +91 80 4323 3700

    If you are coming in Koramangala ring road from domlur side, cross Sonyworld junction n go further... then take left after Nandini/Nandana hotel (between hotel and BDA complex), then at 8th Main take right turn and keep going, right side you will see Tantra software company and Thoughtworks is in same building, but entrance is at back.

    Time: 11AM to 1PM

    Register for UG meeting -  Sept 18th 2010 @ 11AM in Bangalore, India  on Eventbrite

    Did you know that – BDotNet has SMS alerts for the UG meets conducted by them. Check this out:

    Subscribe to Bdotnet SMS Alerts for UG meetings, events, contests.
    To subscribe visit http://labs.google.co.in/smschannels/subscribe/BdotnetAlert
    or send SMS "ON BdotnetAlert" to 98708 07070
    To unsubscribe send "OFF BdotnetAlert" to 98708 07070

    I have subscribed to their SMS alerts and its cool. Every time there is a UG meet planned i get an instant notification on my mobile. Try this out.

    Hope you will be there to support my presentation.

    Till next time – Happy coding, Code with passion.

    Add to del.icio.usDigg!Share on Google BuzzShare on FacebookReddit!Stumble it!Share on Twitter

    Technorati Tags:


  • how to use tweetbutton

    Today, it is official that twitter has released its own tweetbutton. Till now it used to be third party links that provided the tweet option. With the release of the tweetbutton now everybody will start grabbing the link and provide it on their sites.

    So lets have a look at how to use the tweetbutton on your web site.

    Step 1: Go to www.twitter.com/tweetbutton

    You will be presented with the following page:


    If you notice carefully – Twitter – is calling the TweetButton as “Goodies” – interesting isn’t it :). Tweet Button is a goodie for the world – great.

    So this page has 3 section. Lets go over those sections one by one.

    Step 2: Choosing the button and Customization.

    The tweet button itself comes with 3 flavours as below:

    - Vertical Count – This has the counter – i.e. the number of tweets which originated from either the web or any sort of clients which has reference to the current URL – on the top and button below. See the screenshot


    - Horizontal Count – This has the counter aligned horizontally next to the button. See the screenshot below.


    - No count – this option will only contain the button. No counter is presented. Simple and stylish i say.


    Once you have chosen the button, you have the option to customize the text that you want to have in the tweet, the URL if any and also the language you want to tweet in. So lets see the customization one by one

    - Tweet Text customization – this is self explanatory. This allows you to control the text that you see while you tweet. Here is the screen shot of this  customization:


    As you can see, the option allows you to tell the tweet button to grab the title of the current page the button is in or you can provide your own customized text. In this case i have opted to have my own customized text “Check this out”

    - URL customization – This lets you to decide whether you want the tweet button to automatically grab the current URL or you would like to provide a custom URL which will be added to the tweet. What’s interesting is – By default what ever you select tweet button is going to auto shorten the URL using Twitter's URL shortener, t.co. Here is the screen shot of the customization


    - Language – This option lets you decide in what language do you want to see the tweet button to be rendered. Currently the language supported is as follows and the tweet button rendered in those languages:

    English image
    French image
    German image
    Spanish image
    Japanese image

    So as you can see depending on your language you can have the tweet button appear in that language.

    Step 3 – Recommend people to follow

    What this option does is – after somebody tweets using the tweet button, twitter will display to the user 2 accounts to follow and you control that through this option. So you can set 2 twitter accounts that you want the users to follow.


    Here is how this option translates to after a tweet has been done using the Tweet Button


    Step 4 – Preview and Grab the button

    The last step is to of course preview your customization and grab the button link  and put it in your website. Here is the screen shot of the preview:

    Notice that this is not something different from any of the widgets or plugins you might have played around for your. Its just a anchor with bunch of custom attribute which the twitter can parse to produce the tweet.

    The Tweet Text you set is translated as “data-text” attribute. The button type that we select is translated as “data-count” attribute. The 2 accounts we set for follow is translated as “data-via” and “data-related” attribute.

    This was a attempt from my side to explain the Tweet Button usage.

    I will give it a spin by including the Tweet Button with this article. Why dont you Tweet This Smile.

    Update: Here is the official video from twitter on the Tweet Button

    del.icio.us Tags:
    Technorati Tags:


  • community tech days 2010–Bangalore

    This weekend Silicon Valley of India – Bangalore or Bengaluru is witnessing a technology filled 2 days. Yes the Community Tech Days – “Behold the power of Technology” – is being held in Bengaluru on Aug 7/8 2010.

    If you are new to Microsoft world and wondering what is Community Tech Days – well here is the official description of the event:     

    “Dive deep into the world of Microsoft technologies at the Community Tech Days and get trained on the latest from Microsoft. Build real connections with Microsoft experts and community members, and gain the inspiration and skills needed to maximize your impact on your organization while enhancing your career. What more... you can watch some of these sessions LIVE online from the comfort of your workstation as well.”

    What’s more interesting is – the sessions to be held in CTD Bengaluru is beamed live. Yes there is a live stream available for Bengaluru event. So if you are someone who cant attend in person but have a net connection at home –well sit back in your chair and enjoy the sessions. Check the official link given below.

    Day 1 Aug 7 2010, is for the developers a.k.a Developer track. Day 2 Aug 8 2010 is for the IT professionals. Some interesting sessions are lined up. The topics range from ASP.NET MVC to the latest and greatest – WebMatrix. I am pretty excited about the whole event. I am going to be attending the first day for sure.

    Here is the venue details and session details for the event.



    Some of the speakers to watch out for is Pandurang Nayak. If you had attended Tech Edge 2010 held in Bengaluru couple of months – you will remember the roving camera and behind the mike it was none other than Mr. Nayak. So i am excited to be seating in his session. Another speaker not to be missed is of course the ever enthusiastic and great speaker and motivator Vinod Kumar. I am excited about meeting him in person this time. Its unfortunate that i will not be sharing the stage with him this time. May be next time i am gonna be presenting along him. He has been a great motivator for me at least. So looking forward to Saturday and Sunday to meet Vinod. Other than these two speakers i haven’t seen any other speakers session. So will blog about that later.

    So don’t miss 2 days of technology and information packed sessions. Be there i will be too.

    Here is the official link to CTD - http://www.communitytechdays.com/

    So till next time – Happy coding. Code with passion.

    Technorati Tags:
    del.icio.us Tags:


  • Office 2010 Professional Plus Trial Upgrade To Full

    Today i am going to talk about “How to upgrade a Trial version of Office 2010 Professional Plus to a full licensed version”.

    I had downloaded and installed the trial version of Office 2010. Couple of days back i got my MSDN subscription. So now i have the full version license keys to play around with.

    First thing that came to my mind was how to change the product key of the already installed Trial version. When i searched for all the information i could get on the net – everybody said go to backstage and click on the Help option. Then on the right hand side you should see product activation. So change the product keys there. Well it seems like that’s not the case with the Trial versions. Following is the screen shot of what i see in Trial versions:


    As you can see in the Trial versions, the product activation is not here. So where else can you find it.

    For everything in MS – keep in mind that there is either a Repair or Change option which will be present in Add Remove Programs feature. So go to Add Remove Programs and find Office 2010 entry and Right click on it. You will see a “Change” See the screen shot below:


    Click on the “Change” option. You will be presented with Change your installation dialog. There you will see the last option to “Enter a product key”. Voila here it is. Now you can enter a different product key. See the screen shot below:


    Select the “Enter a product key” option and click continue. You will be shown “Enter a  Product Key” dialog. Here you can enter your new key. See the screen shot below:


    So that’s how you upgrade from a Trial version of Office 2010 to Full licensed version. I had problem finding this information. So may be somebody will make use of this information.

    As i say always, till next time Happy Coding. Code with passion.

    Technorati Tags:
    del.icio.us Tags: