<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" 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:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>.NET slave</title>
    <description>Full featured simplicity in C# and ASP.NET by Mads Kristensen</description>
    <link>http://madskristensen.net/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.5.1.7</generator>
    <language>en-GB</language>
    <blogChannel:blogRoll>http://madskristensen.net/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://www.dotnetblogengine.net/syndication.axd</blogChannel:blink>
    <dc:creator>Mads Kristensen</dc:creator>
    <dc:title>.NET slave</dc:title>
    <geo:lat>5,568,969.000000</geo:lat>
    <geo:long>1,257,128.000000</geo:long>
    <image><link>http://blog.madskristensen.dk/</link><url>http://blog.madskristensen.dk/themes/standard/madskristensen.png</url><title>.NET slave</title></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/netSlave" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <title>Get last-modified header from response in ASP.NET</title>
      <description>&lt;p&gt;I&amp;rsquo;ve been working lately with some ASP.NET performance optimization automation HTTP modules. In one of them I needed to know if the last-modified header had been set through the &lt;em&gt;Response.Cache.SetLastModified(DateTime)&lt;/em&gt; method. For some reason, there is no API available anywhere within the BCL to retrieve the last modified date of a response &amp;ndash; you can only set it.&lt;/p&gt;
&lt;p&gt;Since the module wouldn&amp;rsquo;t work without a way to read the last modified date of the response, I had to use &lt;a href="http://www.red-gate.com/products/reflector/"&gt;Reflector&lt;/a&gt; to figure out how to pull the information out using reflection. The result became a simple little method to retrieve the date. It looks like this:&lt;/p&gt;
&lt;div style="font-family: Courier New; background: white; color: black; font-size: 10pt;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;DateTime&lt;/span&gt; ReadLastModifiedFromResponse(&lt;span style="color: #2b91af;"&gt;HttpCachePolicy&lt;/span&gt; cache)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;{&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp; &lt;span style="color: #2b91af;"&gt;BindingFlags&lt;/span&gt; flags = &lt;span style="color: #2b91af;"&gt;BindingFlags&lt;/span&gt;.NonPublic | &lt;span style="color: #2b91af;"&gt;BindingFlags&lt;/span&gt;.GetField | &lt;span style="color: #2b91af;"&gt;BindingFlags&lt;/span&gt;.Instance;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp; &lt;span style="color: blue;"&gt;return&lt;/span&gt; (&lt;span style="color: #2b91af;"&gt;DateTime&lt;/span&gt;)cache.GetType().GetField(&lt;span style="color: #a31515;"&gt;"_utcLastModified"&lt;/span&gt;, flags).GetValue(cache);&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;}&lt;/p&gt;
&lt;/div&gt;
&lt;!--EndFragment--&gt;
&lt;p&gt;And you can use it like this:&lt;/p&gt;
&lt;div style="font-family: Courier New; background: white; color: black; font-size: 10pt;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;DateTime&lt;/span&gt; responseModified = ReadLastModifiedFromResponse(Response.Cache);&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (responseModified &amp;gt; &lt;span style="color: #2b91af;"&gt;DateTime&lt;/span&gt;.MinValue)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;{&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp; &lt;span style="color: green;"&gt;// Last-modified is set. Do something...&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;}&lt;/p&gt;
&lt;/div&gt;
&lt;!--EndFragment--&gt;
&lt;p&gt;If you know of another way to retrieving the last-modified date, please let me know.&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/h7reZlrZVv8/post.aspx</link>
      <author>Mads Kristensen</author>
      <comments>http://madskristensen.net/post/Get-last-modified-header-from-response-in-ASPNET.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=d80a9d4d-f977-4693-a70a-bcb766fc2b74</guid>
      <pubDate>Thu, 21 May 2009 12:30:00 -0400</pubDate>
      <category>ASP.NET</category>
      <category>Tips and tricks</category>
      <dc:publisher>Mads Kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=d80a9d4d-f977-4693-a70a-bcb766fc2b74</pingback:target>
      <slash:comments>11</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=d80a9d4d-f977-4693-a70a-bcb766fc2b74</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/Get-last-modified-header-from-response-in-ASPNET.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=d80a9d4d-f977-4693-a70a-bcb766fc2b74</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=d80a9d4d-f977-4693-a70a-bcb766fc2b74</feedburner:origLink></item>
    <item>
      <title>ASP.NET developer categories</title>
      <description>&lt;p&gt;In the past 6 months I’ve been involved in hiring a lot of ASP.NET developers. It was very interesting to learn just how different skill sets ASP.NET developers have. It also made it more and more clear that every developer we talked to would fit into one of three categories: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The web developer &lt;/li&gt;    &lt;li&gt;The developer who build websites &lt;/li&gt;    &lt;li&gt;The ASP.NET super hero &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Before looking deeper into the different categories I recommend you too check out &lt;a href="http://madskristensen.net/post/ASPNET-is-a-database-framework.aspx"&gt;how I define the ASP.NET framework&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;The developer categories&lt;/h2&gt;  &lt;p&gt;With the ASP.NET definition in place it is now easier to look at the different categories of ASP.NET developers we have interviewed.&lt;/p&gt;  &lt;h3&gt;The web developer&lt;/h3&gt;  &lt;p&gt;Not many ASP.NET developers fall into this category. It’s usually the ones that come from classic ASP or PHP and made the switch to ASP.NET later on. They know everything about browser compatibility, JavaScript, CSS and the request life cycle. Also, they are usually not that hardcore in C# because they have mostly worked with client technologies. They are also more agnostic to the server-side platform and can work on PHP and RoR projects just as efficiently.&lt;/p&gt;  &lt;p&gt;The web developer is also the kind of guy who thinks about new web technologies such as &lt;a href="http://microformats.org"&gt;microformats&lt;/a&gt; and &lt;a href="http://openid.net"&gt;OpenID&lt;/a&gt;. This guy lives and breathes web.&lt;/p&gt;  &lt;h3&gt;The developer who builds websites&lt;/h3&gt;  &lt;p&gt;This is by far the biggest category. We’ve interviewed many developers who have worked with ASP.NET since it was first released. They have worked with everything from the database, data- and business logic, web services and ASP.NET. Most of them don’t care much for browser capabilities or JavaScript but they are hardcore C# developers. They have built many ASP.NET sites, but they are far from experts on the framework and stuff like modules and handlers are not where they have spent most of their time to say the least.&lt;/p&gt;  &lt;p&gt;Their knowledge of the .NET framework, BCL and C# is immense, but they don’t qualify as web developers. They don’t live and breathe web, but their skills are just as needed in an ASP.NET project.&lt;/p&gt;  &lt;p&gt;Take a web developer and a developer who build websites and put them in a room at the Romance Inn and wait 9 months. Then you get: &lt;/p&gt;  &lt;h3&gt;The ASP.NET super hero&lt;/h3&gt;  &lt;p&gt;This breed of developers is very difficult to get your hands on. They are a special race of individuals who know all about the ASP.NET framework and client-side technologies and are just as proficient in the more hardcore C# disciplines as well. ASP.NET is a very broad and diverse area because it is the point where the BCL, C#, XHTML, CSS, JavaScript, dependency injection, unit testing, mocking, AJAX etc. all come together in one project. To master all these disciplines takes an ASP.NET super hero.&lt;/p&gt;  &lt;p&gt;The web developer and the developer who builds websites are both very important to a successful execution of a website project, but at least one ASP.NET super hero is essential in my opinion.&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/EgWv5VYs908/post.aspx</link>
      <author>Mads Kristensen</author>
      <comments>http://madskristensen.net/post/ASPNET-developer-categories.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=a71778ee-ea52-41ba-b3e3-0ce093b3284f</guid>
      <pubDate>Sun, 19 Apr 2009 15:51:43 -0400</pubDate>
      <category>ASP.NET</category>
      <category>Random thoughts</category>
      <dc:publisher>Mads Kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=a71778ee-ea52-41ba-b3e3-0ce093b3284f</pingback:target>
      <slash:comments>18</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=a71778ee-ea52-41ba-b3e3-0ce093b3284f</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/ASPNET-developer-categories.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=a71778ee-ea52-41ba-b3e3-0ce093b3284f</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=a71778ee-ea52-41ba-b3e3-0ce093b3284f</feedburner:origLink></item>
    <item>
      <title>ASP.NET is a database framework</title>
      <description>&lt;p&gt;I have a very clear view on what ASP.NET is and what it isn’t. I’ve never given it much thought until recently when I learned that my view was different from a lot of other ASP.NET developers’. It started at an ASP.NET session at the MVP summit where a presenter asked whether or not people in the audience used the Entity Framework or Linq2Sql. I thought to myself that data access had absolutely nothing to do with ASP.NET but found to my surprise I was the only one finding it a weird question at an ASP.NET session.&lt;/p&gt;  &lt;p&gt;Since that session I started talking to people about this and almost everyone told me that a website without some sort of database is a thing of the past and that being an ASP.NET developer involved mastering databases, data access and business logic. I don’t disagree that mastering these disciplines is a huge part of being a .NET developer, but I still refused that it had anything to do with ASP.NET. Yes, I’m that anal.&lt;/p&gt;  &lt;h2&gt;The field trip&lt;/h2&gt;  &lt;p&gt;So, I went to Barnes &amp;amp; Noble to find some ASP.NET books. They had 8 different titles and I started to look at the table of contents in all of them. 7 out of the 8 ASP.NET books had minimum one chapter about databases and data access. I looked at the covers again and was reassured that I was indeed skimming ASP.NET books. Not data access books, but ASP.NET books. &lt;/p&gt;  &lt;p&gt;What I have learned in the past few months is that databases and data access is part of ASP.NET. Or in other words, ASP.NET is a database presentation framework and NOT a web application framework. Not acceptable!&lt;/p&gt;  &lt;p&gt;Here is my view on what ASP.NET is and what it isn’t. &lt;/p&gt;  &lt;h2&gt;My clear view of ASP.NET&lt;/h2&gt;  &lt;p&gt;ASP.NET is a framework for creating dynamic websites. It is not a framework for doing data access, business logic or any other thing besides building websites. If your business logic knows it is being used by an ASP.NET project by relying on an HttpContext for instance, then you are doing something wrong. Business logic is an API for what ever (presentation) logic that sits on top of it whether it being ASP.NET, WinForms, WCF or something completely different. This is a rule of the &lt;a href="http://en.wikipedia.org/wiki/Multitier_architecture"&gt;N-tier application architecture&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Smaller web projects often have the business- and data logic classes in the App_Code folder within the web project itself. Those classes are physically part of the web project but logically they are separate from the ASP.NET logic and as such the same 3-tier architecture applies. But it is still not ASP.NET, it is just C# classes that physically lives inside the web project in Visual Studio.&lt;/p&gt;  &lt;p&gt;ASP.NET handles everything related to browser/server interactions and nothing more. Calling the database directly from your code-behind or controller action doesn’t make ADO.NET part of the ASP.NET framework. The presence of the BCL in both ASP.NET and the business logic makes it less transparent, but I hope you see my point.&lt;/p&gt;  &lt;p&gt;Even though the data- and business logic aspects are both related and important to ASP.NET developers, they are still not ASP.NET.&lt;/p&gt;  &lt;p&gt;This is my clear view on the &lt;strike&gt;ASP.NET&lt;/strike&gt; database presentation framework.&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/TT4g4G55iYA/post.aspx</link>
      <author>Mads Kristensen</author>
      <comments>http://madskristensen.net/post/ASPNET-is-a-database-framework.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=443f291e-9b57-41ea-94d0-3da8d0197c4b</guid>
      <pubDate>Sun, 19 Apr 2009 15:34:29 -0400</pubDate>
      <category>ASP.NET</category>
      <dc:publisher>Mads Kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=443f291e-9b57-41ea-94d0-3da8d0197c4b</pingback:target>
      <slash:comments>19</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=443f291e-9b57-41ea-94d0-3da8d0197c4b</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/ASPNET-is-a-database-framework.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=443f291e-9b57-41ea-94d0-3da8d0197c4b</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=443f291e-9b57-41ea-94d0-3da8d0197c4b</feedburner:origLink></item>
    <item>
      <title>BlogEngine.NET 1.5 final release</title>
      <description>&lt;p&gt;The BlogEngine.NET 1.5 final release is now available for &lt;a href="http://blogengine.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=26080"&gt;download at CodePlex&lt;/a&gt;. Since the RC1 was released a little more than a week ago, we have had some great feedback from the community - most of it positive, but there were also a few hiccups that needed to be fixed. The BlogEngine.NET team worked very hard on those fixes and I believe they were all taken care of properly.&lt;br /&gt;&lt;br /&gt;Our main concern was around deployment on different server setups. That was basically why we decided to make the release candidate this time. You could run IIS 7 in Classic or Integrated Pipeline Mode with various restrictions or you could run IIS 6 maybe even more restricted. We got all those issues fixed by the help of the community. Thank you all for that.&lt;/p&gt;
&lt;h2&gt;New stuff in version 1.5&lt;/h2&gt;
&lt;p&gt;&lt;br /&gt;There are many new features, tweaks and improvements including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Nested comments&lt;/li&gt;
&lt;li&gt;Superb Windows Live Writer integration (including tags)&lt;/li&gt;
&lt;li&gt;Latest TinyMCE text editor&lt;/li&gt;
&lt;li&gt;Mono 2.4 support that just works&lt;/li&gt;
&lt;li&gt;Doesn't screw with jQuery and Prototype anymore&lt;/li&gt;
&lt;li&gt;Better database support out of the box&lt;/li&gt;
&lt;li&gt;Higher performance&lt;/li&gt;
&lt;li&gt;...and of course a lot of general improvements, tweaks and bug fixes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br /&gt;All in all a very stable, high performing and versatile product.&lt;/p&gt;
&lt;h2&gt;Getting started&lt;/h2&gt;
&lt;p&gt;&lt;br /&gt;If you&amp;rsquo;re new to BlogEngine.NET or interested in upgrading then take a look at &lt;a href="http://www.nyveldt.com/blog/post/Installation-screencasts-for-BlogEngineNET-15.aspx"&gt;Al Nyveldt&amp;rsquo;s screencast&lt;/a&gt; that shows you how easy it is.&lt;/p&gt;
&lt;h2&gt;Performance tweak&lt;/h2&gt;
&lt;p&gt;&lt;br /&gt;If you are using IIS 7 and want to squeeze every little inch of performance out of your BlogEngine.NET 1.5 installation, then you need to tweak the web.config a bit. In the bottom you&amp;rsquo;ll notice some elements (&lt;em&gt;staticContent&lt;/em&gt; and &lt;em&gt;httpProtocol&lt;/em&gt;) that are commented out. The reason for this is that some hosting providers don&amp;rsquo;t allow them, so that&amp;rsquo;s why they are commented out by default. If you enable them you will get an YSlow score of 92.&lt;/p&gt;
&lt;h2&gt;BlogEngine.NEXT&lt;/h2&gt;
&lt;p&gt;&lt;br /&gt;The future of BlogEngine.NET looks bright and we have a lot of ideas we want to implement. At this point we haven&amp;rsquo;t updated our roadmap, but we will soon so you can see the good stuff we are planning for. &lt;br /&gt;&lt;br /&gt;Another point is that version 1.5 will probably be the last release supporting IIS 6 and .NET 2.0. We are not all clear on that, but personally I would like to only focus on IIS 7 and the upcoming IIS 7.5 because that will give us extra possibilities like extension-less URLs even on hosted environments.&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/lDxbe_rlmBM/post.aspx</link>
      <author>Mads Kristensen</author>
      <comments>http://madskristensen.net/post/BlogEngineNET-15-final-release.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=51b9b432-53ee-4137-9542-81ec5cd86e8c</guid>
      <pubDate>Mon, 13 Apr 2009 17:29:00 -0400</pubDate>
      <category>BlogEngine</category>
      <dc:publisher>Mads Kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=51b9b432-53ee-4137-9542-81ec5cd86e8c</pingback:target>
      <slash:comments>35</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=51b9b432-53ee-4137-9542-81ec5cd86e8c</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/BlogEngineNET-15-final-release.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=51b9b432-53ee-4137-9542-81ec5cd86e8c</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=51b9b432-53ee-4137-9542-81ec5cd86e8c</feedburner:origLink></item>
    <item>
      <title>Add support for iPhone in ASP.NET</title>
      <description>&lt;p&gt;When I was building the &lt;a href="http://ifjernsyn.dk"&gt;mobile TV guide&lt;/a&gt; I found that there are a couple of things needed to make the website look better on the iPhone and iPod. They both have some extra capabilities that is easy to utilize when you know how.&lt;/p&gt;
&lt;h2&gt;Zoom level&lt;/h2&gt;
&lt;p&gt;The first is the zoom level. By adding the meta-tag below, you can specify the viewport to fit perfectly with the iPhone/iPod. The meta-tag tells the Safari browser to zoom in to a specific level as specified. It was a trial and error process of finding the correct zoom level, but very easy as well.&lt;br /&gt;&lt;br /&gt;&amp;lt;meta name="viewport" content="width=280, user-scalable=yes" /&amp;gt;&lt;/p&gt;
&lt;h2&gt;Bookmark icon&lt;/h2&gt;
&lt;p&gt;Another tag tells Safari that when a website is bookmarked, it should use a specific icon to put on the dashboard of the iPhone or iPod. For some reason Apple invented a new link-tag for this instead of just supporting the favicon standard. The link-tag looks like this:&lt;br /&gt;&lt;br /&gt;&amp;lt;link rel="apple-touch-icon" href="favicon.ico" /&amp;gt;&lt;/p&gt;
&lt;h2&gt;Programmatically&lt;/h2&gt;
&lt;p&gt;Since the TV guide is made especially for mobile phones, it was important to keep the download size of the page as small as possible. That&amp;rsquo;s why I choose not to add these two tags by default, but only when the browser visiting the site was either an iPhone or iPod.&lt;br /&gt;&lt;br /&gt;To do that programmatically, I simple added this method to my master page:&lt;/p&gt;
&lt;div style="background: white none repeat scroll 0% 0%; font-family: Courier New; font-size: 10pt; color: black; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; AddIPhoneHeaderTags()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;{&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp; &lt;span style="color: blue;"&gt;string&lt;/span&gt; ua = Request.UserAgent;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (ua != &lt;span style="color: blue;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; (ua.Contains(&lt;span style="color: #a31515;"&gt;"iPhone"&lt;/span&gt;) || ua.Contains(&lt;span style="color: #a31515;"&gt;"iPod"&lt;/span&gt;)))&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp; {&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &lt;span style="color: #2b91af;"&gt;HtmlMeta&lt;/span&gt; meta = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;HtmlMeta&lt;/span&gt;();&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; meta.Name = &lt;span style="color: #a31515;"&gt;"viewport"&lt;/span&gt;;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; meta.Content = &lt;span style="color: #a31515;"&gt;"width=280, user-scalable=yes"&lt;/span&gt;;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; Page.Header.Controls.Add(meta);&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &lt;span style="color: #2b91af;"&gt;HtmlLink&lt;/span&gt; link = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;HtmlLink&lt;/span&gt;();&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; link.Attributes[&lt;span style="color: #a31515;"&gt;"rel"&lt;/span&gt;] = &lt;span style="color: #a31515;"&gt;"apple-touch-icon"&lt;/span&gt;;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; link.Href = &lt;span style="color: #a31515;"&gt;"favicon.ico"&lt;/span&gt;;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; Page.Header.Controls.Add(link);&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp; }&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;}&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;Of course, these two tags will work for all websites &amp;ndash; not just the ones made especially for mobile phones.&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/IrbsuL4Hv6E/post.aspx</link>
      <author>Mads Kristensen</author>
      <comments>http://madskristensen.net/post/Add-support-for-iPhone-in-ASPNET.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=e9d2e293-2c1d-49c7-8b3a-e930b892816b</guid>
      <pubDate>Sun, 12 Apr 2009 14:03:00 -0400</pubDate>
      <category>ASP.NET</category>
      <category>Tips and tricks</category>
      <dc:publisher>Mads Kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=e9d2e293-2c1d-49c7-8b3a-e930b892816b</pingback:target>
      <slash:comments>12</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=e9d2e293-2c1d-49c7-8b3a-e930b892816b</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/Add-support-for-iPhone-in-ASPNET.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=e9d2e293-2c1d-49c7-8b3a-e930b892816b</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=e9d2e293-2c1d-49c7-8b3a-e930b892816b</feedburner:origLink></item>
    <item>
      <title>BlogEngine.NET 1.5 release candidate</title>
      <description>&lt;p&gt;Yesterday evening, the BlogEngine.NET team released a release candidate of BlogEngine.NET 1.5. It is available for &lt;a href="http://blogengine.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=15966"&gt;download at CodePlex&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It is the first time we have&amp;nbsp;made a release candidate, so I hope as many as possible will play around with the bits and report any bugs or issues back to us. It has been tested by all the team members and no breaking bugs where found. However, there is always an edge case&amp;nbsp;scenario or server setup&amp;nbsp;you can't&amp;nbsp;account for.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogengine.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=15966"&gt;Try it out now!&lt;/a&gt;&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/X04dQDqj9es/post.aspx</link>
      <author>Mads Kristensen</author>
      <comments>http://madskristensen.net/post/BlogEngineNET-15-release-candidate.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=27eaa7a9-2feb-48ef-9f3c-067373435a6c</guid>
      <pubDate>Mon, 06 Apr 2009 05:06:00 -0400</pubDate>
      <category>BlogEngine</category>
      <dc:publisher>Mads Kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=27eaa7a9-2feb-48ef-9f3c-067373435a6c</pingback:target>
      <slash:comments>13</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=27eaa7a9-2feb-48ef-9f3c-067373435a6c</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/BlogEngineNET-15-release-candidate.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=27eaa7a9-2feb-48ef-9f3c-067373435a6c</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=27eaa7a9-2feb-48ef-9f3c-067373435a6c</feedburner:origLink></item>
    <item>
      <title>YSlow: Add expires header to images in IIS 7</title>
      <description>&lt;p&gt;I&amp;rsquo;ve been tweaking the performance of BlogEngine.NEXT today using my favorite tool: &lt;a href="http://developer.yahoo.com/yslow/"&gt;YSlow for FireBug&lt;/a&gt;. One of the things YSlow checks for is the &lt;em&gt;expires&lt;/em&gt; HTTP header for static content such as images, script files and style sheets. Since &lt;a href="http://dotnetblogengine.net"&gt;BlogEngine.NET&lt;/a&gt; has always used custom HTTP handlers for serving scripts and stylesheets, only the static images have been a problem.&lt;/p&gt;
&lt;h2&gt;The problem&lt;/h2&gt;
&lt;p&gt;The problem is that with images on hosted environments on IIS 6, it&amp;rsquo;s impossible to control the serving of them without redirecting them through an HTTP handler. That&amp;rsquo;s not a good idea for several reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It adds unnecessary overhead by going through the ASP.NET ISAPI&lt;/li&gt;
&lt;li&gt;You need to add custom code to handle the requests&lt;/li&gt;
&lt;li&gt;You need to change the URL from .gif to .gif.axd or similar&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here is what YSlow finds on my website that needs the expires header set to a far future date:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://madskristensen.net/image.axd?picture=2009%2f3%2fyslow_expires.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;As you can see, it is all my static images that lacks the &lt;em&gt;expires&lt;/em&gt; header.&lt;/p&gt;
&lt;h2&gt;The solution&lt;/h2&gt;
&lt;p&gt;If you run IIS 6 there is no good way of adding an &lt;em&gt;expires&lt;/em&gt; header to images unless you have control over the IIS. If your site is hosted then you probably have no control at all. If you are using IIS 7 however, you can very easily add the header in your web.config&amp;rsquo;s &lt;em&gt;system.webServer&lt;/em&gt; section like so:&lt;/p&gt;
&lt;p&gt;&amp;lt;staticContent&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;clientCache httpExpires="Sun, 29 Mar 2020 00:00:00 GMT" cacheControlMode="UseExpires" /&amp;gt;&lt;br /&gt;&amp;lt;/staticContent&amp;gt;&lt;/p&gt;
&lt;p&gt;What happens is that all static content will now have an &lt;em&gt;expires&lt;/em&gt; HTTP header set to the year 2020. Static content means anything that isn&amp;rsquo;t served through the ASP.NET engine such as images, script files and styles sheets. This is one of the very easy tricks that will increase the performance of your site as well as your YSlow score.&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/9GWDWHqf7So/post.aspx</link>
      <author>Mads Kristensen</author>
      <comments>http://madskristensen.net/post/Add-expires-header-for-images.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=7e6254f7-fcc4-488d-947e-9e944cfd7d40</guid>
      <pubDate>Sun, 29 Mar 2009 12:55:00 -0400</pubDate>
      <category>ASP.NET</category>
      <dc:publisher>Mads Kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=7e6254f7-fcc4-488d-947e-9e944cfd7d40</pingback:target>
      <slash:comments>8</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=7e6254f7-fcc4-488d-947e-9e944cfd7d40</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/Add-expires-header-for-images.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=7e6254f7-fcc4-488d-947e-9e944cfd7d40</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=7e6254f7-fcc4-488d-947e-9e944cfd7d40</feedburner:origLink></item>
    <item>
      <title>.NETworking dinner</title>
      <description>&lt;p&gt;We&amp;rsquo;ve had a tradition of doing geek dinners in Copenhagen for the past 2 years. It&amp;rsquo;s always very good fun and there&amp;rsquo;s a bunch of interesting .NET guys to chat with. However, it has always been very intimate and most of the people going have been there before.&lt;/p&gt;
&lt;p&gt;We need new blood and that&amp;rsquo;s why it&amp;rsquo;s time to take the geek dinner concept to the next level and the name is &lt;em&gt;.NETworking dinner&lt;/em&gt;. The basic concept remains the same but in a much larger scale. It&amp;rsquo;s still an informal dinner arrangement with free beer, but this time I&amp;rsquo;m aiming for at least 50 people. This is important from a networking perspective.&lt;/p&gt;
&lt;p&gt;The point is to meet a lot of new people in a relaxed atmosphere and talk about coding, business or just plain fun. Hopefully, that will help strengthen the Copenhagen .NET community and open up new opportunities.&lt;/p&gt;
&lt;p&gt;Since numbers are important, please tell your colleagues and friends about this event and &lt;a href="http://www.facebook.com/event.php?eid=60331197338"&gt;sign up to the event on Facebook&lt;/a&gt;. It&amp;rsquo;s Tuesday, April 21&lt;sup&gt;st&lt;/sup&gt; after normal work hours and it's free.&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/cgnmcQDD0fo/post.aspx</link>
      <author>Mads Kristensen</author>
      <comments>http://madskristensen.net/post/NETworking-dinner.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=c39ad6e4-5585-4748-972a-96f789c4be72</guid>
      <pubDate>Wed, 25 Mar 2009 20:04:00 -0400</pubDate>
      <category>Geek dinner</category>
      <dc:publisher>Mads Kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=c39ad6e4-5585-4748-972a-96f789c4be72</pingback:target>
      <slash:comments>4</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=c39ad6e4-5585-4748-972a-96f789c4be72</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/NETworking-dinner.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=c39ad6e4-5585-4748-972a-96f789c4be72</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=c39ad6e4-5585-4748-972a-96f789c4be72</feedburner:origLink></item>
    <item>
      <title>Off topic: The grand plan of 2009</title>
      <description>&lt;p&gt;I&amp;rsquo;ve been a little quiet on my blog lately. That is due to my grand plan for 2009 which was born as my New Year&amp;rsquo;s resolution. The original plan went like this:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;In average, I need to visit a new country I have never visited before, every month of 2009.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;That means 12 trips to a new destination for the entire year. I soon realized this was too ambitious, expensive and time consuming. I needed to adjust the plan to something more realistic and this is what I came up with:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;In average, I need to visit a new country that I may have visited before, every month of 2009.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So, still 12 different destinations but it is now ok for me to visit countries I&amp;rsquo;ve seen before. So far it is going quite well. Here is my itinerary for 2009 as it looks right now.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;January&lt;/strong&gt;: Germany&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;February&lt;/strong&gt;: England and Moldova*&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;March&lt;/strong&gt;: USA&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;April&lt;/strong&gt;: Spain, Gibraltar* and Portugal*&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;May&lt;/strong&gt;: Scotland*&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;June&lt;/strong&gt;: Holland*&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;July&lt;/strong&gt;: Greece* and Albania*&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;September&lt;/strong&gt;: Turkey*&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;December&lt;/strong&gt;: Egypt*&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;* = have never visited before&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;These trips have been a mix of business and pleasure. Whenever I go on business trips, I always try to find time to explore the place I visit. Lately I&amp;rsquo;ve fallen for the idea of visiting the countries along the old silky way including Azerbaijan, Kirgizstan, Georgia, Armenia and a few more. I hope to find the time to spend some time there in the fall. Also, I&amp;rsquo;ve never been in Asia or Oceania so that&amp;rsquo;s also very high on my wish list.&lt;/p&gt;
&lt;p&gt;Often times when travelling, I don't have access to a PC so I don't read or write many blog posts. Instead I&amp;nbsp;&lt;a href="http://twitter.com/mkristensen"&gt;tweet&lt;/a&gt;&amp;nbsp;from my mobile phone just to keep a little up to date with the news in tech world.&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/mdzjFQolZRA/post.aspx</link>
      <author>Mads Kristensen</author>
      <comments>http://madskristensen.net/post/Off-topic-The-grand-plan-of-2009.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=97b354ea-361d-481b-8b37-0e26f0f2923c</guid>
      <pubDate>Mon, 23 Mar 2009 20:33:00 -0400</pubDate>
      <category>Random thoughts</category>
      <dc:publisher>Mads Kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=97b354ea-361d-481b-8b37-0e26f0f2923c</pingback:target>
      <slash:comments>14</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=97b354ea-361d-481b-8b37-0e26f0f2923c</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/Off-topic-The-grand-plan-of-2009.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=97b354ea-361d-481b-8b37-0e26f0f2923c</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=97b354ea-361d-481b-8b37-0e26f0f2923c</feedburner:origLink></item>
    <item>
      <title>Caught on tape</title>
      <description>&lt;p&gt;A few weeks back I gave a talk about ASP.NET performance optimization techniques. The talk was filmed and is now available to anyone interested in watching it. Unfortunately for some, the video is in Danish. If you want an English version of the performance talk, then you'll get the chance at the &lt;a href="http://www.umbraco.org/codegarden-2009/speakers"&gt;Umbraco CodeGarden&lt;/a&gt; conference in June.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdncommunity.dk/samedia/madstt.wmv"&gt;Watch the video&lt;/a&gt; (opens in Windows Media Player)&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/O3U_9lEIkVE/post.aspx</link>
      <author>Mads Kristensen</author>
      <comments>http://madskristensen.net/post/Caught-on-tape.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=6fd6c0cb-b690-427b-bace-4fd6eb28d70d</guid>
      <pubDate>Wed, 25 Feb 2009 20:40:00 -0400</pubDate>
      <category>ASP.NET</category>
      <dc:publisher>Mads Kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=6fd6c0cb-b690-427b-bace-4fd6eb28d70d</pingback:target>
      <slash:comments>4</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=6fd6c0cb-b690-427b-bace-4fd6eb28d70d</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/Caught-on-tape.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=6fd6c0cb-b690-427b-bace-4fd6eb28d70d</wfw:commentRss>
    <enclosure url="http://msdncommunity.dk/samedia/madstt.wmv" length="383877157" type="video/x-ms-wmv" /><feedburner:origLink>http://madskristensen.net/post.aspx?id=6fd6c0cb-b690-427b-bace-4fd6eb28d70d</feedburner:origLink></item>
  </channel>
</rss>
