<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" 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:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>ASP.NET</title>
        <link>http://www.acmebinary.com/blog/category/12.aspx</link>
        <description>ASP.NET</description>
        <language>en-US</language>
        <copyright>Kent Sharkey</copyright>
        <managingEditor>kent@acmebinary.com</managingEditor>
        <generator>Subtext Version 2.0.0.43</generator>
        <item>
            <title>Channel you</title>
            <link>http://acmebinary.com/blog/archive/2008/08/18/channel-you.aspx</link>
            <description>Do you admire the interface/functionality of &lt;a href="http://on10.net"&gt;Channel10&lt;/a&gt;/&lt;a href="http://channel8.msdn.com"&gt;Channel8&lt;/a&gt;/&lt;a href="http://edge.technet.com"&gt;channel whatnot&lt;/a&gt;? Did you know that the source of those sites was available? I didn't (but should have, I think), but I noticed it today &lt;a href="http://codeplex.com/EvNet"&gt;on Codeplex&lt;/a&gt;.&lt;img src="http://acmebinary.com/blog/aggbug/313.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kent Sharkey</dc:creator>
            <guid>http://acmebinary.com/blog/archive/2008/08/18/channel-you.aspx</guid>
            <pubDate>Mon, 18 Aug 2008 22:45:38 GMT</pubDate>
            <wfw:comment>http://acmebinary.com/blog/comments/313.aspx</wfw:comment>
            <comments>http://acmebinary.com/blog/archive/2008/08/18/channel-you.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://acmebinary.com/blog/comments/commentRss/313.aspx</wfw:commentRss>
            <trackback:ping>http://acmebinary.com/blog/services/trackbacks/313.aspx</trackback:ping>
        </item>
        <item>
            <title>MVC coding in VB (part 416)</title>
            <link>http://acmebinary.com/blog/archive/2008/04/25/mvc-coding-in-vb-part-416.aspx</link>
            <description>The bits move on, and only the code keeps changing.&lt;br /&gt;
&lt;br /&gt;
My complaints in the &lt;a href="http://acmebinary.com/blog/archive/2008/04/17/mvc-coding-in-vb.aspx"&gt;last post &lt;/a&gt;are no longer valid. As of the &lt;a href="http://www.codeplex.com/aspnet/Wiki/View.aspx?title=ReadMe&amp;amp;referringTitle=Home"&gt;4/16 release&lt;/a&gt; of the MVC framework, VB no longer has that weird behaviour. Now, all action methods must return an ActionResult, so they become functions in both VB and C#.&lt;br /&gt;
&lt;br /&gt;
Of course, you already knew that because you're not behind on your reading, and you've already read &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/04/16/asp-net-mvc-source-refresh-preview.aspx"&gt;ScottGu's post on this&lt;/a&gt;. I just read blogs for a living (partly), unfortunately the posts I want to read oftimes get pushed back because of it.&lt;img src="http://acmebinary.com/blog/aggbug/305.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kent Sharkey</dc:creator>
            <guid>http://acmebinary.com/blog/archive/2008/04/25/mvc-coding-in-vb-part-416.aspx</guid>
            <pubDate>Sat, 26 Apr 2008 01:37:09 GMT</pubDate>
            <comments>http://acmebinary.com/blog/archive/2008/04/25/mvc-coding-in-vb-part-416.aspx#feedback</comments>
            <wfw:commentRss>http://acmebinary.com/blog/comments/commentRss/305.aspx</wfw:commentRss>
            <trackback:ping>http://acmebinary.com/blog/services/trackbacks/305.aspx</trackback:ping>
        </item>
        <item>
            <title>MVC coding in VB</title>
            <link>http://acmebinary.com/blog/archive/2008/04/17/mvc-coding-in-vb.aspx</link>
            <description>Don't ask why, but I decided to try to use the porridge that was "just right" in VB while trying to create a site using the new &lt;a href="http://www.asp.net/mvc"&gt;ASP.NET MVC framework&lt;/a&gt;. As I will no doubt forget the syntax to use in about 42 seconds, I'm including it here. Others may find it useful as well.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;ActionLinks&lt;/span&gt;:&lt;br /&gt;
&lt;pre&gt;&amp;lt;%=Html.ActionLink(Of ViewEngines.CategoryController) _&lt;br /&gt;    (Function(c As ViewEngines.CategoryController) c.Add(), _&lt;br /&gt;    "Add Category")%&amp;gt;&lt;/pre&gt;
&lt;span style="font-weight: bold;"&gt;Form definition&lt;/span&gt;:&lt;br /&gt;
&lt;pre&gt;&amp;lt;%  Using Html.Form(Of ViewEngines.CategoryController) _&lt;br /&gt;    (Function(c As ViewEngines.CategoryController) c.Update(ViewData.CategoryID), _&lt;br /&gt;    FormMethod.Post)%&amp;gt;&lt;/pre&gt;
The &lt;span style="font-family: Courier New;"&gt;Function(c as ViewEngines.CategoryController) c.blah&lt;/span&gt; syntax is the equivalent syntax to the shorter, more symbolrific C# syntax: &lt;span style="font-family: Courier New;"&gt;c =&amp;gt; c.Add()&lt;/span&gt;. &lt;br /&gt;
&lt;br /&gt;
That was still giving me an error. What I found (see below) was that the &lt;span style="font-style: italic;"&gt;trick &lt;/span&gt;seems to be to change your methods into functions (instead of the Subs that I was using), and it would work:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;    Public &lt;span style="font-weight: bold;"&gt;&lt;span style="background-color: rgb(255, 255, 153);"&gt;Function&lt;/span&gt; &lt;/span&gt;Update(ByVal id As Integer) &lt;span style="font-weight: bold; background-color: rgb(255, 255, 153);"&gt;As Object&lt;/span&gt;&lt;br /&gt;        Dim c As New Category()&lt;br /&gt;        c.LoadByKey(id)&lt;br /&gt;        c.LoadFromPost()&lt;br /&gt;        c.Save()&lt;br /&gt;        RedirectToAction("List")&lt;br /&gt;        &lt;span style="font-weight: bold; background-color: rgb(255, 255, 153);"&gt;Return Nothing&lt;/span&gt;&lt;br /&gt;    End Function&lt;/pre&gt;
&lt;br /&gt;
Now someone can please tell me I'm wrong, and there is a simpler solution. Barring that, I think I might stick with using the "&lt;a href="http://graysmatter.codivation.com/ChangesFromMicrosoftMVCPreview1ToPreview2PartB.aspx"&gt;less correct&lt;/a&gt;" versions of the calls (or, more likely, using C# for all my MVC sites)&lt;br /&gt;
&lt;br /&gt;
(Special thanks to Chuwanga on the asp.net forums for the &lt;a href="http://forums.asp.net/p/1243363/2277569.aspx"&gt;original solution&lt;/a&gt;. I wouldn't have figured out that last step)&lt;img src="http://acmebinary.com/blog/aggbug/304.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kent Sharkey</dc:creator>
            <guid>http://acmebinary.com/blog/archive/2008/04/17/mvc-coding-in-vb.aspx</guid>
            <pubDate>Thu, 17 Apr 2008 20:46:20 GMT</pubDate>
            <comments>http://acmebinary.com/blog/archive/2008/04/17/mvc-coding-in-vb.aspx#feedback</comments>
            <wfw:commentRss>http://acmebinary.com/blog/comments/commentRss/304.aspx</wfw:commentRss>
            <trackback:ping>http://acmebinary.com/blog/services/trackbacks/304.aspx</trackback:ping>
        </item>
        <item>
            <title>Part 2 of 2 on SubSonic</title>
            <link>http://acmebinary.com/blog/archive/2008/01/28/part-2-of-2-on-subsonic.aspx</link>
            <description>I see that my &lt;a href="http://dotnetslackers.com/articles/aspnet/UsingSubSonicToCreateASimpleBogEngine.aspx"&gt;second&lt;/a&gt; (and for now at least final) &lt;a href="http://dotnetslackers.com/articles/aspnet/UsingSubSonicToCreateASimpleBogEngine.aspx"&gt;article&lt;/a&gt; on &lt;a href="http://www.codeplex.com/subsonic"&gt;SubSonic&lt;/a&gt; is up on &lt;a href="http://dotnetslackers.com/"&gt;DotNetSlackers&lt;/a&gt;. Hopefully someone will find it useful and informative. This one is intended to be more practical than the overview I did last time. It builds out some of the functions of a blog engine using SubSonic queries and controls. &lt;br /&gt;
&lt;br /&gt;
Thanks again to &lt;a href="http://dotnetslackers.com/community/blogs/sonukapoor/"&gt;Sonu&lt;/a&gt;, &lt;a href="http://codebetter.com/blogs/karlseguin/default.aspx"&gt;Karl&lt;/a&gt; and the rest of the DNS team.&lt;img src="http://acmebinary.com/blog/aggbug/299.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kent Sharkey</dc:creator>
            <guid>http://acmebinary.com/blog/archive/2008/01/28/part-2-of-2-on-subsonic.aspx</guid>
            <pubDate>Tue, 29 Jan 2008 07:05:39 GMT</pubDate>
            <comments>http://acmebinary.com/blog/archive/2008/01/28/part-2-of-2-on-subsonic.aspx#feedback</comments>
            <wfw:commentRss>http://acmebinary.com/blog/comments/commentRss/299.aspx</wfw:commentRss>
            <trackback:ping>http://acmebinary.com/blog/services/trackbacks/299.aspx</trackback:ping>
        </item>
        <item>
            <title>SubSonic article on DotNetSlackers</title>
            <link>http://acmebinary.com/blog/archive/2007/12/28/subsonic-article-on-dotnetslackers.aspx</link>
            <description>Thanks to &lt;a href="http://dotnetslackers.com/community/blogs/sonukapoor/"&gt;Sonu&lt;/a&gt; (and &lt;a href="http://codebetter.com/blogs/karlseguin/"&gt;Karl&lt;/a&gt;, and the rest of the DNS team), my (first) &lt;a href="http://dotnetslackers.com/articles/aspnet/IntroductionToSubSonic.aspx"&gt;article on SubSonic&lt;/a&gt; is now up on &lt;a href="http://dotnetslackers.com/"&gt;DotNetSlackers&lt;/a&gt;. This one is intended to be an introduction, and I'll hope to continue professing my platonic admiration for said framework in the new year.&lt;img src="http://acmebinary.com/blog/aggbug/292.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kent Sharkey</dc:creator>
            <guid>http://acmebinary.com/blog/archive/2007/12/28/subsonic-article-on-dotnetslackers.aspx</guid>
            <pubDate>Fri, 28 Dec 2007 18:42:58 GMT</pubDate>
            <comments>http://acmebinary.com/blog/archive/2007/12/28/subsonic-article-on-dotnetslackers.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://acmebinary.com/blog/comments/commentRss/292.aspx</wfw:commentRss>
            <trackback:ping>http://acmebinary.com/blog/services/trackbacks/292.aspx</trackback:ping>
        </item>
        <item>
            <title>(Google) Charting my way</title>
            <link>http://acmebinary.com/blog/archive/2007/12/06/google-charting-my-way.aspx</link>
            <description>I see that Google has yet another new API, this time for &lt;a href="http://google-code-updates.blogspot.com/2007/12/embed-charts-in-webpages-with-one-of.html"&gt;plotting charts&lt;/a&gt;. So, let's take some of the ultra-secret data from my &lt;a href="http://www.slimtimer.com/"&gt;time tracker of choice&lt;/a&gt;, and see what it produces:  &lt;img src="http://chart.apis.google.com/chart?cht=p3&amp;amp;chd=s:LILDEE3OG&amp;amp;chs=250x100&amp;amp;chl=Admin|CompA|Break|CompC|Internal|Lost%20time|CompM|WoW|Writing&amp;amp;chco=ff0000,2C327C,00ff00,FF9900,e2e2e2,000000,0000ff,480D06,c0c0c0" /&gt;&lt;br /&gt;
&lt;br /&gt;
Source URL (&lt;a href="http://chart.apis.google.com/chart?cht=p3&amp;amp;chd=s:LILDEE3OG&amp;amp;chs=250x100&amp;amp;chl=Admin|CompA|Break|CompC|Internal|Lost%20time|CompM|WoW|Writing&amp;amp;chco=ff0000,2C327C,00ff00,FF9900,e2e2e2,000000,0000ff,480D06,c0c0c0"&gt;on one line&lt;/a&gt;):&lt;br /&gt;
&lt;pre&gt;http://chart.apis.google.com/chart?cht=p3&lt;br /&gt;  &amp;amp;chd=s:LILDEE3OG&lt;br /&gt;  &amp;amp;chs=250x100&lt;br /&gt;  &amp;amp;chl=Admin|CompA|Break|CompC|Internal|Lost%20time|CompM|WoW|Writing&lt;br /&gt;  &amp;amp;chco=ff0000,2C327C,00ff00,FF9900,e2e2e2,000000,0000ff,480D06,c0c0c0&lt;/pre&gt;
&lt;br /&gt;
The &lt;a href="http://code.google.com/apis/chart/"&gt;parameters &lt;/a&gt;are cht=chart type, chd=data (in an unusual format, IMO), chs=size, chl=labels and chco=colours.&lt;br /&gt;
&lt;br /&gt;
Now to figure out a use for it...&lt;img src="http://acmebinary.com/blog/aggbug/290.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kent Sharkey</dc:creator>
            <guid>http://acmebinary.com/blog/archive/2007/12/06/google-charting-my-way.aspx</guid>
            <pubDate>Thu, 06 Dec 2007 22:03:38 GMT</pubDate>
            <comments>http://acmebinary.com/blog/archive/2007/12/06/google-charting-my-way.aspx#feedback</comments>
            <wfw:commentRss>http://acmebinary.com/blog/comments/commentRss/290.aspx</wfw:commentRss>
            <trackback:ping>http://acmebinary.com/blog/services/trackbacks/290.aspx</trackback:ping>
        </item>
        <item>
            <title>Mental note - IE and table row (TR) styles</title>
            <link>http://acmebinary.com/blog/archive/2007/12/03/mental-note---ie-and-table-row-tr-styles.aspx</link>
            <description>I was working on a site (that shall remain nameless), and one of the goals was to have a nice background for one of the rows in the layout table. (&lt;span style="font-style: italic;"&gt;yes&lt;/span&gt;. moving on.) I naively did this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;lt;tr class="fancyBackground"&amp;gt;&amp;lt;td...&lt;/pre&gt;
Where:&lt;br /&gt;
&lt;pre&gt;.fancyBackground { background-image:url('url-to-image.png');background-repeat:no-repeat;}&lt;/pre&gt;
&lt;br /&gt;
Unfortunately, IE interpreted it as though I had asked:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;lt;tr&amp;gt;&amp;lt;td class="fancyBackground"&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;    &amp;lt;td class="fancyBackgound"&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;    &amp;lt;td class="fancyBackgound"&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
Meaning that the background restarted with each new cell. Kent (and moreso Customer) not happy. The fix I used:&lt;br /&gt;
&lt;pre&gt;&amp;lt;tr&amp;gt;&amp;lt;td class="fancyBackgoundNaughty"&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;    &amp;lt;td class="fancyBackgoundInternet"&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;    &amp;lt;td class="fancyBackgoundExplorer"&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;pre&gt;.fancyBackgoundNaughty{background-image:url('url-to-image.png');background-repeat:no-repeat;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;background-position: 0px 0px; width:135px;&lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;.fancyBackgoundInternet {background-image:url('url-to-image.png');background-repeat:no-repeat;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;background-position: -135px 0px; width:350px;&lt;/span&gt;}&lt;/pre&gt;
&lt;pre&gt;.fancyBackgoundExplorer {background-image:url('url-to-image.png');background-repeat:no-repeat;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;background-position: -485px 0px; &lt;/span&gt;}&lt;/pre&gt;
&lt;br /&gt;
Now you can all tell me how to do it 'correctly'. (I see at least one fix I coulda-shoulda-may do, but I still feel the same way about that browser. (And where's the IE8 CTP?)&lt;img src="http://acmebinary.com/blog/aggbug/288.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kent Sharkey</dc:creator>
            <guid>http://acmebinary.com/blog/archive/2007/12/03/mental-note---ie-and-table-row-tr-styles.aspx</guid>
            <pubDate>Mon, 03 Dec 2007 21:25:07 GMT</pubDate>
            <comments>http://acmebinary.com/blog/archive/2007/12/03/mental-note---ie-and-table-row-tr-styles.aspx#feedback</comments>
            <wfw:commentRss>http://acmebinary.com/blog/comments/commentRss/288.aspx</wfw:commentRss>
            <trackback:ping>http://acmebinary.com/blog/services/trackbacks/288.aspx</trackback:ping>
        </item>
        <item>
            <title>UG talk in "The Peg"</title>
            <link>http://acmebinary.com/blog/archive/2007/11/20/ug-talk-in-the-peg.aspx</link>
            <description>While all the cool kids are off in TO for "&lt;a href="http://www.theglobeandmail.com/servlet/story/LAC.20071120.TRUTH20/TPStory/TPSports/Television/"&gt;The Game&lt;/a&gt;", and the mondo-cool kids are heading to Vancouver for "&lt;a href="http://www.devteach.com/Index.aspx"&gt;The Teach&lt;/a&gt;", I find myself back once again in the Casa Nobura-Spafford in Winnipeg. What's the occasion? I'm actually going to be at the next iteration of the &lt;a href="http://dotnetwired.com/"&gt;Winnipeg .NET User Group&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold; font-style: italic;"&gt;Why&lt;/span&gt;? Someone asked. (Someone I can't say no to)&lt;br /&gt;
&lt;span style="font-style: italic; font-weight: bold;"&gt;When&lt;/span&gt;? Thursday, Nov 22nd (two days from now and counting)&lt;br /&gt;
&lt;span style="font-style: italic; font-weight: bold;"&gt;Where&lt;/span&gt;? 1700 Richardson Building  17th Floor, One Lombard Place (you know, the big old one)&lt;br /&gt;
&lt;span style="font-style: italic; font-weight: bold;"&gt;Who&lt;/span&gt;? Well, you already know that one (me -- duh)&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;What&lt;/span&gt;? The technology formerly known as SubSonic (&lt;a href="http://blog.wekeroad.com/2007/10/26/microsoft-subsonic-and-me/"&gt;soon to be known&lt;/a&gt; by its future Microsoft product name: Microsoft Convention-driven Toolset 2008 for the Microsoft MVC Framework System for Microsoft ASP.NET (tm))&lt;br /&gt;
&lt;br /&gt;
Here's a clip from the official announcement. I really must have been drinking hard lately -- I cannot for the life of me figure out where that bio came from. I really have to meet that guy someday...&lt;br /&gt;
&lt;br /&gt;
&lt;p align="center"&gt;&lt;strong&gt;Kent Sharkey of Apptius Computer Solutions 							&lt;br /&gt;
&lt;/strong&gt;presents&lt;br /&gt;
&lt;a onclick="return top.js.OpenExtLink(window,event,this)" target="_blank" href="http://www.subsonicproject.com/"&gt;&lt;strong&gt;Subsonic&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; 							- &lt;em&gt;a toolset that helps a website build itself&lt;/em&gt;&lt;/strong&gt; 					&lt;/p&gt;
&lt;p&gt;Don't create data access layers because they're too much work, or are you just  						tired of writing the same code over and over again? 					&lt;/p&gt;
&lt;p&gt;See how Subsonic ("The Zero Code DAL") can help you plug your data into your  						applications easier than ever before, without burying yourself in angle  						brackets. 					&lt;/p&gt;
&lt;p&gt;The talk will show how/where Subsonic fits in your application, common (and a  						few uncommon) uses, and how it compares to a few competing products. 					&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;strong&gt;Kent Sharkey &lt;/strong&gt;is an MCSD, MCSE, MCT, and MCP+SB. He is currently  						working at Apptius, and has previously worked at Microsoft as a Technical  						Evangelist within their Developer Relations Group. Before joining Microsoft,  						Kent had built up many years experience as a trainer and consultant,  						concentrating on architecting and writing n-tier applications using Visual  						Basic. He has written and collaborated on a number of books on Visual Basic,  						including MCSD Fast Track: Visual Basic Exam 70 -17, MCSD Fast Track: Visual  						Basic Exam 70 -176, MCSD Fast Track 4 in 1, and Beginning Visual Basic 6.0  						Application Development. He is a regular speaker at various developer  						conferences focused on Microsoft development. 					&lt;/p&gt;&lt;img src="http://acmebinary.com/blog/aggbug/287.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kent Sharkey</dc:creator>
            <guid>http://acmebinary.com/blog/archive/2007/11/20/ug-talk-in-the-peg.aspx</guid>
            <pubDate>Wed, 21 Nov 2007 04:55:51 GMT</pubDate>
            <comments>http://acmebinary.com/blog/archive/2007/11/20/ug-talk-in-the-peg.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://acmebinary.com/blog/comments/commentRss/287.aspx</wfw:commentRss>
            <trackback:ping>http://acmebinary.com/blog/services/trackbacks/287.aspx</trackback:ping>
        </item>
        <item>
            <title>Securing Web.config</title>
            <link>http://acmebinary.com/blog/archive/2007/08/20/securing-web.config.aspx</link>
            <description>One worry that many have is the information in the web.config file, especially items you might have in your appSettings and/or connectionString sections. It might be older news to some, but you can lock down sections to feel a little safer. (I knew there was something there, but I hadn't researched the code until last week, so it was new for me)&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt; Locking a section:&lt;/h4&gt;
Configuration config = WebConfigurationManager.OpenWebConfiguration("/");&lt;br /&gt;
ConfigurationSection sect = config.GetSection("appSettings");&lt;br /&gt;
if (!sect.SectionInformation.IsProtected) {&lt;br /&gt;
    sect.SectionInformation.ProtectSection("RsaProtectedConfigurationProvider");&lt;br /&gt;
    config.Save();&lt;br /&gt;
}&lt;br /&gt;
&lt;h4&gt; Unlocking a section:&lt;/h4&gt;
&lt;pre&gt;Configuration config = WebConfigurationManager.OpenWebConfiguration("/");&lt;br /&gt;ConfigurationSection sect = config.GetSection("appSettings");&lt;br /&gt;if (sect.SectionInformation.IsProtected) {&lt;br /&gt;    sect.SectionInformation.UnprotectSection();&lt;br /&gt;    config.Save();&lt;br /&gt;}&lt;/pre&gt;
The appSettings section is then encrypted with all the joy of XML Encryption.
&lt;h4&gt;Before:&lt;/h4&gt;
&lt;pre&gt;&amp;lt;appSettings&amp;gt;&lt;br /&gt;    &amp;lt;add key="someKey" value="someValue" /&amp;gt;&lt;br /&gt;    &amp;lt;add key="anotherKey" value="anotherValue" /&amp;gt;&lt;br /&gt;    &amp;lt;add key="secretStuff" value="Password=password" /&amp;gt;&lt;br /&gt;&amp;lt;/appSettings&amp;gt;&lt;/pre&gt;
&lt;h4&gt;After:&lt;/h4&gt;
&lt;pre&gt;&amp;lt;appSettings configProtectionProvider="RsaProtectedConfigurationProvider"&amp;gt;&lt;br /&gt;    &amp;lt;EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element"&lt;br /&gt;        xmlns="http://www.w3.org/2001/04/xmlenc#"&amp;gt;&lt;br /&gt;        &amp;lt;EncryptionMethod &lt;br /&gt;           Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" /&amp;gt;&lt;br /&gt;        &amp;lt;KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&lt;br /&gt;            &amp;lt;EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#"&amp;gt;&lt;br /&gt;                &amp;lt;EncryptionMethod &lt;br /&gt;                  Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" /&amp;gt;&lt;br /&gt;                &amp;lt;KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&lt;br /&gt;                    &amp;lt;KeyName&amp;gt;Rsa Key&amp;lt;/KeyName&amp;gt;&lt;br /&gt;                &amp;lt;/KeyInfo&amp;gt;&lt;br /&gt;                &amp;lt;CipherData&amp;gt;&lt;br /&gt;                    &amp;lt;CipherValue&amp;gt;c4Tk3Jvl2FFj etc.&amp;lt;/CipherValue&amp;gt;&lt;br /&gt;                &amp;lt;/CipherData&amp;gt;&lt;br /&gt;            &amp;lt;/EncryptedKey&amp;gt;&lt;br /&gt;        &amp;lt;/KeyInfo&amp;gt;&lt;br /&gt;        &amp;lt;CipherData&amp;gt;&lt;br /&gt;            &amp;lt;CipherValue&amp;gt;xI9gWzS9nOcD/blDgUPX you get the idea&amp;lt;/CipherValue&amp;gt;&lt;br /&gt;        &amp;lt;/CipherData&amp;gt;&lt;br /&gt;    &amp;lt;/EncryptedData&amp;gt;&lt;br /&gt;&amp;lt;/appSettings&amp;gt;&lt;/pre&gt;
Even better is the fact that you can use the ConfigurationManager.AppSettings to read the encrypted values without a problem (so you don't have to keep flipping it back and forth, restarting your process). You can also use aspnet_regiis to encrypt the section, but this seemed like more fun.&lt;img src="http://acmebinary.com/blog/aggbug/275.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kent Sharkey</dc:creator>
            <guid>http://acmebinary.com/blog/archive/2007/08/20/securing-web.config.aspx</guid>
            <pubDate>Mon, 20 Aug 2007 18:52:17 GMT</pubDate>
            <comments>http://acmebinary.com/blog/archive/2007/08/20/securing-web.config.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://acmebinary.com/blog/comments/commentRss/275.aspx</wfw:commentRss>
            <trackback:ping>http://acmebinary.com/blog/services/trackbacks/275.aspx</trackback:ping>
        </item>
        <item>
            <title>Why slow? Get YSlow</title>
            <link>http://acmebinary.com/blog/archive/2007/07/27/why-slow-get-yslow.aspx</link>
            <description>Web pages are funny things. They *seem* like they're standalone thingies hiding behind URLs, but they're actually a mess of possibly multiple requests that are rendered independently. It's a wonder they work at all some times. Making them work fast shouldn't be rocket surgery, but with so many slow sites out there, I guess it is. Yahoo has released a tool to help you identify areas that need improvement. The new tool is &lt;a href="http://developer.yahoo.com/yslow/"&gt;YSlow&lt;/a&gt;. It's a plugin for the incredible Firefox plugin &lt;a href="http://www.getfirebug.com"&gt;Firebug&lt;/a&gt;. Running YSlow on a site gives you reports on the individual objects that make up your Web page, and suggestions for areas of improvement (along with a grade for the page). As the suggestions are based on their "&lt;a href="http://developer.yahoo.com/performance/rules.html"&gt;Thirteen simple rules for speeding up your Web sites&lt;/a&gt;" and targeted at large sites, not all suggestions are appropriate for all sites. Still, there are some areas that will definitely help, providing low hanging fruit for fixes.&lt;br /&gt;
&lt;br /&gt;
Here's a sample of the output (for this site):&lt;br /&gt;
&lt;img width="392" height="645" alt="YSlow report" src="/images/acmebinary_com/blog/7/o_yslowreport.png" /&gt;&lt;br /&gt;
It does look like the Subtext folk have some room to increase perf (or I do as it's open source), but there are some excellent items in the report: Look at the extent to which they're using the browser cache. Of course, it's not like I have enough useful content that all of the items from the site might already be loaded in your cache, but that's not the point (I guess what I'm saying is well done guys).&lt;img src="http://acmebinary.com/blog/aggbug/274.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kent Sharkey</dc:creator>
            <guid>http://acmebinary.com/blog/archive/2007/07/27/why-slow-get-yslow.aspx</guid>
            <pubDate>Fri, 27 Jul 2007 23:48:46 GMT</pubDate>
            <comments>http://acmebinary.com/blog/archive/2007/07/27/why-slow-get-yslow.aspx#feedback</comments>
            <wfw:commentRss>http://acmebinary.com/blog/comments/commentRss/274.aspx</wfw:commentRss>
            <trackback:ping>http://acmebinary.com/blog/services/trackbacks/274.aspx</trackback:ping>
        </item>
    </channel>
</rss>