How to check if a user belongs to a Security or Distribution group in ASP.Net

If you need to check at Runtime if your User belongs to a Security group. Here’s how to do it –   Assuming the IIS Application has Authentication set to “Windows Authentication”. The Request object of HttpContext has the Logged in users Identity which contains Groups. Here is the code which validates if a user…


ASP.Net AJAX 4.0 Client Templates in depth

The best way to know a Javascript library is to pry open the javascript file and look at the details. This release has a lot of powerful features which I will discuss here. 1.   Sys.Observer – Ajax 4.0 includes an implementation of Observer Pattern. In plain words you can use this pattern to have a…


ASP.Net RssToolkit Version 2.0

I have been part of the team working on the latest version ASPNET RssToolkit, originally created by Dmitry Robsman. We enhanced this awesome Toolkit and have just released version 2.0 of the Toolkit. Please check out Codeplex to download this toolkit. Here are some of the changes in this version – Consume and publish Atom/Rdf/Opml…


Translate your text using Google Api’s

Here is how you can translate a Text using Google’s “Unofficial” API’s. The URL for Google Translate is –{0}&langpair={1} “text” is your input string which needs to be translated. langpair is the language pairs involved in the tranlsation. E.g. “ar|en” means translate from Arabic to English. The result when you browse to the URL…


VS 2005 not loading project on IIS 7 and Vista

If you get this error when loading a Web Application project on Visual Studio 2005 running on Vista and IIS 7 – “Unable to read the project file ‘xxx.csproj’. The Web Application Project xxx is configured to use IIS. To access local IIS Web sites, you must install all of the following components: Internet Information…


101 LINQ query samples

If you are starting into writing LINQ queries or you are stuck in writing a query here is a link which I’m sure will help you –


Convert any feed to ATOM

Judging by ATOM’s rising popularity, see Atom compared to RSS, and its public endorsement by Google. Atom may be the future of Feed Syndication. Here is a quick way, courtesy of Google, to convert any Feed type to Atom. Google provides a nice REST interface to convert your feed into ATOM. Just do a Get…


Creating Widgets using Javascript Simple Syndication – JSS

Web syndication is a way to make content of your website or application available for others to use.  Rss/Atom/Rdf are specifications, which websites use for this purpose. However to consume such formats in your website, you need to know a little programming as these feeds are in Xml and they have a certain specification. Let’s…


MSDN Video Vista Sidebar Gadget

I created a Vista Gadget with the help of my Lead Jon Gallant. This gadget helps you find Videos on MSDN. You can select from existing categories or you can search for videos. It shows the Video links at the bottom. When you hover over the video links it shows a tooltip with a thumbnail…


Convert Rss to JSON – Serialize to JSON by using XmlSerialization and JavaScriptSerializer

JSON (Javascript Object Notation) – is a light weight data interchange format.  It essentially is composed of key-value pairs.  For Example –  XML <rss version=“2.0“>   <channel>     <item>       <link></link>       <title>Page Title</title>     </item>   </channel> </rss> JSON  – {   “Version”:”2.0″,   “Channel”: {         “Items”: [{               “Link”:””,               “Title”:”Page Title”          }]       }} The beauty of…