<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
  <channel>
    <title>Hristo Deshev's blog</title>
    <description>Hristo Deshev's blog</description>
    <link>http://blogs.telerik.com/HristoDeshev/Posts.aspx</link>
    <docs>http://backend.userland.com/rss</docs>
    <item>
      <title>RadControls for WPF -- Now with Filtering Support</title>
      <description>&lt;p style="margin: 0in 0in 10pt; line-height: normal"&gt;&lt;span style="font-size: 12pt; font-family: 'times new roman','serif'"&gt;Boy, am I excited! We managed to push our second public beta out of the door, getting ready for the big Q2 release. Here is what's new: &lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;span style="font-size: 12pt; line-height: 115%; font-family: 'times new roman','serif'"&gt;I am especially proud with the new filtering support in RadGridView. We designed the feature so that it would both allow you to plug your own filtering logic and have a cool default UI that will let your users quickly filter the grid. An image is worth more than a thousand words, so here it goes:&lt;br /&gt;
    &lt;br /&gt;
    &lt;/span&gt;&lt;img alt="RadCarousel reflections" src="/Libraries/Hristo Deshev/Grid_filtering.sflb" /&gt; &lt;/li&gt;
    &lt;li&gt;RadCarousel got even fancier. Check those reflections:&lt;br /&gt;
    &lt;br /&gt;
    &lt;img alt="RadCarousel reflections" src="/Libraries/Hristo Deshev/Carousel_reflections.sflb" /&gt; &lt;/li&gt;
    &lt;li&gt;We got several new controls, freshly-ported from the upcoming Silverlight control suite: RadNumericUpDown, RadProgressBar, RadSlider, RadPanelBar, RadTreeView. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Need I say more? Go play with the beta! The live examples (XBAP) are available &lt;a href="http://www.telerik.com/demos/wpf" title="XBAP examples"&gt;&lt;span style="font-size: 12pt; font-family: 'times new roman','serif'"&gt;here&lt;/span&gt;&lt;/a&gt;. The download should be available from your Client.NET page.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Of course, all type of feedback is welcome. Share it in the &lt;a href="http://www.telerik.com/community/forums/default.aspx"&gt;forums&lt;/a&gt; or in a suppor ticket.&lt;/span&gt;&lt;/p&gt;
</description>
      <link>http://blogs.telerik.com/HristoDeshev/Posts/08-07-02/RadControls_for_WPF_--_Now_with_Filtering_Support.aspx</link>
      <author>Hristo Deshev</author>
      <comments>http://blogs.telerik.com/HristoDeshev/Posts/08-07-02/RadControls_for_WPF_--_Now_with_Filtering_Support.aspx</comments>
      <guid isPermaLink="false">3ddae400-4023-4cac-b34e-c7d909d69bfb</guid>
      <pubDate>Wed, 02 Jul 2008 10:49:00 GMT</pubDate>
    </item>
    <item>
      <title>Launching a new blog</title>
      <description>I am pleased to announce that I am starting a &lt;a href="http://weblogs.asp.net/hristodeshev/"&gt;new web development-oriented blog&lt;/a&gt;. I have been honored (Thanks, &lt;a href="http://joeon.net/"&gt;Joe&lt;/a&gt;!) to blog on &lt;a href="http://weblogs.asp.net/"&gt;weblogs.asp.net&lt;/a&gt; and I think that, after several years of active development on &lt;a href="http://www.telerik.com/products/aspnet/overview.aspx"&gt;our ASP.NET control suite&lt;/a&gt;, I have something to say about web development.&lt;br /&gt;
&lt;br /&gt;
What will happen with this blog? Don't worry, I will keep posting interesting stuff here too. I am just trying to separate the general ASP.NET content from control development and Telerik-related news and announcements. What is the best way to stay on top of everything happening in my world? Go ahead and click the RSS or ATOM links for my new blog.&lt;br /&gt;
&lt;br /&gt;
See you soon!&lt;br /&gt;
&lt;br /&gt;
</description>
      <link>http://blogs.telerik.com/HristoDeshev/Posts/07-09-03/Launching_a_new_blog.aspx</link>
      <author>Hristo Deshev</author>
      <comments>http://blogs.telerik.com/HristoDeshev/Posts/07-09-03/Launching_a_new_blog.aspx</comments>
      <guid isPermaLink="false">a4b0c28d-618c-4ac1-b414-8ccc7e09a639</guid>
      <pubDate>Mon, 03 Sep 2007 16:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Firewalls breaking ASP.NET AJAX!</title>
      <description>This one is serious and may bite you any time.&lt;br /&gt;
&lt;br /&gt;
Yesterday Shaun posted &lt;a href="http://www.telerik.com/community/forums/thread/b311D-mmbdh.aspx"&gt;this problem&lt;/a&gt; in our forums: he and his users were experiencing odd errors when requesting ASP.NET AJAX-based sites, and yes, that means RadControls "Prometheus" based ones as well. Partial rendering requests initiated by UpdatePanel controls failed with the cryptic message:&lt;br /&gt;
&lt;br /&gt;
==============&lt;br /&gt;
&lt;span&gt;Sys.WebForms.PageRequestManagerParserErrorExeption: The message received from the server could not be parsed.  Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.  Details:  Error parsing near '&amp;lt;!DOCTYPE html P''.&lt;br /&gt;
&lt;/span&gt;==============&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;Of course all that comes without any trace of Response.Write(), HttpModule, response filter or server-side tracing in his code. The horror, the horror...&lt;br /&gt;
&lt;br /&gt;
Having the luxury of being a part of a team that has implemented a framework similar to ASP.NET AJAX, I noticed that something was making ASP.NET AJAX render the entire page and return it back to the browser even when the server code was supposed to be handling a partial rendering request. Note my emphasis (the bold part is the beginning of a normal HTML document):&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;==============&lt;br /&gt;
&lt;span&gt;Sys.WebForms.PageRequestManagerParserErrorExeption: The message received from the server could not be parsed.  Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.  Details:  Error parsing near &lt;span&gt;*****'&amp;lt;!DOCTYPE html P''******&lt;/span&gt;.&lt;br /&gt;
&lt;/span&gt;==============&lt;br /&gt;
&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span&gt;I dug a bit deeper using &lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;the .NET documentation browser (Reflector)&lt;/a&gt;, trying to find out how ASP.NET AJAX "knows" when to let the page render itself and when to intercept the normal rendering and send the updated UpdatePanels' contents only. The answer is simple: the client code sets a special HTTP header that gets read by the server. The header is &lt;/span&gt;&lt;span class="threadMessageBody"&gt;"X-MicrosoftAjax" and its value is  "Delta=true". Then it dawned on me that some firewall "solution" may be stripping or tampering with that header. Shaun confirmed this: his company is using a &lt;a href="http://www.watchguard.com/"&gt;Watchguard router&lt;/a&gt; that has this setting of "Remove Unknown Headers". Disabling that, made the problem disappear.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I believe the Watchguard guys should get the X-MicrosoftAjax header into their known headers list pretty quick. Until they do, please disable that setting. I think they are not the only firewall solutions provider that may have this problem.  Are you behind a header-stripping firewall? Please post a comment below! I don't mean corporate solutions only -- personal firewalls can do that as well. The bigger list we have, the greater chance of sparing somebody a tough problem.&lt;br /&gt;
&lt;br /&gt;
On the other hand, is there a good reason for a firewall to strip your HTTP request headers? All I can think of is the age-old sysadmin principle of "Disable all that your users don't need, and then go ahead and disable some more."&lt;br /&gt;
</description>
      <link>http://blogs.telerik.com/HristoDeshev/Posts/07-06-24/Firewalls_breaking_ASP_NET_AJAX.aspx</link>
      <author>Hristo Deshev</author>
      <comments>http://blogs.telerik.com/HristoDeshev/Posts/07-06-24/Firewalls_breaking_ASP_NET_AJAX.aspx</comments>
      <guid isPermaLink="false">04fba23d-3b1c-4a5c-84b4-b965e37dfd66</guid>
      <pubDate>Sun, 24 Jun 2007 16:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Claiming my Technorati blog</title>
      <description>&lt;a href="http://technorati.com/claim/nvpkxjsx8z"&gt;Technorati Profile&lt;/a&gt;</description>
      <link>http://blogs.telerik.com/HristoDeshev/Posts/07-05-31/Claiming_my_Technorati_blog.aspx</link>
      <author>Hristo Deshev</author>
      <comments>http://blogs.telerik.com/HristoDeshev/Posts/07-05-31/Claiming_my_Technorati_blog.aspx</comments>
      <guid isPermaLink="false">faa3b50d-b797-4723-a5aa-66fbf46a44b8</guid>
      <pubDate>Thu, 31 May 2007 01:43:00 GMT</pubDate>
    </item>
    <item>
      <title>TechEd 2007, here we come!</title>
      <description>I am posting this literally minutes before heading to the airport. I, &lt;a href="http://blogs.telerik.com/blogs/vt/default.aspx"&gt;Vassil&lt;/a&gt;, &lt;a href="http://blogs.telerik.com/blogs/atanas_korchev/default.aspx"&gt;Atanas&lt;/a&gt;, Vlad, and several blogless people (hint! hint!) are leaving for the US today. &lt;a href="http://blogs.telerik.com/blogs/todd_anglin/default.aspx"&gt;Todd&lt;/a&gt; will be joining us too!&lt;br /&gt;&lt;br /&gt;Come visit us at booth #515. We are delighted to meet you, have a little chat and demo the latest developments on the ASP.NET controls, Sitefinity, WinForms, Reporting, and Silverlight fronts.&lt;br /&gt;&lt;br /&gt;Meet you there!&lt;br /&gt;&lt;br /&gt;</description>
      <link>http://blogs.telerik.com/HristoDeshev/Posts/07-05-30/TechEd_2007_here_we_come.aspx</link>
      <author>Hristo Deshev</author>
      <comments>http://blogs.telerik.com/HristoDeshev/Posts/07-05-30/TechEd_2007_here_we_come.aspx</comments>
      <guid isPermaLink="false">2a5c2cda-8d77-4280-8bfd-a47a71dec8e4</guid>
      <pubDate>Wed, 30 May 2007 16:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Ubiquitous: a funny word that unearths some PowerShell trivia</title>
      <description>Do you think that the word "ubiquitous" can be hard on a non-native English speaker's ears. It is hard for Bulgarians, that I am sure. I picked it for the title because I really like its the strangeness and because it has a nice allusion to the software development best practice of automating everything that you get your hands on: tests, build procedures, and deployment. You need that to gain predictability in your project and ensure rapid and often delivery of new features.&lt;br /&gt;&lt;br /&gt;What surprised me was &lt;a href="http://www.microsoft.com/technet/scriptcenter/resources/interviews/snover.mspx"&gt;Jeffrey Snover&lt;/a&gt;'s (yes, the architect behind PowerShell) &lt;a href="http://blogs.telerik.com/blogs/twisted_asp_net/archive/2007/05/31/1644.aspx#1655"&gt;comment&lt;/a&gt; about the original use of the word with regard to the PowerShell cmdlets (emphasis mine):&lt;br /&gt;&lt;br /&gt;=================&lt;br /&gt;I'll buy any book that has the word PowerShell or Ubiquitious in it. &lt;br /&gt;&lt;br /&gt;&lt;span&gt;FYI - our "common" parameters are called "common" because the doc people thought we would confuse people by calling them "ubiquitous" parameters. I had been calling them that for years prior to the switch. It's such a wonderful word. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Best of luck with the book. It sounds like it will be a good addition to the pool. It feels like it is going to be in that 2nd generations of books that focuses in on HOW TO USE PowerShell to accomplish a goal vs WHAT IS PowerShell. Both are super important. &lt;br /&gt;&lt;br /&gt;Cheers! &lt;br /&gt;Jeffrey Snover [MSFT] &lt;br /&gt;Windows Management Partner Architect &lt;br /&gt;Visit the Windows PowerShell Team blog at: &lt;a href="http://blogs.msdn.com/PowerShell"&gt;http://blogs.msdn.com/PowerShell&lt;/a&gt; &lt;br /&gt;Visit the Windows PowerShell ScriptCenter at: &lt;a href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx"&gt;http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;=================&lt;br /&gt;&lt;br /&gt;By the way, if you are not aggregating the &lt;a href="http://blogs.msdn.com/PowerShell/"&gt;Windows PowerShell Team blog&lt;/a&gt;, please do it now and start getting your daily dose of useful tips and techniques.&lt;br /&gt;</description>
      <link>http://blogs.telerik.com/HristoDeshev/Posts/07-05-30/Ubiquitous_a_funny_word_that_unearths_some_PowerShell_trivia.aspx</link>
      <author>Hristo Deshev</author>
      <comments>http://blogs.telerik.com/HristoDeshev/Posts/07-05-30/Ubiquitous_a_funny_word_that_unearths_some_PowerShell_trivia.aspx</comments>
      <guid isPermaLink="false">66f33f30-5293-45a1-8bb8-4e5d3deacc12</guid>
      <pubDate>Wed, 30 May 2007 16:00:00 GMT</pubDate>
    </item>
    <item>
      <title>I am writing a book!</title>
      <description>&lt;p class="western"&gt;Yes I am! I can finally announce that and I am sooo excited! I have been working with the &lt;font color="#0000ff"&gt;&lt;u&gt;&lt;a href="http://www.apress.com/"&gt;Apress&lt;/a&gt;&lt;/u&gt;&lt;/font&gt; guys, most importantly &lt;font color="#0000ff"&gt;&lt;u&gt;&lt;a href="http://www.asptoday.com/Authors.aspx?ID=736"&gt;Jonathan Hassell&lt;/a&gt;&lt;/u&gt;&lt;/font&gt;, on starting an intermediate-level book on &lt;font color="#0000ff"&gt;&lt;u&gt;&lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;Windows PowerShell&lt;/a&gt;&lt;/u&gt;&lt;/font&gt;&lt;span&gt; (formerly known as Monad)&lt;/span&gt;. We have finished the book proposal checklist (a huge &lt;span&gt;one&lt;/span&gt;, mind you) and it got approved. I am now off to finishing the paperwork related to contracts and other boring stuff and I &lt;span&gt;have already started writing&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The book is tentatively titled &lt;i&gt;Ubiquitous Automation with Windows PowerShell&lt;/i&gt;. I am an automation freak and I want to help everyone in the world reap the benefits of becoming one themselves&lt;span&gt;! Software developers, system administrators and, I believe, all power users out there will enjoy a better scripting environment that fully supports the Windows environment and the .NET runtime. PowerShell makes managing processes and services, querying networks, taming file management, and automating program deployment a no-brainer. Doing that effectively is the most important thing I will be showing throughout the book. It will focus on learning useful scripting techniques as quickly as possible and getting real value early on. A unique "feature" of the book is that it will not only cover the shell itself, but it will introduce important tools and libraries that will boost your productivity. Not only we have a über-powerful shell, but we already have available helpers, IDEs, even debuggers at our disposal. The PowerShell community on the web is growing and it is covering a lot in using the shell to administer and automate all sorts of systems and software. Reinventing the wheel is not fun and one of the book's goals is to help you use the existing, working round wheels instead of creating your own square ones.&lt;/span&gt;&lt;/p&gt;&lt;p class="western"&gt;&lt;span&gt;Writing a book has many challenges. One of them is to provide useful content that is not "just another book on the subject." There are several books on PowerShell on the shelves already and some more that will be out soon. &lt;/span&gt;&lt;font color="#0000ff"&gt;&lt;u&gt;&lt;a href="http://www.manning.com/payette/"&gt;&lt;span&gt;Two&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/font&gt;&lt;span&gt; of the &lt;/span&gt;&lt;font color="#0000ff"&gt;&lt;u&gt;&lt;a href="http://www.oreilly.com/catalog/9780596528492/"&gt;&lt;span&gt;books&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/font&gt;&lt;span&gt; are written by members of the PowerShell development team! That raises the bar significantly and I am delighted in playing in the same league with those guys. I am sure my passion for &lt;/span&gt;&lt;font color="#0000ff"&gt;&lt;u&gt;&lt;a href="http://blogs.telerik.com/blogs/twisted_asp_net/archive/2007/01/04/541.aspx"&gt;&lt;span&gt;tools&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/font&gt;&lt;span&gt; and bullets of a very shiny material will bring a unique perspective that will complement the existing work in this field.&lt;/span&gt;&lt;/p&gt;&lt;p class="western"&gt;&lt;span&gt;I have the deadlines set already. I should be done submitting the first three chapters by July 15. This is where I show that I am a serious and dedicated author that will be able to deliver on time. The tentative title and table of contents will get finalized some time after that. My final manuscript submission deadline is November 30, and the book will hit the shelves circa January 2008. I am planning on blogging my progress as I work on the book and provide regular updates. Stay tuned for a lot of PowerShell action and Windows automation black magic.&lt;/span&gt; &lt;/p&gt;</description>
      <link>http://blogs.telerik.com/HristoDeshev/Posts/07-05-29/I_am_writing_a_book.aspx</link>
      <author>Hristo Deshev</author>
      <comments>http://blogs.telerik.com/HristoDeshev/Posts/07-05-29/I_am_writing_a_book.aspx</comments>
      <guid isPermaLink="false">356e031a-381e-467b-bc2e-6a388087f207</guid>
      <pubDate>Tue, 29 May 2007 16:00:00 GMT</pubDate>
    </item>
    <item>
      <title>RadInput 2.0 and Date Parsing: Where Compiler Theory Meets User Needs</title>
      <description>Todd &lt;a href="http://telerikwatch.com/2007/04/preview-radinput-20.html" title="beat me to this"&gt;beat me to&lt;/a&gt; releasing details on our Q1_2007 release, but here it is again: we
are finally releasing an update to the RadInput product: RadInput
2.0!!! The new version will include three brand new controls:&lt;br&gt;
&lt;ul&gt;&lt;li&gt;
    RadTextBox: a nice, skinnable &amp;lt;asp:TextBox&amp;gt; replacement control that will help you build slick-looking applications;
  &lt;/li&gt;&lt;li&gt;
    RadNumericTextBox: a textbox control, specifically created for numeric data entry: think quantities, currency, percentages;
  &lt;/li&gt;&lt;li&gt;
    RadDateInput: a completely rewritten version of the v1.x RadDateInput control that takes a different approach to date entry.
  &lt;/li&gt;&lt;/ul&gt;
My favorite is RadDateInput as it posed one of the biggest challenges I
have met in my work here at Telerik: building a non-restrictive,
assistive date input control. The 1.x version of the component would
hurt users' feelings by being too restrictive. It would insist on
slapping your wrists the first time you would hit the wrong key.&lt;br&gt;
&lt;br&gt;
This time we have learned our lesson! We felt that the best approach
here is to give the user absolute freedom at entering whatever s/he
feels is a correct date. We would then take that and parse it into
something meaningful. But how do we do that reliably enough? How do we
help users that want us to recognize dates like "1.1.07", "2007-Jan-1",
"January 1, 2007", "1/1/07"? How do we handle time entries both all by
itself, and accompanied by a date? This is where we found out handling
all this with a ton of if-then-else statements would be close to
impossible and even if we succeeded we would have never been able to
add a feature on top of the first release. That is when somebody asked
"can we express all this with a &lt;a href="http://en.wikipedia.org/wiki/Formal_grammar" title="formal grammar"&gt;formal grammar&lt;/a&gt;!" We toyed with the idea a bit, tried stuff out in the small, and then... just did it. Keep reading to find out how.&lt;br&gt;
&lt;br&gt;
Right now RadDateInput features a full-blown &lt;a href="http://en.wikipedia.org/wiki/Lexer" title="lexer"&gt;lexer&lt;/a&gt;, and a &lt;a href="http://en.wikipedia.org/wiki/Recursive_descent_parser" title="recursive-descent parser"&gt;recursive-descent parser&lt;/a&gt; that implement the date recognition. In total we have three components involved in date parsing and evaluation:&lt;br&gt;
&lt;ol&gt;&lt;li&gt; The lexer. This guy splits the string into well known
tokens: it looks for separators, numbers, week days, month names (both
in full and abbreviated, all culture-specific), time values, AM/PM
designators. The result that we get after the lexer finishes is a
stream of tokens. &lt;/li&gt;&lt;li&gt; The parser. Here we do not work with raw strings anymore: we
deal with tokens and apply the grammar productions to recognize if we
are dealing with a number-month pair, a full date triplet, a week day,
just an hour-minute-seconds time entry, etc. Some of the grammar,
expressed in &lt;a title="BNF" href="http://en.wikipedia.org/wiki/Backus-Naur_form"&gt;BNF&lt;/a&gt;, might look like this:&lt;br&gt;
DATETRIPLET ::= NUMBER DATEPAIR&lt;br&gt;
DATEPAIR ::= NUMBER NUMBER |&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NUMBER MONTH |&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MONTH NUMBER&lt;br&gt;
We use rules like the above to produce a tree structure that represents our date and time entry.
  &lt;/li&gt;&lt;li&gt; The evaluator. This is where we take the number, month, week
day, hours, minutes, etc tokens and apply rules and heuristics, taking
into account both the specified date format and the current culture to
get to the final date. For example if we get a number pair, we would
look if the current culture usually specifies dates as month-day or
day-month and will respect that. We will do the right thing and will
assign values accordingly if we can infer something in addition, say
"30 4" is obviously April 30, no matter if you write it as "30 4" or "4
30". &lt;/li&gt;&lt;/ol&gt;
I am really pleased with the final result: we easily handle a myriad of
possible input combinations without sacrificing flexibility. The most
important thing for us is that the parser is really extensible, and we
can extend it by adding advanced rules for things like "+2hrs" or "next
Friday" in the future. We will be expecting your feedback on this one
:-).&lt;br&gt;
&lt;br&gt;
I and the entire team are really proud of the product and we are sure
this little control will be of great help to many people. Happy data
entry!</description>
      <link>http://blogs.telerik.com/HristoDeshev/Posts/07-04-20/RadInput_2_0_and_Date_Parsing_Where_Compiler_Theory_Meets_User_Needs.aspx</link>
      <author>Hristo Deshev</author>
      <comments>http://blogs.telerik.com/HristoDeshev/Posts/07-04-20/RadInput_2_0_and_Date_Parsing_Where_Compiler_Theory_Meets_User_Needs.aspx</comments>
      <guid isPermaLink="false">e6a0d3c1-a183-4150-8a52-ac2e79ad0d88</guid>
      <pubDate>Fri, 20 Apr 2007 11:46:00 GMT</pubDate>
    </item>
    <item>
      <title>Security: JSON Hijacking and the telerik web controls</title>
      <description>I have been too slow to get to this! The security experts at &lt;a href="http://www.fortifysoftware.com"&gt;Fortify Software&lt;/a&gt; have recently discovered a new &lt;a href="http://www.fortifysoftware.com/news-events/releases/2007/2007-04-02.jsp"&gt;Web 2.0-specific security vulnerability&lt;/a&gt; that may affect some sites passing JSON-encoded data to the client, and I got some nudges from both coworkers and customers to investigate this deeper.&lt;br&gt;&lt;br&gt;&lt;h3&gt;So, what is this vulnerability all about?&lt;/h3&gt; In short, you have to be extra careful when using HTTP GET requests to stream JSON-encoded data to the client. You may be thinking that you are using ASP.NET's authentication mechanism and you are conveniently hidden behind the session and forms authentication cookie, but that may not be the case. Imagine that there is an HTTP handler that will serve GET requests and return JSON to the client. The client is your secured ASPX page and you can't get to it without passing through the login page. The JSON handler checks if the user is authorized before sending the data too. But what happens if a malicious site tricks you into visiting it after you have visited the trusted site? That malicious site can request data from the JSON handler if it knows the correct URL. URL's are not hard to guess and remember, you are coming from the trusted site, so you have an authentication cookie set. That means the malicious site can read your mail, get to your files, and do even nastier stuff.&lt;br&gt;&lt;br&gt;Normally you can't request URL's from a different domain using an XMLHttpRequest object -- the browser just won't let you. You can't access frames that host documents from another domain either. All that is a part of the "&lt;a href="http://www.mozilla.org/projects/security/components/same-origin.html"&gt;Same Origin Policy&lt;/a&gt;" that ensures that you are to touch stuff coming from your own domain only. There is a way to circumvent that policy though! You can insert a &amp;lt;script&amp;gt; tag with a "src" attribute pointing to another domain. You can get only scripts from that domain, but JSON-encoded data is valid JavaScript that can be accessed after being pulled in the attacker's document.&lt;br&gt;&lt;br&gt;&lt;h3&gt;Am I vulnerable?&lt;/h3&gt;Your site is vulnerable if it allows streaming JSON data from HTTP GET requests without taking extra measures to prevent requests from unauthorized locations. The extra measures can be really simple: you can inject something that will make the script invalid and unparseable and then strip it on the client before evaluating that or you can switch to POST requests or add extra HTTP request headers and check if the headers are present on the server.&lt;br&gt;&lt;br&gt;&lt;h3&gt;Are &lt;span&gt;t&lt;/span&gt;elerik's controls exploitable?&lt;/h3&gt;You face some risk when using RadTreeView and RadComboBox and their LoadOnDemand feature. Those controls do HTTP GET requests and an attacker can use the mechanism above and get the text contents of your tree nodes and combo items. If you are displaying sensitive data in there, please disable that feature, and contact our support guys. They will get you a hotfix build that has this security hole closed.&lt;br&gt;&lt;br&gt;The rest of the controls do HTTP POST requests and are not exploitable.&lt;br&gt;&lt;br&gt;</description>
      <link>http://blogs.telerik.com/HristoDeshev/Posts/07-04-04/Security_JSON_Hijacking_and_the_telerik_web_controls.aspx</link>
      <author>Hristo Deshev</author>
      <comments>http://blogs.telerik.com/HristoDeshev/Posts/07-04-04/Security_JSON_Hijacking_and_the_telerik_web_controls.aspx</comments>
      <guid isPermaLink="false">8f042d40-9f91-4325-97b5-5319b8ba7223</guid>
      <pubDate>Wed, 04 Apr 2007 18:56:00 GMT</pubDate>
    </item>
    <item>
      <title>Debugging ASP.NET 2.0 Web Resources: Decrypting the URL and Getting the Resource Name</title>
      <description>&lt;p class="MsoNormal"&gt;Today I had another trivial problem that was unbelievably
hard to debug just because I could not tell that an error caused by a web
resource was caused by exactly &lt;b&gt;that&lt;/b&gt; resource. I was dealing with a
forgotten [WebResource] attribute that did not have a matching resource built
in the assembly and both generated a server side exception and gave browsers a 404 HTTP
error.&lt;br&gt;
&lt;br&gt;
I wanted to decrypt the query string data that was being passed to
WebResource.axd and extract the resource and assembly name from it. &lt;a href="http://support.microsoft.com/kb/910442"&gt;MSDN&lt;/a&gt; told me that
what I needed was the "d" query string parameter, as it contained the
encrypted assembly and resource name. The "t" attribute is the
assembly time stamp, it is there, so that we have a different URL when we
upgrade the assembly and our clients do not cache and use the old web
resources.&lt;br&gt;
&lt;br&gt;
Back to decrypting that string. I noticed that it was being encrypted using the
MachineKeySection.EncryptOrDecryptData() method, so we can easily decrypt that. Unfortunately, the method is declared internal. That should not be allowed to stop us, should it?
Here goes the code:&lt;br&gt;

&lt;/p&gt;&lt;p class="MsoNormal"&gt;=======================================&lt;/p&gt;&lt;p class="MsoNormal"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; byte[] encryptedData =
HttpServerUtility.UrlTokenDecode(urlEncodedData);&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Type machineKeySection =
typeof(MachineKeySection);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Type[] paramTypes = new Type[] { typeof(bool),
typeof(byte[]), typeof(byte[]), typeof(int), typeof(int) };&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; MethodInfo encryptOrDecryptData =
machineKeySection.GetMethod("EncryptOrDecryptData",
BindingFlags.Static | BindingFlags.NonPublic, null, paramTypes, null);&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; byte[] decryptedData =
(byte[])encryptOrDecryptData.Invoke(null, new object[] { false, encryptedData,
null, 0, encryptedData.Length });&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; string decrypted =
Encoding.UTF8.GetString(decryptedData);&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
decryptedLabel.BackColor = Color.Lime;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; decryptedLabel.Text =
decrypted;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; catch (TargetInvocationException)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
decryptedLabel.BackColor = Color.Red;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; decryptedLabel.Text =
"Error decrypting data. Are you running your page on the same server and
inside the same application as the web resource URL that was generated?";&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }

&lt;/p&gt;&lt;p class="MsoNormal"&gt;=======================================&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;br&gt;
The tricky part is that we use the MachineKeySection
class to do our job and we deal with encryption settings specific to the current application. This means that decrypting web resource URL will work &lt;span&gt;if and only if&lt;/span&gt;
you run the code on the same server and from the same web application that generated
the resource.&lt;/p&gt;



&lt;p class="MsoNormal"&gt;I am attaching &lt;a href="http://blogs.telerik.com/files/WebResources.zip"&gt;a standalone page&lt;/a&gt; that you can drop in your
application's root and request it. You can then paste a web resource URL in the
text box and decrypt it. You can even drop controls on the page and the
dropdown will be automatically filled with all registered scripts and
stylesheets served from web resources. Happy hacking!
&lt;/p&gt;</description>
      <link>http://blogs.telerik.com/HristoDeshev/Posts/07-03-26/Debugging_ASP_NET_2_0_Web_Resources_Decrypting_the_URL_and_Getting_the_Resource_Name.aspx</link>
      <author>Hristo Deshev</author>
      <comments>http://blogs.telerik.com/HristoDeshev/Posts/07-03-26/Debugging_ASP_NET_2_0_Web_Resources_Decrypting_the_URL_and_Getting_the_Resource_Name.aspx</comments>
      <guid isPermaLink="false">b5d2113b-7d4f-440d-8edf-27b64da9672e</guid>
      <pubDate>Mon, 26 Mar 2007 19:25:00 GMT</pubDate>
    </item>
    <item>
      <title>WebDD: slides and demo code</title>
      <description>As promised earlier, here are the &lt;a href="http://blogs.telerik.com/files/Hristo%20Deshev%20-%20Developing%20ASP.NET%20AJAX%20Components.ppt"&gt;slides&lt;/a&gt; and the &lt;a href="http://blogs.telerik.com/files/Hristo%20Deshev%20-%20WebDD.zip"&gt;sample code&lt;/a&gt; from &lt;a href="http://webdd.co.uk/Sessions.aspx"&gt;my WebDD talk&lt;/a&gt;.&lt;br&gt;&lt;br&gt;The code builds an image slide show control and an extender that will zoom its target in on mouse hover and zoom out on mouse unhover doing that with a fancy animation stolen from the &lt;a href="http://ajax.asp.net/ajaxtoolkit/"&gt;AJAX Control Toolkit&lt;/a&gt;. Some info that you may find useful when reading the code in no particular order:&lt;br&gt;&lt;ul&gt;&lt;li&gt;The ScriptControls project is the real control library. It contains the JavaScript and server-side controls and is being used by some of the pages in the demo site (ImageSlideShowServer, ImageSlideShowUpdatePanel, HoverZoomExtender).&lt;/li&gt;&lt;li&gt;The DemoSite project is well... a demo site. It contains several pages that have the JavaScript code in different stages of its development. All *.aspx files have their corresponding code-behinds in *.aspx.cs and their accompanying script files in *.aspx.js:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;ImageSlideShowEmptyClass: this one shows a simple class that inherits from Sys.UI.Control.&lt;/li&gt;&lt;li&gt;ImageSlideShowDispose: here we demonstrate resource disposal triggered both by a window close and an update panel refresh. I've kept the JavaScript error you saw on the demo, so that it reminds me to be more careful in the future. It is caused after an update panel refresh when our code tries to recreate both controls and ASP.NET AJAX complains that you can't have a control for a DOM element that already has a control attached (We should not recreate the control outside the update panel).&lt;/li&gt;&lt;li&gt;ImageSlideShowEvents: here we have code that handles DOM events using the $addHandler() API and in turn raises a custom component event that is handled by a plain JavaScript object living on the page.&lt;/li&gt;&lt;li&gt;ImageSlideShowServer: the working server control. Look, Ma, no JavaScript!&lt;/li&gt;&lt;li&gt;ImageSlideShowUpdatePanel: the server control, happily living in an UpdatePanel.&lt;/li&gt;&lt;li&gt;HoverZoomExtender: an image of a pair of lazy pandas chewing at bamboo sticks being extended to provide a zoom in animation on hover.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;You can extend the ImageSlideShow control by adding an extender for every image. Just add this code to the end of the AddSlide() method:&lt;br&gt;&lt;br&gt;////////////////////////////////////////////////&lt;br&gt;&lt;span&gt;HoverZoomExtender imageZoomer = new HoverZoomExtender();&lt;/span&gt;&lt;br&gt;&lt;span&gt;imageZoomer.ID = imageID + "ZoomExtender";&lt;/span&gt;&lt;br&gt;&lt;span&gt;this.Controls.Add(imageZoomer);&lt;/span&gt;&lt;br&gt;&lt;span&gt;imageZoomer.TargetControlID = slideImage.ID;&lt;/span&gt;&lt;br&gt;&lt;span&gt;imageZoomer.ZoomFactor = 1.5;&lt;/span&gt;&lt;br&gt;////////////////////////////////////////////////&lt;br&gt;&lt;br&gt;That's it! Happy coding!&lt;br&gt;&lt;br&gt;&lt;br&gt;</description>
      <link>http://blogs.telerik.com/HristoDeshev/Posts/07-02-06/WebDD_slides_and_demo_code.aspx</link>
      <author>Hristo Deshev</author>
      <comments>http://blogs.telerik.com/HristoDeshev/Posts/07-02-06/WebDD_slides_and_demo_code.aspx</comments>
      <guid isPermaLink="false">c22cdc53-b8e0-415e-ac32-da73b3966438</guid>
      <pubDate>Tue, 06 Feb 2007 23:05:00 GMT</pubDate>
    </item>
    <item>
      <title>WebDD - pure web dev enjoyment</title>
      <description>&lt;span&gt;Last
Saturday was quite an eventful day! Me and &lt;a href="../../blogs/zhivko_dimitrov/"&gt;Zhivko&lt;/a&gt; attended the
WebDD conference in Reading,
 England, and I
have been meaning to post a small review about the entire thing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span&gt;&lt;br&gt;&lt;br&gt;The
sessions I attended were really great. This was my first time seeing &lt;a href="http://weblogs.asp.net/scottgu/"&gt;Scott Guthrie&lt;/a&gt; present and I can only
say that he's a real presentation machine. He gave 4 talks in a single day and then
repeated one of them, so that people that did not have the chance to attend it
could do so. I watched &lt;a href="http://www.webdd.org.uk/Speakers.aspx"&gt;Dave
Verwer&lt;/a&gt; give an incredible talk on writing unobtrusive JavaScript or script
that works when it can and leaves your site usable for browsers with scripting
disabled. I got some really cool ideas on improving the radControls suite! &lt;a href="http://www.glennjones.net/"&gt;Glenn Jones&lt;/a&gt; really impressed me with &lt;a href="http://www.glennjones.net/Post/823/Microformats,theAK-47oftheweb-WebDD.htm"&gt;his
microformats presentation&lt;/a&gt;. While I already knew the concept, I could not
think of anything usable that you could build with &lt;a href="http://microformats.org/"&gt;microformats&lt;/a&gt;. The presentation was a real
eye opener.&lt;/span&gt;



&lt;p class="MsoNormal"&gt;&lt;span&gt;I gave a
presentation about developing ASP.NET AJAX components. I have been playing with
the new framework for quite some time and I wanted to share my experience in
creating client-side controls and behaviors as well as using them on the server
via script controls and extenders. My opinion is that both ASP.NET AJAX
controls and behaviors are a good addition to a web developer's bag of tricks
and having them at your disposal can significantly decrease the time to ship a
complex web app. I am posting my slides and demos tomorrow, right after I dig
my USB thumb drive out of my suitcase (talk about late packing and unpacking).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;



&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br&gt;Speaking at
WebDD was one of my first presentation engagements, and I still can't just be
myself before many people. As some &lt;a href="http://www.peat.me.uk/2007/02/03/microsoft-employee-in-dodgy-picture-shocker/"&gt;people&lt;/a&gt;
&lt;a href="http://usingtangent.blogspot.com/2007/02/webdd.html"&gt;noticed&lt;/a&gt;, I
was quite nervous about standing in a crowded room, but I hope I managed to
show some cool stuff that aroused some interest in ASP.NET AJAX-style
JavaScript. I have gotten some feedback that the tech content is too heavy for
a short presentation, and I think I should be splitting it in two: maybe script
controls vs. behaviors/extenders. Having more examples and covering some of the
trickiest parts in greater detail should definitely make the matter accessible
to a broader public.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;



&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;o:p&gt;&lt;/o:p&gt;As a
conclusion I would really like to thank &lt;a href="http://blogs.ipona.com/davids/Default.aspx"&gt;Dave&lt;/a&gt; and &lt;a href="http://weblogs.asp.net/plip/"&gt;Phil&lt;/a&gt; for a great event. Adding &lt;a href="http://www.zimakki.com/blog/"&gt;Zi&lt;/a&gt;'s &lt;a href="http://wiki.webdd.org.uk/GeekDinner.ashx"&gt;geek dinner&lt;/a&gt; made that
Saturday unforgettable. I am really looking forward to meeting you all, folks,
again!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;o:p&gt;&lt;/o:p&gt;Oops!
Almost forgot about the photos! Check out &lt;a href="http://www.flickr.com/photos/43663754@N00/sets/72157594518885463/"&gt;Dave's
photostream&lt;/a&gt;!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <link>http://blogs.telerik.com/HristoDeshev/Posts/07-02-06/WebDD_pure_web_dev_enjoyment.aspx</link>
      <author>Hristo Deshev</author>
      <comments>http://blogs.telerik.com/HristoDeshev/Posts/07-02-06/WebDD_pure_web_dev_enjoyment.aspx</comments>
      <guid isPermaLink="false">b2b3fcd7-d2ad-4ef2-b13c-2b20a75a8356</guid>
      <pubDate>Tue, 06 Feb 2007 00:41:00 GMT</pubDate>
    </item>
    <item>
      <title>WebDD: I'll be there</title>
      <description>I am very excited to spread the news: I will be presenting at the &lt;a href="http://www.webdd.org.uk/"&gt;WebDD conference&lt;/a&gt;. &lt;a href="http://www.webdd.org.uk/Speakers.aspx"&gt;I am&lt;/a&gt; giving &lt;a href="http://www.webdd.org.uk/Sessions.aspx"&gt;a talk&lt;/a&gt; on developing ASP.NET AJAX components -- one of my pet projects for some time now. Wait! There's more: &lt;a href="http://blogs.telerik.com/blogs/zhivko_dimitrov/"&gt;Zhivko&lt;/a&gt;, our usability master and design guru will have a &lt;a href="http://www.webdd.org.uk/Sessions.aspx"&gt;session on usability testing&lt;/a&gt;. Don't miss it out!&lt;br&gt;&lt;br&gt;I am looking forward to meeting a lot of interesting people at WebDD. I have registered at the &lt;a href="http://webdd.backnetwork.com/"&gt;backnetwork&lt;/a&gt; and signed up for &lt;a href="http://wiki.webdd.org.uk/GeekDinner.ashx"&gt;the geek dinner&lt;/a&gt; &lt;a href="http://www.zimakki.com/blog/"&gt;Zi&lt;/a&gt; is organizing. Talking about JavaScript is waaay easier after 2 beers!&lt;br&gt;&lt;br&gt;</description>
      <link>http://blogs.telerik.com/HristoDeshev/Posts/07-01-18/WebDD_I_ll_be_there.aspx</link>
      <author>Hristo Deshev</author>
      <comments>http://blogs.telerik.com/HristoDeshev/Posts/07-01-18/WebDD_I_ll_be_there.aspx</comments>
      <guid isPermaLink="false">954fcf7c-1a88-43e2-81f4-f4e858f51f5f</guid>
      <pubDate>Thu, 18 Jan 2007 13:25:00 GMT</pubDate>
    </item>
    <item>
      <title>The Book! Finally Out!</title>
      <description>I just have to brag about this one! I have been contributing articles for the &lt;a href="http://www.amazon.com/Windows-Developer-Power-Tools-Turbocharge/dp/0596527543"&gt;Windows Developer Power Tools&lt;/a&gt; &lt;a href="http://www.oreilly.com/catalog/9780596527549/"&gt;book&lt;/a&gt;. The book project has been lead by &lt;a href="http://frazzleddad.blogspot.com/"&gt;Jim Holmes&lt;/a&gt; and &lt;a href="http://dotavery.com/blog/"&gt;James Avery&lt;/a&gt; and I have been brought in by Mr. Holmes. I started writing my first article some time in January last year (if I remember correctly), and I am now extremely glad that the wait is over and I can see my work being published.&lt;br&gt;&lt;br&gt;The book is a collection of articles and recipes about using 170+ free and open-source tools that can boost your developer productivity on any Windows and .NET project. I am sure that even knowing about those tools' existence will help each and every programmer out there with his/her career.&lt;br&gt;&lt;br&gt;I have contributed a total of three articles (listed in the order of their writing):&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;span&gt;Eliminating Memory Leaks in Internet Explorer with Drip&lt;/span&gt; -- the first article. This is the piece of work that made me dig deeper into the dreaded memory leak problem under that browser. Writing this article has meant so much for me: I contacted &lt;a href="http://outofhanwell.com/blog/"&gt;Matthias Miller&lt;/a&gt;, a really nice person, a very gifted programmer, and the maintainer of the &lt;a href="http://outofhanwell.com/ieleak/"&gt;Drip&lt;/a&gt; project; I got to learn a lot of stuff about the memory leaks problem under IE and managed to improve a lot of &lt;a href="http://www.telerik.com/products/aspnet/overview.aspx"&gt;our ASP.NET products&lt;/a&gt;; I even registered as a developer on the Drip open source project (even if I did not find the time to contribute that much to the project)&lt;/li&gt;&lt;li&gt;&lt;span&gt;Building Sophisticated AJAX Applications with ASP.NET's Atlas&lt;/span&gt; -- the article is a bit outdated right now as it is based on the &lt;a href="http://ajax.asp.net/"&gt;MS AJAX &lt;/a&gt;(formerly known as Atlas) CTP's and the product has changed a lot since the first beta release. Anyway the info there is still useful as an introduction to the spirit of the framework.&lt;/li&gt;&lt;li&gt;&lt;span&gt;PowerShell - a New Generation Command Line and Scripting Tool&lt;/span&gt; -- my favorite! &lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;PowerShell&lt;/a&gt; is a really nice addition to the Windows toolbox and every person can benefit from knowing it. The shell combines the power of the traditional UNIX shells with a full-fledged programming language that gives you access to virtually any object on your system: WMI, COM, .NET, you name it. &lt;span&gt;cmd.exe&lt;/span&gt; is dead, long live &lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;PowerShell&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;You can look at the &lt;a href="http://iterativerose.com/WinDevPowerTools/TOC.aspx"&gt;table of contents&lt;/a&gt; and read &lt;a href="http://iterativerose.com/WinDevPowerTools/WinDevPowerTools.aspx"&gt;the sample chapters&lt;/a&gt; online. Jim, thank you for bringing me aboard! I enjoyed the project and I would do it again any day.&lt;br&gt;&lt;br&gt;&lt;span&gt;UPDATE:&lt;/span&gt; fixed a sexist-sounding part born by the part of my brain that does its thinking in Bulgarian&lt;br&gt;</description>
      <link>http://blogs.telerik.com/HristoDeshev/Posts/07-01-04/The_Book_Finally_Out.aspx</link>
      <author>Hristo Deshev</author>
      <comments>http://blogs.telerik.com/HristoDeshev/Posts/07-01-04/The_Book_Finally_Out.aspx</comments>
      <guid isPermaLink="false">f658b672-ca9c-40ed-a5da-f1c50792a17e</guid>
      <pubDate>Thu, 04 Jan 2007 06:13:00 GMT</pubDate>
    </item>
    <item>
      <title>HACK: debug modifications to the ASP.NET session</title>
      <description>Today I had some strange experience.  I have been hunting a strange bug that caused something to be placed in the ASP.NET session at a time that it was not supposed to be.  My biggest problem was finding out who was putting an object in the session and what that object actually contained.&lt;br /&gt;&lt;br /&gt;I already knew that the HttpSessionState instance was being stored in the current HttpContext's Items collection (thanks to Mr. &lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;Lutz Roeder&lt;/a&gt;, of course), and my initial plan was to inherit from HttpSessionState and intercept the calls made to methods like Add, Remove, etc.  Alas, HttpSessionState is marked as &lt;span&gt;sealed&lt;/span&gt;, and none of its methods is &lt;span&gt;virtual&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;And then I found it!  Every HttpSessionState object takes a storage parameter on its creation -- an IHttpSessionState implementor.  All I had to to was create an object that implements this interface, and pass it to a new HttpSessionState instance.  My interface implementation simply delegates everything to the real HttpSessionState instance.  Here is how to replace the built-in session object.  Note that we need some reflection to call the &lt;span&gt;internal&lt;/span&gt; constructor:&lt;br /&gt;&lt;br /&gt;protected override void OnPreInit(EventArgs e)&lt;br /&gt;{&lt;br /&gt;    HttpSessionState session = HttpContext.Current.Session;&lt;br /&gt;    Type[] parameters = new Type[] { typeof(IHttpSessionState) };&lt;br /&gt;    ConstructorInfo constructor = session.GetType().GetConstructor&lt;br /&gt;         (BindingFlags.Instance | BindingFlags.NonPublic, null, parameters, null);&lt;br /&gt;&lt;br /&gt;    &lt;span&gt;object[] paramValues = new object[] { new FakeSessionState(session) };&lt;/span&gt;&lt;br /&gt;    HttpSessionState fakeSession = (HttpSessionState)constructor.Invoke(paramValues);&lt;br /&gt;&lt;br /&gt;    &lt;span&gt;HttpContext.Current.Items["AspSession"] = fakeSession;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    base.OnPreInit(e);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;I replace the session object for my page only.  It should be possible to do that for the entire application with an HttpModule or something, but all I needed was troubleshooting a single page.&lt;br /&gt;&lt;br /&gt;Here is my FakeSessionState class.  I can set breakpoints in its methods, debug it, log method calls, etc:&lt;br /&gt;&lt;br /&gt;public class FakeSessionState : IHttpSessionState&lt;br /&gt;{&lt;br /&gt;    HttpSessionState _realSession;&lt;br /&gt;    public FakeSessionState(HttpSessionState realSession)&lt;br /&gt;    {&lt;br /&gt;        _realSession = realSession;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    #region IHttpSessionState Members&lt;br /&gt;&lt;br /&gt;    public void Abandon()&lt;br /&gt;    {&lt;br /&gt;        _realSession.Abandon();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void Add(string name, object value)&lt;br /&gt;    {&lt;br /&gt;        _realSession.Add(name, value);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void Clear()&lt;br /&gt;    {&lt;br /&gt;        _realSession.Clear();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int CodePage&lt;br /&gt;    {&lt;br /&gt;        get&lt;br /&gt;        {&lt;br /&gt;            return _realSession.CodePage;&lt;br /&gt;        }&lt;br /&gt;        set&lt;br /&gt;        {&lt;br /&gt;            _realSession.CodePage = value;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public HttpCookieMode CookieMode&lt;br /&gt;    {&lt;br /&gt;        get &lt;br /&gt;        {&lt;br /&gt;            return _realSession.CookieMode;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void CopyTo(Array array, int index)&lt;br /&gt;    {&lt;br /&gt;        _realSession.CopyTo(array, index);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int Count&lt;br /&gt;    {&lt;br /&gt;        get &lt;br /&gt;        {&lt;br /&gt;            return _realSession.Count;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public System.Collections.IEnumerator GetEnumerator()&lt;br /&gt;    {&lt;br /&gt;        return _realSession.GetEnumerator();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public bool IsCookieless&lt;br /&gt;    {&lt;br /&gt;        get &lt;br /&gt;        {&lt;br /&gt;            return _realSession.IsCookieless;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public bool IsNewSession&lt;br /&gt;    {&lt;br /&gt;        get &lt;br /&gt;        {&lt;br /&gt;            return _realSession.IsNewSession;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public bool IsReadOnly&lt;br /&gt;    {&lt;br /&gt;        get &lt;br /&gt;        {&lt;br /&gt;            return _realSession.IsReadOnly;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public bool IsSynchronized&lt;br /&gt;    {&lt;br /&gt;        get &lt;br /&gt;        {&lt;br /&gt;            return _realSession.IsSynchronized;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public System.Collections.Specialized.NameObjectCollectionBase.KeysCollection Keys&lt;br /&gt;    {&lt;br /&gt;        get &lt;br /&gt;        {&lt;br /&gt;            return _realSession.Keys;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int LCID&lt;br /&gt;    {&lt;br /&gt;        get&lt;br /&gt;        {&lt;br /&gt;            return _realSession.LCID;&lt;br /&gt;        }&lt;br /&gt;        set&lt;br /&gt;        {&lt;br /&gt;            _realSession.LCID = value;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public SessionStateMode Mode&lt;br /&gt;    {&lt;br /&gt;        get &lt;br /&gt;        {&lt;br /&gt;            return _realSession.Mode;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void Remove(string name)&lt;br /&gt;    {&lt;br /&gt;        _realSession.Remove(name);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void RemoveAll()&lt;br /&gt;    {&lt;br /&gt;        _realSession.RemoveAll();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void RemoveAt(int index)&lt;br /&gt;    {&lt;br /&gt;        _realSession.RemoveAt(index);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public string SessionID&lt;br /&gt;    {&lt;br /&gt;        get &lt;br /&gt;        {&lt;br /&gt;            return _realSession.SessionID;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public HttpStaticObjectsCollection StaticObjects&lt;br /&gt;    {&lt;br /&gt;        get &lt;br /&gt;        {&lt;br /&gt;            return _realSession.StaticObjects;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public object SyncRoot&lt;br /&gt;    {&lt;br /&gt;        get &lt;br /&gt;        {&lt;br /&gt;            return _realSession.SyncRoot;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int Timeout&lt;br /&gt;    {&lt;br /&gt;        get&lt;br /&gt;        {&lt;br /&gt;            return _realSession.Timeout;&lt;br /&gt;        }&lt;br /&gt;        set&lt;br /&gt;        {&lt;br /&gt;            _realSession.Timeout = value;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public object this[int index]&lt;br /&gt;    {&lt;br /&gt;        get&lt;br /&gt;        {&lt;br /&gt;            return _realSession[index];&lt;br /&gt;        }&lt;br /&gt;        set&lt;br /&gt;        {&lt;br /&gt;            _realSession[index] = value;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public object this[string name]&lt;br /&gt;    {&lt;br /&gt;        get&lt;br /&gt;        {&lt;br /&gt;            return _realSession[name];&lt;br /&gt;        }&lt;br /&gt;        set&lt;br /&gt;        {&lt;br /&gt;            _realSession[name] = value;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    #endregion&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;That is all.  Happy bug hunting!&lt;br /&gt;</description>
      <link>http://blogs.telerik.com/HristoDeshev/Posts/06-11-21/HACK_debug_modifications_to_the_ASP_NET_session.aspx</link>
      <author>Hristo Deshev</author>
      <comments>http://blogs.telerik.com/HristoDeshev/Posts/06-11-21/HACK_debug_modifications_to_the_ASP_NET_session.aspx</comments>
      <guid isPermaLink="false">ba12c191-025c-41e0-9587-4221186eb4f5</guid>
      <pubDate>Tue, 21 Nov 2006 16:00:00 GMT</pubDate>
    </item>
  </channel>
</rss>