<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Vlad Hrybok's Tech Notes - AJAX</title>
    <link>http://vladsnotes.hrybok.com/</link>
    <description>The future of Internet is &lt;a href='http://httpvpn.com'&gt;HttpVPN&lt;/a&gt;...</description>
    <language>en-us</language>
    <copyright>Vlad Hrybok</copyright>
    <lastBuildDate>Mon, 10 Nov 2008 20:52:23 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.6264.0</generator>
    <managingEditor>vgribok@dodgeit.com</managingEditor>
    <webMaster>vgribok@dodgeit.com</webMaster>
    <item>
      <trackback:ping>http://vladsnotes.hrybok.com/Trackback.aspx?guid=7885abfa-f502-429f-8016-309e233e4554</trackback:ping>
      <pingback:server>http://vladsnotes.hrybok.com/pingback.aspx</pingback:server>
      <pingback:target>http://vladsnotes.hrybok.com/PermaLink,guid,7885abfa-f502-429f-8016-309e233e4554.aspx</pingback:target>
      <dc:creator>Vlad Hrybok</dc:creator>
      <wfw:comment>http://vladsnotes.hrybok.com/CommentView,guid,7885abfa-f502-429f-8016-309e233e4554.aspx</wfw:comment>
      <wfw:commentRss>http://vladsnotes.hrybok.com/SyndicationService.asmx/GetEntryCommentsRss?guid=7885abfa-f502-429f-8016-309e233e4554</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Since I use ASP.NET HTTP handlers quite often, I decided to figure out what advantages
IHttpAsyncHandler has compared with IHttpHandler. As I looked at many people's claim
that IHttpAsyncHandler somehow magically improves performance by shifting request processing
on to another thread, I realized that MSDN documentation of IHttpAsyncHandler is laking
in a fundamental way: it fails to mention that simply moving request rendering
onto another thread does not yield any benefit. 
</p>
        <p>
When you simply move your request handling logic from the original
ASP.NET thread to your own thread (IHttpAsyncHandler), you gain exactly nothing because
both threads come from the same pool. The benefit of IHttpAsyncHandler comes in only
when your request processing thread is blocking, waiting for <strong>another
thread</strong>. For example, if your request processing calls a web service, your
request processing thread will wait for the IO completion happening on another thread
- where request is sent to the web service. In this case there
will be <strong>two</strong> threads involved: your request processing thread, and
the IO thread where outgoing web service request is being executed. This is the situation
where IHttpAsyncHandler can help: instead of holding on to the request processing
thread while waiting for the outgoing request to complete, one can release the original
request processing thread back to the pool, and finish response rendering on the IO
thread after the web service request has completed. This way, instead of holding two
threads for the duration of the relatively long-running process of invoking
a web service, your request processing is using only one thread.
</p>
        <p>
So, the bottom line is this:<br />
- You should only concert yourself with IHttpAsyncHandler if you are running out of
request processing threads.<br />
- If you do, check your logic for whether it's waiting for an IO completion (or
is using other threads for other reasons), and only if that's the case, switch to
IHttpAsyncHandler.<br />
- Otherwise simply increase the size of the ASP.NET thread pool in the web.config
and stick with good ole' IHttpHandler.<br /></p>
        <img width="0" height="0" src="http://vladsnotes.hrybok.com/aggbug.ashx?id=7885abfa-f502-429f-8016-309e233e4554" />
      </body>
      <title>ASP.NET IHttpAsyncHandler vs IHttpHandler</title>
      <guid isPermaLink="false">http://vladsnotes.hrybok.com/PermaLink,guid,7885abfa-f502-429f-8016-309e233e4554.aspx</guid>
      <link>http://vladsnotes.hrybok.com/PermaLink,guid,7885abfa-f502-429f-8016-309e233e4554.aspx</link>
      <pubDate>Mon, 10 Nov 2008 20:52:23 GMT</pubDate>
      <description>&lt;p&gt;
Since I use ASP.NET HTTP handlers quite often, I decided to figure out what advantages
IHttpAsyncHandler has compared with IHttpHandler. As I looked at many people's claim
that IHttpAsyncHandler somehow magically improves performance by shifting&amp;nbsp;request&amp;nbsp;processing
on to another thread, I realized that MSDN documentation of IHttpAsyncHandler is laking
in&amp;nbsp;a fundamental way: it fails to mention that simply&amp;nbsp;moving request rendering
onto another thread&amp;nbsp;does not&amp;nbsp;yield any benefit. 
&lt;/p&gt;
&lt;p&gt;
When you simply&amp;nbsp;move your&amp;nbsp;request handling logic from&amp;nbsp;the original
ASP.NET thread to your own thread (IHttpAsyncHandler), you gain exactly nothing&amp;nbsp;because
both threads come from the same pool. The benefit of IHttpAsyncHandler comes in only
when your request processing thread&amp;nbsp;is blocking, waiting for &lt;strong&gt;another
thread&lt;/strong&gt;. For example, if your request processing calls a web service, your
request processing thread will wait for the IO completion happening on another thread
- where&amp;nbsp;request&amp;nbsp;is sent to&amp;nbsp;the web&amp;nbsp;service. In this case there
will be &lt;strong&gt;two&lt;/strong&gt; threads involved: your request processing thread, and
the IO thread where outgoing web service request is being executed. This is the situation
where IHttpAsyncHandler can help: instead of holding on to the request processing
thread while waiting for the outgoing request to complete, one can release the original
request processing thread back to the pool, and finish response rendering on the IO
thread after the web service request has completed. This way, instead of holding two
threads&amp;nbsp;for the duration of the&amp;nbsp;relatively long-running process of invoking
a web service, your request processing is using only one thread.
&lt;/p&gt;
&lt;p&gt;
So, the bottom line is this:&lt;br&gt;
- You should only concert yourself with IHttpAsyncHandler if you are running out of
request processing threads.&lt;br&gt;
- If you do, check your logic for whether it's waiting for&amp;nbsp;an IO completion (or
is using other threads for other reasons), and only if that's the case, switch to
IHttpAsyncHandler.&lt;br&gt;
- Otherwise simply increase the size of the ASP.NET thread pool in the web.config
and stick with good ole' IHttpHandler.&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vladsnotes.hrybok.com/aggbug.ashx?id=7885abfa-f502-429f-8016-309e233e4554" /&gt;</description>
      <comments>http://vladsnotes.hrybok.com/CommentView,guid,7885abfa-f502-429f-8016-309e233e4554.aspx</comments>
      <category>.NET Programming;AJAX;ASP.NET;Sofware Development</category>
    </item>
    <item>
      <trackback:ping>http://vladsnotes.hrybok.com/Trackback.aspx?guid=0eb204ae-ef15-454e-abbd-58ce08753e97</trackback:ping>
      <pingback:server>http://vladsnotes.hrybok.com/pingback.aspx</pingback:server>
      <pingback:target>http://vladsnotes.hrybok.com/PermaLink,guid,0eb204ae-ef15-454e-abbd-58ce08753e97.aspx</pingback:target>
      <dc:creator>Vlad Hrybok</dc:creator>
      <wfw:comment>http://vladsnotes.hrybok.com/CommentView,guid,0eb204ae-ef15-454e-abbd-58ce08753e97.aspx</wfw:comment>
      <wfw:commentRss>http://vladsnotes.hrybok.com/SyndicationService.asmx/GetEntryCommentsRss?guid=0eb204ae-ef15-454e-abbd-58ce08753e97</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://CodePlex.com">CodePlex.com</a> - a relatively new open-source collaboration
platform from Microsoft that came to replace old and cranky GotDotNet - has impressed
me quite a lot. Of course it closely resembles <a href="http://sourceforge.net/top/mostactive.php">SourceForge.net</a>,
with the main difference of CodePlex being underpinned by Team Foundation Server (TFS)
for source control and issue tracking functionality. 
</p>
        <p>
People often don't realize that <a href="http://www.codeplex.com/CodePlex/Wiki/View.aspx?title=Obtaining%20the%20Team%20Explorer%20Client">TFS
client that integrates into Visual Studio 2005 can be downloaded</a> and is completely
free.
</p>
        <p>
I currently host a couple of projects on Codeplex:
</p>
        <ul>
          <li>
            <a href="http://www.codeplex.com/MSAjax10SetupPrereq">MS AJAX 1.0 Setup Project Prerequisite
for Visual Studio 2005</a>.<br />
It makes MS AJAX redistributable by including it into the Setup.exe bootstrapper prerequisite
manifest. The prerequisite integrates nicely with Visual Studio 2005.<br /><br /></li>
          <li>
            <a href="http://www.codeplex.com/UltiDevWebBasedMP3Pl">Simple ASP.NET 2.0/C# MP3 Player</a>.<br />
This application demonstrates a possibility of building a web application for home
users. It includes redistributable UltiDev Cassini Web Server for ASP.NET 2.0 to not
make the application dependent on the presence of IIS on users machines. The
app is AJAXed to minimize music interruptions and uses Flash player to playback
MP3 to avoid dependency on any particular media player. </li>
        </ul>
        <img width="0" height="0" src="http://vladsnotes.hrybok.com/aggbug.ashx?id=0eb204ae-ef15-454e-abbd-58ce08753e97" />
      </body>
      <title>Open-Source And Me</title>
      <guid isPermaLink="false">http://vladsnotes.hrybok.com/PermaLink,guid,0eb204ae-ef15-454e-abbd-58ce08753e97.aspx</guid>
      <link>http://vladsnotes.hrybok.com/PermaLink,guid,0eb204ae-ef15-454e-abbd-58ce08753e97.aspx</link>
      <pubDate>Wed, 01 Aug 2007 15:51:18 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://CodePlex.com"&gt;CodePlex.com&lt;/a&gt; - a relatively new open-source collaboration
platform from Microsoft that came to replace old and cranky GotDotNet -&amp;nbsp;has impressed
me quite a lot. Of course it closely resembles &lt;a href="http://sourceforge.net/top/mostactive.php"&gt;SourceForge.net&lt;/a&gt;,
with the main difference of CodePlex being underpinned by Team Foundation Server (TFS)
for source control and issue tracking functionality. 
&lt;/p&gt;
&lt;p&gt;
People often don't realize that &lt;a href="http://www.codeplex.com/CodePlex/Wiki/View.aspx?title=Obtaining%20the%20Team%20Explorer%20Client"&gt;TFS
client that integrates into Visual Studio 2005 can be downloaded&lt;/a&gt; and&amp;nbsp;is completely
free.
&lt;/p&gt;
&lt;p&gt;
I currently host a couple of projects on Codeplex:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.codeplex.com/MSAjax10SetupPrereq"&gt;MS AJAX 1.0 Setup Project Prerequisite
for Visual Studio 2005&lt;/a&gt;.&lt;br&gt;
It makes MS AJAX redistributable by including it into the Setup.exe bootstrapper prerequisite
manifest. The prerequisite integrates nicely with Visual Studio 2005.&lt;br&gt;
&lt;br&gt;
&lt;li&gt;
&lt;a href="http://www.codeplex.com/UltiDevWebBasedMP3Pl"&gt;Simple ASP.NET 2.0/C# MP3 Player&lt;/a&gt;.&lt;br&gt;
This application demonstrates a possibility of building a web application for home
users. It includes redistributable UltiDev Cassini Web Server for ASP.NET 2.0 to not
make the application dependent on the presence of IIS on users machines.&amp;nbsp;The
app&amp;nbsp;is AJAXed to minimize music interruptions and uses Flash player to playback
MP3&amp;nbsp;to&amp;nbsp;avoid dependency on any particular media player.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://vladsnotes.hrybok.com/aggbug.ashx?id=0eb204ae-ef15-454e-abbd-58ce08753e97" /&gt;</description>
      <comments>http://vladsnotes.hrybok.com/CommentView,guid,0eb204ae-ef15-454e-abbd-58ce08753e97.aspx</comments>
      <category>AJAX;Digital Home;Sofware Development;Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://vladsnotes.hrybok.com/Trackback.aspx?guid=81917f0e-fbe8-4586-88f3-def975bd41b3</trackback:ping>
      <pingback:server>http://vladsnotes.hrybok.com/pingback.aspx</pingback:server>
      <pingback:target>http://vladsnotes.hrybok.com/PermaLink,guid,81917f0e-fbe8-4586-88f3-def975bd41b3.aspx</pingback:target>
      <dc:creator>Vlad Hrybok</dc:creator>
      <wfw:comment>http://vladsnotes.hrybok.com/CommentView,guid,81917f0e-fbe8-4586-88f3-def975bd41b3.aspx</wfw:comment>
      <wfw:commentRss>http://vladsnotes.hrybok.com/SyndicationService.asmx/GetEntryCommentsRss?guid=81917f0e-fbe8-4586-88f3-def975bd41b3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
After releasing build 1.7 of my open-source <a href="http://www.codeplex.com/UltiDevWebBasedMP3Pl/Release/ProjectReleases.aspx">redistributable
ASP.NET-based MP3 player application</a>, I used it for a while and I am pretty <strong>happy
with its stability and functionality</strong>. The design goal for the project was
to demo a concept of an easily-redistributable web application for SOHO market. With
unquestionable popularity of web-based applications in the business world, removing
complexity of the web hosting infrastructure to make home web applications possible
as a category is poised to be <a href="http://www.ultidev.com/products/HttpVPN/"><strong>the
next big thing</strong></a>.
</p>
        <img width="0" height="0" src="http://vladsnotes.hrybok.com/aggbug.ashx?id=81917f0e-fbe8-4586-88f3-def975bd41b3" />
      </body>
      <title>Version 1.7 of "MP3 Player Sample for ASP.NET with AJAX" Looks Good</title>
      <guid isPermaLink="false">http://vladsnotes.hrybok.com/PermaLink,guid,81917f0e-fbe8-4586-88f3-def975bd41b3.aspx</guid>
      <link>http://vladsnotes.hrybok.com/PermaLink,guid,81917f0e-fbe8-4586-88f3-def975bd41b3.aspx</link>
      <pubDate>Wed, 01 Aug 2007 15:02:17 GMT</pubDate>
      <description>&lt;p&gt;
After releasing build 1.7 of my open-source &lt;a href="http://www.codeplex.com/UltiDevWebBasedMP3Pl/Release/ProjectReleases.aspx"&gt;redistributable
ASP.NET-based MP3 player application&lt;/a&gt;, I used it for a while and I am pretty &lt;strong&gt;happy
with its stability and functionality&lt;/strong&gt;. The design goal for the project was
to demo a concept of an easily-redistributable web application for SOHO market. With
unquestionable popularity of web-based applications in the business world, removing
complexity of the web hosting infrastructure to make home web applications possible
as a category is poised to be&amp;nbsp;&lt;a href="http://www.ultidev.com/products/HttpVPN/"&gt;&lt;strong&gt;the
next big thing&lt;/strong&gt;&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vladsnotes.hrybok.com/aggbug.ashx?id=81917f0e-fbe8-4586-88f3-def975bd41b3" /&gt;</description>
      <comments>http://vladsnotes.hrybok.com/CommentView,guid,81917f0e-fbe8-4586-88f3-def975bd41b3.aspx</comments>
      <category>AJAX;ASP.NET;Digital Home;HttpVPN</category>
    </item>
    <item>
      <trackback:ping>http://vladsnotes.hrybok.com/Trackback.aspx?guid=8fbf8195-6c58-433a-bbe9-d961486bda8c</trackback:ping>
      <pingback:server>http://vladsnotes.hrybok.com/pingback.aspx</pingback:server>
      <pingback:target>http://vladsnotes.hrybok.com/PermaLink,guid,8fbf8195-6c58-433a-bbe9-d961486bda8c.aspx</pingback:target>
      <dc:creator>Vlad Hrybok</dc:creator>
      <wfw:comment>http://vladsnotes.hrybok.com/CommentView,guid,8fbf8195-6c58-433a-bbe9-d961486bda8c.aspx</wfw:comment>
      <wfw:commentRss>http://vladsnotes.hrybok.com/SyndicationService.asmx/GetEntryCommentsRss?guid=8fbf8195-6c58-433a-bbe9-d961486bda8c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
MS AJAX is great, but if you wanted to make an installable application with it, there
was no way of including AJAX into your MSI-based setup project. I made a <a href="http://www.codeplex.com/MSAjax10SetupPrereq/Release/ProjectReleases.aspx">Visual
Studio manifest</a> that makes MS AJAX Extensions a Visual Studio Setup Project <strong>prerequisite:</strong></p>
        <p>
          <img src="http://www.codeplex.com/MSAjax10SetupPrereq/Project/FileDownload.aspx?DownloadId=14404" />
        </p>
        <img width="0" height="0" src="http://vladsnotes.hrybok.com/aggbug.ashx?id=8fbf8195-6c58-433a-bbe9-d961486bda8c" />
      </body>
      <title>Making Microsoft AJAX 1.0 Redistributable with Visual Studio 2005 Setup Projects</title>
      <guid isPermaLink="false">http://vladsnotes.hrybok.com/PermaLink,guid,8fbf8195-6c58-433a-bbe9-d961486bda8c.aspx</guid>
      <link>http://vladsnotes.hrybok.com/PermaLink,guid,8fbf8195-6c58-433a-bbe9-d961486bda8c.aspx</link>
      <pubDate>Sat, 30 Jun 2007 22:53:12 GMT</pubDate>
      <description>&lt;p&gt;
MS AJAX is great, but if you wanted to make an installable application with it, there
was no way of including AJAX into your MSI-based setup project. I made a &lt;a href="http://www.codeplex.com/MSAjax10SetupPrereq/Release/ProjectReleases.aspx"&gt;Visual
Studio manifest&lt;/a&gt; that makes MS AJAX Extensions a Visual Studio Setup Project &lt;strong&gt;prerequisite:&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.codeplex.com/MSAjax10SetupPrereq/Project/FileDownload.aspx?DownloadId=14404"&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vladsnotes.hrybok.com/aggbug.ashx?id=8fbf8195-6c58-433a-bbe9-d961486bda8c" /&gt;</description>
      <comments>http://vladsnotes.hrybok.com/CommentView,guid,8fbf8195-6c58-433a-bbe9-d961486bda8c.aspx</comments>
      <category>AJAX;ASP.NET</category>
    </item>
    <item>
      <trackback:ping>http://vladsnotes.hrybok.com/Trackback.aspx?guid=dd75a329-1969-473a-996a-01ff9a90a84a</trackback:ping>
      <pingback:server>http://vladsnotes.hrybok.com/pingback.aspx</pingback:server>
      <pingback:target>http://vladsnotes.hrybok.com/PermaLink,guid,dd75a329-1969-473a-996a-01ff9a90a84a.aspx</pingback:target>
      <dc:creator>Vlad Hrybok</dc:creator>
      <wfw:comment>http://vladsnotes.hrybok.com/CommentView,guid,dd75a329-1969-473a-996a-01ff9a90a84a.aspx</wfw:comment>
      <wfw:commentRss>http://vladsnotes.hrybok.com/SyndicationService.asmx/GetEntryCommentsRss?guid=dd75a329-1969-473a-996a-01ff9a90a84a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
To AJAX-enable your existing ASP.NET 2.0 application follow <a href="http://www.asp.net/learn/videos/view.aspx?tabid=63&amp;id=81">this
video</a>. It takes only a few minutes and essentially makes you create a dummy new
Ajax-enabled ASP.NET application and then copy &amp; paste relevant pieces of its
web.config file into your application's web.config. 
</p>
        <p>
If you are planning to use <a href="http://www.codeplex.com/AtlasControlToolkit">Ajax
Control Toolkit</a>, then instead of creating dummy project from the "ASP.NET AJAX-Enabled
Web Site" Visual Studio project template, create the dummy project using "AJAX Control
Toolkit Web Site" template. Its web.config has additional entry in the &lt;controls&gt;
section of the web.config that will be necessary for your application.
</p>
        <img width="0" height="0" src="http://vladsnotes.hrybok.com/aggbug.ashx?id=dd75a329-1969-473a-996a-01ff9a90a84a" />
      </body>
      <title>Microsoft Ajax 1.0 Extensions: Converting Existing ASP.NET Application Into AJAX-Enabled One</title>
      <guid isPermaLink="false">http://vladsnotes.hrybok.com/PermaLink,guid,dd75a329-1969-473a-996a-01ff9a90a84a.aspx</guid>
      <link>http://vladsnotes.hrybok.com/PermaLink,guid,dd75a329-1969-473a-996a-01ff9a90a84a.aspx</link>
      <pubDate>Fri, 22 Jun 2007 17:01:40 GMT</pubDate>
      <description>&lt;p&gt;
To AJAX-enable your existing ASP.NET 2.0 application follow &lt;a href="http://www.asp.net/learn/videos/view.aspx?tabid=63&amp;amp;id=81"&gt;this
video&lt;/a&gt;. It takes only a few minutes and essentially makes you create a dummy new
Ajax-enabled ASP.NET application and then copy &amp;amp; paste relevant pieces of its
web.config file into your application's web.config. 
&lt;/p&gt;
&lt;p&gt;
If you are planning to use &lt;a href="http://www.codeplex.com/AtlasControlToolkit"&gt;Ajax
Control Toolkit&lt;/a&gt;, then instead of creating dummy project from the "ASP.NET AJAX-Enabled
Web Site" Visual Studio project template, create the dummy project using "AJAX Control
Toolkit Web Site" template. Its web.config has additional entry in the &amp;lt;controls&amp;gt;
section of the web.config that will be necessary for your application.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vladsnotes.hrybok.com/aggbug.ashx?id=dd75a329-1969-473a-996a-01ff9a90a84a" /&gt;</description>
      <comments>http://vladsnotes.hrybok.com/CommentView,guid,dd75a329-1969-473a-996a-01ff9a90a84a.aspx</comments>
      <category>AJAX;ASP.NET;Sofware Development</category>
    </item>
  </channel>
</rss>