<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>dmitryr's blog</title><link>http://blogs.msdn.com/dmitryr/default.aspx</link><description /><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Cassini: Support for Friendly URLs / Routing</title><link>http://blogs.msdn.com/dmitryr/archive/2009/04/23/cassini-support-for-friendly-urls-routing.aspx</link><pubDate>Fri, 24 Apr 2009 09:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9566153</guid><dc:creator>DmitryR</dc:creator><slash:comments>10</slash:comments><comments>http://blogs.msdn.com/dmitryr/comments/9566153.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dmitryr/commentrss.aspx?PostID=9566153</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Cassini had a problem with ASP.NET projects using Routing due to the directory listing feature.&amp;nbsp;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;Cassini would respond with the directory listing to any request for a directory, without handing over the request to ASP.NET.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;As a result, requests for friendly URLs would get intercepted by Cassini and never reach ASP.NET.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;This update (v3.5.0.1) changes the logic around – all requests go to ASP.NET first, then Cassini intercepts 404 responses and, if the request was for a directory, it responds with the directory listing.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Applications relying on friendly URLs / Routing&amp;nbsp;now work better with Cassini.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;(6/25/2009) v3.5.0.2 fixes the default document problem&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9566153" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/dmitryr/attachment/9566153.ashx" length="27865" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/dmitryr/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/dmitryr/archive/tags/Cassini/default.aspx">Cassini</category></item><item><title>Plan 9 Update (03/01/2009)</title><link>http://blogs.msdn.com/dmitryr/archive/2009/03/01/plan-9-update-03-01-2009.aspx</link><pubDate>Mon, 02 Mar 2009 01:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9453119</guid><dc:creator>DmitryR</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/dmitryr/comments/9453119.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dmitryr/commentrss.aspx?PostID=9453119</wfw:commentRss><description>&lt;P&gt;I've updated Plan 9 sample.&amp;nbsp; Please download the attachment.&lt;/P&gt;
&lt;P&gt;Changes include:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;GET / POST page methods instead of Page_Load / Page_Post 
&lt;LI&gt;Support for stand-alone .aspx pages (in the application root directory) 
&lt;LI&gt;Authorization via page directive (in addition to page method attributes) 
&lt;LI&gt;Removed all use of ViewData from the sample web site 
&lt;LI&gt;Html Extensions for generating links and user controls. Page and Directory first level concepts instead of path (Html.HomeLink() and Html.PageLink("Home", "Index") instead of Html.PageLink("~/Home/Index")) 
&lt;LI&gt;Helpers for Http Redirects (without ThreadAbortException), Validation, Security 
&lt;LI&gt;Built on top of ASP.NET MVC RC &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Disclaimer: &lt;/STRONG&gt;Plan 9 is a sample put together as the result of experimentation.&amp;nbsp; Plan 9 is internally built on top of ASP.NET MVC, but it is not an MVC Framework by itself.&lt;/P&gt;
&lt;P&gt;For the future I plan to add support for simple AJAX scenarios.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9453119" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/dmitryr/attachment/9453119.ashx" length="159316" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/dmitryr/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>VB.NET XML Literals ASP.NET MVC Sample Updated for ASP.NET MVC RC</title><link>http://blogs.msdn.com/dmitryr/archive/2009/02/16/vb-net-xml-literals-asp-net-mvc-sample-updated-for-asp-net-mvc-rc.aspx</link><pubDate>Tue, 17 Feb 2009 05:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9426957</guid><dc:creator>DmitryR</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/dmitryr/comments/9426957.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dmitryr/commentrss.aspx?PostID=9426957</wfw:commentRss><description>&lt;P&gt;I've updated the &lt;A class="" title="Original Sample for ASP.NET MVC Beta" href="http://blogs.msdn.com/dmitryr/archive/2008/12/29/asp-net-mvc-view-engine-using-vb-net-xml-literals.aspx" mce_href="http://blogs.msdn.com/dmitryr/archive/2008/12/29/asp-net-mvc-view-engine-using-vb-net-xml-literals.aspx"&gt;VB XML Literals View Engine sample&lt;/A&gt; for &lt;A class="" title="Download ASP.NET MVC RC" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=f4e4ee26-4bc5-41ed-80c9-261336b2a5b6&amp;amp;DisplayLang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=f4e4ee26-4bc5-41ed-80c9-261336b2a5b6&amp;amp;DisplayLang=en"&gt;ASP.NET MVC RC&lt;/A&gt; (attached).&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Dmitry&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9426957" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/dmitryr/attachment/9426957.ashx" length="168503" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/dmitryr/archive/tags/ASP.NET+MVC+VB+XML/default.aspx">ASP.NET MVC VB XML</category></item><item><title>ASP.NET MVC “Plan 9” Sample</title><link>http://blogs.msdn.com/dmitryr/archive/2009/01/21/asp-net-mvc-plan-9-sample.aspx</link><pubDate>Thu, 22 Jan 2009 10:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9364432</guid><dc:creator>DmitryR</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/dmitryr/comments/9364432.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dmitryr/commentrss.aspx?PostID=9364432</wfw:commentRss><description>&lt;P&gt;[Latest update &lt;A class="" title="Plan 9 update" href="http://blogs.msdn.com/dmitryr/archive/2009/03/01/plan-9-update-03-01-2009.aspx" mce_href="http://blogs.msdn.com/dmitryr/archive/2009/03/01/plan-9-update-03-01-2009.aspx"&gt;here&lt;/A&gt;]&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The attached sample implements simplified Web application paradigm (called “Plan 9 MVC”) based on ASP.NET MVC. It is page-centric (it hides Controllers) but it retains many of the benefits of ASP.NET MVC. The package contains a Visual Studio solution with two projects (the standard ASP.NET MVC starter template rewritten as a Plan 9 Web Site, and the library implementing Plan 9 framework), the license document, and README document.&lt;/P&gt;
&lt;P&gt;ASP.NET MVC provides many benefits including: 
&lt;OL&gt;
&lt;LI&gt;Separation of Concerns and the resulting testability &lt;/LI&gt;
&lt;LI&gt;Better control over HTML in MVC views (compared to classic Web Forms). Rendering using HTML helpers provided for MVC View Pages. &lt;/LI&gt;
&lt;LI&gt;Nice looking logical URLs &lt;/LI&gt;
&lt;LI&gt;Productivity features like binding of HTML form fields to action method arguments and declarative authorization rules (by decorating action methods) &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Plan 9 completely ignores #1 above, as it does not have Controllers visible to the user. However, the other benefits stay.&lt;/P&gt;
&lt;P&gt;The website does not have “Controllers” and “Views” folders – it has “Pages” folder instead, containing ASP.NET pages implemented as MVC View Pages, with HTML helpers. Requests are mapped to these pages using a simple rule: ~/Home/Index is routed to ~/Pages/Home/Index.aspx&lt;/P&gt;
&lt;P&gt;The code normally found in Action Methods of a Controller, in Plan 9 applications resides in page methods, Page_Load and the newly introduced (in Plan 9)&amp;nbsp;Page_Post.&lt;/P&gt;
&lt;P&gt;Page_Load can be decorated with [Authorize] attribute, similar to how the attribute is used on Action Methods in Controllers:&lt;/P&gt;&lt;PRE&gt;    [Authorize]
    public void Page_Load() {
        ViewData["Title"] = "Change Password";
    }
    …
&lt;/PRE&gt;
&lt;P&gt;Page_Post method is only executed on HTTP POST requests and its arguments are automatically bound to the request data just as Action Method arguments are:&lt;/P&gt;&lt;PRE&gt;    public void Page_Load() {
        ViewData["Title"] = "Login";
    }
    
    public void Page_Post(string username, string password, bool rememberMe, string returnUrl) {
        …
    }
&lt;/PRE&gt;
&lt;P&gt;Plan 9 also introduces several helper methods for link generation and validation, to simplify the page code.&lt;/P&gt;
&lt;P&gt;Internally Plan 9 implementation is based on ASP.NET MVC. The requests are routed to one controller (all to one Action Method) that dispatches them to the corresponding pages:&lt;/P&gt;&lt;PRE&gt;    public class Plan9Controller : Controller {
        public ActionResult Action() {
            string virtualPath = Plan9.GetPath(ControllerContext.RouteData);

            if (!HostingEnvironment.VirtualPathProvider.FileExists(virtualPath)) {
                throw new HttpException(404, string.Empty);
            }

            Plan9.CurrentControllerContext = ControllerContext;
            return View(new WebFormView(virtualPath));
        }
    }
&lt;/PRE&gt;
&lt;P&gt;Obviously, Plan 9 is not a true MVC framework and should not be considered as such. But it does provide a simple alternative way to develop web applications preserving many of the benefits of ASP.NET MVC. In the future it would be interesting to explore a hybrid model, applications that combine true MVC with Plan 9 sub-sections.&lt;/P&gt;
&lt;P&gt;The name "Plan 9" refers to &lt;A class="" title="Plan 9 from Outer Space" href="http://video.google.com/videoplay?docid=-7038656109656489183" target=_blank mce_href="http://video.google.com/videoplay?docid=-7038656109656489183"&gt;Plan 9 from Outer Space&lt;/A&gt; (a 1950s zero-budget Sci-Fi movie, some claim it to be the worst movie ever made -- it's so bad it's fun to watch).&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9364432" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/dmitryr/attachment/9364432.ashx" length="153068" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/dmitryr/archive/tags/ASP.NET+MVC/default.aspx">ASP.NET MVC</category></item><item><title>ASP.NET MVC View Engine using VB.NET XML Literals</title><link>http://blogs.msdn.com/dmitryr/archive/2008/12/29/asp-net-mvc-view-engine-using-vb-net-xml-literals.aspx</link><pubDate>Mon, 29 Dec 2008 23:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9256127</guid><dc:creator>DmitryR</dc:creator><slash:comments>10</slash:comments><comments>http://blogs.msdn.com/dmitryr/comments/9256127.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dmitryr/commentrss.aspx?PostID=9256127</wfw:commentRss><description>&lt;P&gt;[Update for ASP.NET&amp;nbsp;MVC RC &lt;A class="" title="Update for ASP.NET MVC RC" href="http://blogs.msdn.com/dmitryr/archive/2009/02/16/vb-net-xml-literals-asp-net-mvc-sample-updated-for-asp-net-mvc-rc.aspx" mce_href="http://blogs.msdn.com/dmitryr/archive/2009/02/16/vb-net-xml-literals-asp-net-mvc-sample-updated-for-asp-net-mvc-rc.aspx"&gt;available&lt;/A&gt;]&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code in the attached ZIP file implements a custom View Engine for &lt;A class="" href="http://www.asp.net/mvc" mce_href="http://www.asp.net/mvc"&gt;ASP.NET MVC&lt;/A&gt; Beta using VB.NET XML literals.&amp;nbsp; Instead of traditional ASP.NET pages, the views are implemented as VB.NET classes.&lt;/P&gt;
&lt;P&gt;The package contains a Visual Studio solution with two projects (the standard&amp;nbsp; ASP.NET MVC starter template rewritten to use VB.NET XML views, and the library implementing the view engine), the license document, and README document.&lt;/P&gt;
&lt;P&gt;Notes:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;View engine registration is done in GLOBAL.ASAX in Application_Start method:&lt;/P&gt;&lt;PRE&gt;    ViewEngines.Engines.Add(New VbViewEngine)
&lt;/PRE&gt;
&lt;P&gt;VbViewEngine, instead of searching directories for files, looks for a class derived from VbView named &lt;EM&gt;ActionName&lt;/EM&gt; in namespace &lt;EM&gt;*.Views.ControllerName&lt;/EM&gt; in the assembly of the controller.&lt;/P&gt;
&lt;P&gt;ASPX, MASTER and ASCX files implementing MVC views are replaced with VB classes derived from&amp;nbsp; VbView.&amp;nbsp; Many ASP.NET concepts have direct analogs in VB.NET (or OO world in general). For example, a master page get replaced with a base class. Here is how Index view looks in VB.NET:&lt;/P&gt;&lt;PRE&gt;    Namespace Views.Home
        Public Class Index
            Inherits SiteMaster

            Public Overrides Function RenderContent() As XElement
                Return &amp;lt;div&amp;gt;
                         &amp;lt;h2&amp;gt;&amp;lt;%= Xhtml.Encode(ViewData("Message")) %&amp;gt;&amp;lt;/h2&amp;gt;
                         &amp;lt;p&amp;gt;To learn more about ASP.NET MVC ...&amp;lt;/p&amp;gt;
                       &amp;lt;/div&amp;gt;
            End Function
        End Class
    End Namespace
&lt;/PRE&gt;
&lt;P&gt;The entire application is compiled into one assembly.&amp;nbsp; There are no ASPX files that need to be deployed.&lt;/P&gt;
&lt;P&gt;Unfortunately HTML helpers that come with ASP.NET MVC are not usable from VB.NET XML views because HTML helpers return strings.&amp;nbsp; XHTML helper class has been added that has [some of] the methods found on HTML helper -- they return XElements&amp;nbsp; instead of strings.&amp;nbsp; Here is the implementation of validation summary helper using VB.NET XML literals:&lt;/P&gt;&lt;PRE&gt;    Public Function ValidationSummary() As XElement
        If _viewData.ModelState.IsValid Then
            Return Nothing
        End If

        Return &amp;lt;ul class="validation-summary-errors"&amp;gt;
                   &amp;lt;%= From e In _viewData.ModelState From m In e.Value.Errors Select _
                       &amp;lt;li&amp;gt;&amp;lt;%= m.ErrorMessage %&amp;gt;&amp;lt;/li&amp;gt; _
                   %&amp;gt;
               &amp;lt;/ul&amp;gt;
    End Function
&lt;/PRE&gt;
&lt;P&gt;The controller code in the starter template did not change at all, even though all the views have been replaced to use a different view engine.&amp;nbsp; This is a good thing -- it validates the separation of concerns in MVC.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Your feedback and suggestions are most welcome!&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Dmitry&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9256127" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/dmitryr/attachment/9256127.ashx" length="169087" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/dmitryr/archive/tags/ASP.NET+MVC+VB+XML+VB.NET/default.aspx">ASP.NET MVC VB XML VB.NET</category></item><item><title>Cassini for Framework 3.5</title><link>http://blogs.msdn.com/dmitryr/archive/2008/10/03/cassini-for-framework-3-5.aspx</link><pubDate>Fri, 03 Oct 2008 21:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8975821</guid><dc:creator>DmitryR</dc:creator><slash:comments>18</slash:comments><comments>http://blogs.msdn.com/dmitryr/comments/8975821.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dmitryr/commentrss.aspx?PostID=8975821</wfw:commentRss><description>&lt;P&gt;The attachment contains Cassini version for .NET Framework 3.5.&lt;/P&gt;
&lt;P&gt;Highlights:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT size=2&gt;Runs as a single EXE -- does not require an assembly in GAC&lt;/LI&gt;
&lt;LI&gt;Supported IPv6-only configurations&lt;/LI&gt;
&lt;LI&gt;Upgraded to support .NET Framework 3.5&lt;/LI&gt;
&lt;LI&gt;Includes VS project file&lt;/LI&gt;
&lt;LI&gt;License changed to Ms-PL&lt;/LI&gt;&lt;/UL&gt;&lt;/FONT&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8975821" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/dmitryr/attachment/8975821.ashx" length="27656" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/dmitryr/archive/tags/ASP.NET+Cassini/default.aspx">ASP.NET Cassini</category></item><item><title>Dynamic Client Script for Silverlight 2 beta 2</title><link>http://blogs.msdn.com/dmitryr/archive/2008/06/17/dynamic-client-script-for-silverlight-2-beta-2.aspx</link><pubDate>Tue, 17 Jun 2008 19:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8611854</guid><dc:creator>DmitryR</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/dmitryr/comments/8611854.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dmitryr/commentrss.aspx?PostID=8611854</wfw:commentRss><description>&lt;A class="" title=Silverlight href="http://silverlight.net/GetStarted/" mce_href="http://silverlight.net/GetStarted/"&gt;Silverlight 2 beta 2&lt;/A&gt; is out,&amp;nbsp;so I updated &lt;A class="" title="Dynamic Client Script" href="http://blogs.msdn.com/dmitryr/archive/2008/05/06/dynamic-client-script-for-silverlight-2-beta2.aspx" mce_href="http://blogs.msdn.com/dmitryr/archive/2008/05/06/dynamic-client-script-for-silverlight-2-beta2.aspx"&gt;Dynamic Client Script&lt;/A&gt; sample&amp;nbsp;accordingly (attached to this post).&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8611854" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/dmitryr/attachment/8611854.ashx" length="1368006" type="application/x-zip-compressed" /></item><item><title>Dynamic Client Script for Silverlight 2  beta 1</title><link>http://blogs.msdn.com/dmitryr/archive/2008/05/06/dynamic-client-script-for-silverlight-2-beta2.aspx</link><pubDate>Tue, 06 May 2008 20:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8463484</guid><dc:creator>DmitryR</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/dmitryr/comments/8463484.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dmitryr/commentrss.aspx?PostID=8463484</wfw:commentRss><description>&lt;P&gt;&lt;A class="" title="Dynamic Client Script" href="http://blogs.msdn.com/dmitryr/archive/2007/05/04/dynamic-client-script.aspx" mce_href="http://blogs.msdn.com/dmitryr/archive/2007/05/04/dynamic-client-script.aspx"&gt;Last year&lt;/A&gt; I've published a simple ASP.NET control, called ‘Dynamic Client Script', that enables IronPython client scripting in ASP.NET pages in Silverlight 1.1 Alpha.&amp;nbsp; Since then Silverlight evolved quite a bit and &lt;A class="" title=Silverlight href="http://silverlight.net/getstarted/default.aspx" mce_href="http://silverlight.net/getstarted/default.aspx"&gt;Silverlight 2 Beta 1&lt;/A&gt; has been released.&amp;nbsp; According to the new model, Silverlight applications are published as XAP archives containing the application code, so I've updated the Dynamic Client Script sample to work with the new model.&lt;/P&gt;
&lt;P&gt;The user model for Dynamic Client Script stays the same -- all user needs to is to drop the control onto an ASP.NET page:&lt;BR&gt;&lt;EM&gt;&amp;lt;asp:DynamicClientScript runat="server" ID="MyScript" Source="myscript.py" /&amp;gt;&lt;/EM&gt;&lt;BR&gt;The control does all the magic, including generation of Silverlight object tag with the link to the Silverlight application (XAP archive) pointing back to the page as a request with a special path-info.&amp;nbsp; That request gets intercepted by the control, and it creates the XAP archive on the fly, and caches it across requests with the right cache dependencies so it only gets re-created when the page or the script changes.&lt;/P&gt;
&lt;P&gt;The XAP creation code comes from &lt;A class="" title="John Lam explains Chiron" href="http://www.iunknown.com/2008/03/dynamic-silverl.html" mce_href="http://www.iunknown.com/2008/03/dynamic-silverl.html"&gt;Chiron&lt;/A&gt;, a development web server that we ship with &lt;A class="" title="Dynamic Languages SDK" href="http://www.codeplex.com/sdlsdk/Release/ProjectReleases.aspx?ReleaseId=11955" mce_href="http://www.codeplex.com/sdlsdk/Release/ProjectReleases.aspx?ReleaseId=11955"&gt;Dynamic Languages SDK&lt;/A&gt; for Silverlight.&amp;nbsp; Chiron automatically creates XAP archives from any directory, to facilitate development of Silverlight application in dynamic languages.&amp;nbsp; Dynamic Client Script control does not require Chiron, it works with any ASP.NET web server, including IIS (and Cassini as well).&lt;/P&gt;
&lt;P&gt;The updated sample:&lt;BR&gt;
&lt;UL class=unIndentedList&gt;
&lt;LI&gt;Allows script inline in the ASP.NET page or in a separate file&lt;/LI&gt;
&lt;LI&gt;Supports IronPython, IronRuby, Managed JScript&lt;/LI&gt;
&lt;LI&gt;Supports multiple instances of Dynamic Client Script control on the same ASP.NET page&lt;/LI&gt;
&lt;LI&gt;Includes all DLR assemblies and compliers&lt;/LI&gt;
&lt;LI&gt;Includes sample pages &lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;The attached package includes all the sources, binaries, and samples.&lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8463484" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/dmitryr/attachment/8463484.ashx" length="1213628" type="application/x-zip-compressed" /></item><item><title>ASP.NET RSS Toolkit Version 2</title><link>http://blogs.msdn.com/dmitryr/archive/2007/06/17/asp-net-rss-toolkit-version-2.aspx</link><pubDate>Mon, 18 Jun 2007 04:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3371972</guid><dc:creator>DmitryR</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/dmitryr/comments/3371972.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dmitryr/commentrss.aspx?PostID=3371972</wfw:commentRss><description>&lt;P&gt;Thanks to &lt;A class="" title=Piyush href="http://blogs.msdn.com/shahpiyush/default.aspx" mce_href=" http://blogs.msdn.com/shahpiyush/default.aspx"&gt;Piyush&lt;/A&gt;, the second version of ASP.NET RSS Toolkit is now available on &lt;A class="" title=CodePlex href="http://www.codeplex.com/ASPNETRSSToolkit/" mce_href="http://www.codeplex.com/ASPNETRSSToolkit/"&gt;CodePlex&lt;/A&gt;.&amp;nbsp; &lt;A class="" title="Get Version 2 of ASP.NET RSS Toolkit" href="http://www.codeplex.com/ASPNETRSSToolkit/Release/ProjectReleases.aspx?ReleaseId=3674" mce_href="http://www.codeplex.com/ASPNETRSSToolkit/Release/ProjectReleases.aspx?ReleaseId=3674"&gt;Please check it out&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Dmitry&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3371972" width="1" height="1"&gt;</description></item><item><title>Photo Album Sample</title><link>http://blogs.msdn.com/dmitryr/archive/2007/05/17/photo-album-sample.aspx</link><pubDate>Thu, 17 May 2007 19:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2698407</guid><dc:creator>DmitryR</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/dmitryr/comments/2698407.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dmitryr/commentrss.aspx?PostID=2698407</wfw:commentRss><description>&lt;P&gt;Attached is an updated Photo Album sample.&amp;nbsp;The idea is to maximize the simplicity of use - just drop&amp;nbsp;default.aspx page into the [root] directory where the pictures are and it does everything for you -- list view per folder, details view for each picture, thumbnails generation and caching, etc.&lt;/P&gt;
&lt;P&gt;It is similar to the one I've published &lt;A class="" title="old sample" href="http://blogs.msdn.com/dmitryr/archive/2005/06/24/432499.aspx" mce_href="http://blogs.msdn.com/dmitryr/archive/2005/06/24/432499.aspx"&gt;before&lt;/A&gt;, but this one is implemented as a page (.aspx, not .ashx) and it handles both page views and image requests.&amp;nbsp; It is&amp;nbsp;as easily customizable as any ASP.NET page -- it relies on MultiView control to switch between list and detail views.&amp;nbsp; The package includes sources in C#, IronPython, and Managed JScript -- for the latter two please install &lt;A class="" title="ASP.NET Futures" href="http://www.asp.net/downloads/futures/default.aspx" mce_href="http://www.asp.net/downloads/futures/default.aspx"&gt;ASP.NET Futures&lt;/A&gt; package.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Dmitry&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2698407" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/dmitryr/attachment/2698407.ashx" length="15338" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/dmitryr/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>ASP.NET Futures</title><link>http://blogs.msdn.com/dmitryr/archive/2007/05/16/asp-net-futures.aspx</link><pubDate>Thu, 17 May 2007 08:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2688882</guid><dc:creator>DmitryR</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/dmitryr/comments/2688882.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dmitryr/commentrss.aspx?PostID=2688882</wfw:commentRss><description>&lt;P&gt;Please check out &lt;A class="" title="ASP.NET Futures" href="http://www.asp.net/downloads/futures/default.aspx" mce_href="http://www.asp.net/downloads/futures/default.aspx"&gt;ASP.NET Futures&lt;/A&gt; release with Dynamic Langauges support&amp;nbsp;and Dynamic Data Controls.&amp;nbsp; The former is the updated version of IronPython for ASP.NET, now based on DLR.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Dmitry&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2688882" width="1" height="1"&gt;</description></item><item><title>Dynamic Client Script</title><link>http://blogs.msdn.com/dmitryr/archive/2007/05/04/dynamic-client-script.aspx</link><pubDate>Sat, 05 May 2007 01:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2416354</guid><dc:creator>DmitryR</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/dmitryr/comments/2416354.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dmitryr/commentrss.aspx?PostID=2416354</wfw:commentRss><description>&lt;P&gt;Attached to this post is the&amp;nbsp;Dynamic Client Script sample -- an ASP.NET control that simplifies creation of AJAX-like Web pages in managed scripting languages using Microsoft Silverlight cross-browser / cross-platform technologies.&lt;/P&gt;
&lt;P&gt;The recent release of &lt;A class="" title=Silverlight href="http://silverlight.net/" mce_href="http://silverlight.net/"&gt;Microsoft Silverlight&lt;/A&gt;&amp;nbsp;enables a set of scenarios that some people might find interesting.&amp;nbsp;Silverlight 1.1 Alpha release includes features that enable AJAX-like scenarios using managed dynamic languages on the client:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;APIs to access HTML DOM from managed code&lt;/LI&gt;
&lt;LI&gt;APIs to make HTTP requests to Web services from managed code&lt;/LI&gt;
&lt;LI&gt;Dynamic Language Runtime (&lt;A class="" title=DLR href="http://blogs.msdn.com/hugunin/archive/2007/04/30/a-dynamic-language-runtime-dlr.aspx" mce_href="http://blogs.msdn.com/hugunin/archive/2007/04/30/a-dynamic-language-runtime-dlr.aspx"&gt;DLR&lt;/A&gt;) with the implementation of &lt;A class="" title=IronPython href="http://www.codeplex.com/IronPython" mce_href="http://www.codeplex.com/IronPython"&gt;IronPython&lt;/A&gt; and Managed JScript (with more dynamic languages, including IronRuby, coming in the future).&amp;nbsp; (Please also see &lt;A class="" title="Dynamic Silverlight Samples" href="http://www.codeplex.com/dynamicsilverlight" mce_href="http://www.codeplex.com/dynamicsilverlight"&gt;Dynamic Silverlight Samples&lt;/A&gt; on CodePlex)&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;As a result, it is possible to author an HTML page with IronPython client script using the following steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Start with an HTML page&lt;/LI&gt;
&lt;LI&gt;Write the IronPython client script file&lt;/LI&gt;
&lt;LI&gt;Author a [bootstrapping] XAML file with a reference to the IronPython client script file (and add the XAML file to the project)&lt;/LI&gt;
&lt;LI&gt;Add a link in the HTML page to the Silverlight bootstrapping jscript files (and add the files to the project)&lt;/LI&gt;
&lt;LI&gt;Add jscript code to the HTML page to instantiate the Silverlight control&lt;BR&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Dynamic Client Script control dramatically simplifies this:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Start with an ASP.NET page&lt;/LI&gt;
&lt;LI&gt;Write the IronPython client script file&lt;/LI&gt;
&lt;LI&gt;Place Dynamic Client Script control onto the ASP.NET page and set 'Source' property to point to the IronPython file&lt;BR&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Notes:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Dynamic Client Script control automatically renders the links to the bootstrapping jscript and to XAML (the actual links point back to the containing page and the control intercepts these requests and serves the corresponding content)&lt;/LI&gt;
&lt;LI&gt;No additional files need to be added to the project&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Several Dynamic Client Script controls can co-exist in the same ASP.NET page&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Dynamic Client Script control (in addition to 'Source' reference) supports inline script (it uses the same link-back trick to generate the link from XAML to script) &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The attached package (DynamicClientScript.zip) contains sources (licensed under Ms-PL) and samples (as a run-able Web app).&lt;/P&gt;
&lt;P&gt;Please check this out, if you are interested.&lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2416354" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/dmitryr/attachment/2416354.ashx" length="12727" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/dmitryr/archive/tags/Silverlight/default.aspx">Silverlight</category></item><item><title>Another CodePlex Project</title><link>http://blogs.msdn.com/dmitryr/archive/2007/03/13/another-codeplex-project.aspx</link><pubDate>Wed, 14 Mar 2007 08:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1878497</guid><dc:creator>DmitryR</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/dmitryr/comments/1878497.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dmitryr/commentrss.aspx?PostID=1878497</wfw:commentRss><description>&lt;P&gt;Some time ago I wrote a simple ASP.NET in-process executor for internal testing&amp;nbsp;and I am happy to see it go public on &lt;A class="" title=Plasma href="http://www.codeplex.com/plasma" mce_href="http://www.codeplex.com/plasma"&gt;CodePlex&lt;/A&gt; (under name "Plasma") including NUnit integration, thanks to &lt;A class="" title=AspAlliance href="http://aspalliance.com/" mce_href="http://aspalliance.com/"&gt;Steve Smith from AspAlliance&lt;/A&gt;.&amp;nbsp; Please check it out.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Dmitry&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1878497" width="1" height="1"&gt;</description></item><item><title>Disk Output Cache is now on CodePlex</title><link>http://blogs.msdn.com/dmitryr/archive/2007/02/18/disk-output-cache-is-now-on-codeplex.aspx</link><pubDate>Mon, 19 Feb 2007 08:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1711368</guid><dc:creator>DmitryR</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/dmitryr/comments/1711368.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dmitryr/commentrss.aspx?PostID=1711368</wfw:commentRss><description>&lt;P&gt;Thanks to &lt;A class="" title="Scott Cate" href="http://www.scottcate.com/" mce_href="http://www.scottcate.com/"&gt;Scott Cate&lt;/A&gt; the &lt;A class="" title="Disk Output Cache" href="http://blogs.msdn.com/dmitryr/archive/2005/12/13/503411.aspx" mce_href="http://blogs.msdn.com/dmitryr/archive/2005/12/13/503411.aspx"&gt;Disk Output Cache&lt;/A&gt; project is now on &lt;A class="" title=CodePlex href="http://www.codeplex.com/AspNetDiskOutputCach" mce_href="http://www.codeplex.com/AspNetDiskOutputCach"&gt;CodePlex&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Please &lt;A class="" title="CodePlex Project" href="http://www.codeplex.com/AspNetDiskOutputCach" mce_href="http://www.codeplex.com/AspNetDiskOutputCach"&gt;check it out&lt;/A&gt; and consider contributing.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Dmitry&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1711368" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dmitryr/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Finding out the current trust level in ASP.NET</title><link>http://blogs.msdn.com/dmitryr/archive/2007/01/23/finding-out-the-current-trust-level-in-asp-net.aspx</link><pubDate>Wed, 24 Jan 2007 07:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1519445</guid><dc:creator>DmitryR</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/dmitryr/comments/1519445.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dmitryr/commentrss.aspx?PostID=1519445</wfw:commentRss><description>&lt;P&gt;Here is a sample code that returns the current trust level, assuming&amp;nbsp;this code (or the calling code up the stack),&amp;nbsp;is &lt;EM&gt;not&lt;/EM&gt; loaded from GAC:&lt;/P&gt;&lt;PRE&gt;AspNetHostingPermissionLevel GetCurrentTrustLevel() {
    foreach (AspNetHostingPermissionLevel trustLevel in
            new AspNetHostingPermissionLevel [] {
                AspNetHostingPermissionLevel.Unrestricted,
                AspNetHostingPermissionLevel.High,
                AspNetHostingPermissionLevel.Medium,
                AspNetHostingPermissionLevel.Low,
                AspNetHostingPermissionLevel.Minimal 
            } ) {
        try {
            new AspNetHostingPermission(trustLevel).Demand();
        }
        catch (System.Security.SecurityException ) {
            continue;
        }
 
        return trustLevel;
     }

     return AspNetHostingPermissionLevel.None;
}
&lt;/PRE&gt;
&lt;P&gt;The result can be cached in a static field for the duration of the app domain lifetime.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1519445" width="1" height="1"&gt;</description></item></channel></rss>