<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Codality</title>
	<atom:link href="http://blog.najmanowicz.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.najmanowicz.com</link>
	<description>Code and Effect - solving problem with just enough amount of code - by Adam Najmanowicz</description>
	<lastBuildDate>Mon, 15 Jun 2009 10:31:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Eric Evans on Domain Driven Design</title>
		<link>http://blog.najmanowicz.com/2009/06/15/eric-evans-on-domain-driven-design/</link>
		<comments>http://blog.najmanowicz.com/2009/06/15/eric-evans-on-domain-driven-design/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 10:30:21 +0000</pubDate>
		<dc:creator>Adam Najmanowicz</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Domain Driven Design]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.najmanowicz.com/2009/06/15/eric-evans-on-domain-driven-design/</guid>
		<description><![CDATA[Eric Evans of Domain Driven Design will be giving a talk at PUT just before Eclipse DemoCamp, June 24th @ 18:00.&#160; Cognifide are sponsoring the event and it would be a great chance for you guys to dust of those design skills.&#160; Domain Driven Design is going to be course that we hope to run [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://domaindrivendesign.org/about#eric">Eric Evans</a> of <a href="http://domaindrivendesign.org/">Domain Driven Design</a> will be giving a talk at PUT just before Eclipse DemoCamp, June 24th @ 18:00.&#160; <a href="http://www.cognifide.com/">Cognifide</a> are sponsoring the event and it would be a great chance for you guys to dust of those design skills.&#160; Domain Driven Design is going to be course that we hope to run out of the Cognifide Office late this year with the a little help from our friends at <a href="http://www.skills-matter.com">Skills Matter</a>.</p>
<p><a href="http://skillsmatter.com/event/design-architecture/an-introduction-to-domain-driven-design">Register</a> for the Domain Driven Design that is platform-neutral and in fact, Eric gives .NET and Java versions of the courses.</p>
<p>More on Eric &amp; DDD:    <br /><a href="http://skillsmatter.com/course/design-architecture/domain-driven-design">http://skillsmatter.com/course/design-architecture/domain-driven-design</a>     <br /><a href="http://skillsmatter.com/podcast/design-architecture/domain-driven-design">http://skillsmatter.com/podcast/design-architecture/domain-driven-design</a>     <br /><a href="http://www.infoq.com/interviews/domain-driven-design-eric-evans">http://www.infoq.com/interviews/domain-driven-design-eric-evans</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.najmanowicz.com/2009/06/15/eric-evans-on-domain-driven-design/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SoakIE &#8211; a Web Server Stress Tool with a twist</title>
		<link>http://blog.najmanowicz.com/2009/05/10/soakie-a-web-server-stress-tool-with-a-twist/</link>
		<comments>http://blog.najmanowicz.com/2009/05/10/soakie-a-web-server-stress-tool-with-a-twist/#comments</comments>
		<pubDate>Sun, 10 May 2009 14:27:06 +0000</pubDate>
		<dc:creator>Adam Najmanowicz</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Downloadable]]></category>
		<category><![CDATA[EPiServer]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Web applications]]></category>

		<guid isPermaLink="false">http://blog.najmanowicz.com/2009/05/10/soakie-a-web-server-stress-tool-with-a-twist/</guid>
		<description><![CDATA[Last week or so ago a couple of friends in another project in Cognifide has run into a wall while trying to load test their website. the problem was as follows: The website is highly AJAX based – the page merely loads a stub in the initial request but then loads the rest of its [...]]]></description>
			<content:encoded><![CDATA[<p>Last week or so ago a couple of friends in another project in Cognifide has run into a wall while trying to load test their website. the problem was as follows: The website is highly AJAX based – the page merely loads a stub in the initial request but then loads the rest of its data in a dynamic matter therefore a traditional web testing tools are fairly useless. What they tried was to setup a number of Selenium clients to pound the server, but that turned out to be fairly challenging to the machine doing the testing. It was not possible to set up more than 10 clients on a fairly strong machine.</p>
<p>Also there are other limitations like time to wait for the server to timeout and time between clicks, which I am not sure the tool allowed them to adjust. Talking to them I recalled <a href="http://blog.najmanowicz.com/2006/11/17/how-to-get-website-thumbnail-in-c/">a tool for grabbing website thumbnails</a> long time ago. one way for them would be to to make a batch file with it. The tool would grab the sites’ thumbnail and stress it, but they would still have to setup a number of clients. Also it creates and tears down an instance of IE every time, making it’s not optimal for that task.</p>
<p>So a couple of evenings later (and a few back-s and forth-s during the testing sessions) out comes SoakIE:</p>
<p align="center"><a href="http://blog.najmanowicz.com/wp-content/uploads/2009/05/soakietest.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SoakIETest" border="0" alt="SoakIETest" src="http://blog.najmanowicz.com/wp-content/uploads/2009/05/soakietest-thumb.png" width="429" height="387" /></a> </p>
<p> <span id="more-140"></span>
<p align="left">The app uses pretty much the same trick as the <a href="http://blog.najmanowicz.com/2006/11/17/how-to-get-website-thumbnail-in-c/">tool for grabbing website thumbnails</a> but it does so in a nice UI and allows for some rudimentary settings for profiling the traffic:</p>
<p><a href="http://blog.najmanowicz.com/wp-content/uploads/2009/05/soakiesetup.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="SoakIESetup" border="0" alt="SoakIESetup" src="http://blog.najmanowicz.com/wp-content/uploads/2009/05/soakiesetup-thumb.png" width="429" height="387" /></a> </p>
<p>You can select the number of IE instances that will do the clicking, you can select a minimum time between clicks – that is how often any IE instance can click (if it already finished with the previous request). this allows you to simulate clients that will stay a minute on your site and only click after they’ve read the page. Additionally if your application can on an occasion encounter a deadlock or a hang, it allows you to specify the maximum time to live of each request. If the request takes longer than the specified time, the application will “Stop” the request.</p>
<p>One thing that we’ve noticed though is that after a long time of soak tests the IE instances get mighty fat and start to slow down dramatically. Therefore I’ve added a maximum number of clicks an IE instance can perform after which the client will no longer recycle it for more click but will tear it down and create a new IE instance to continue testing.</p>
<p>Naturally the application needs to know what to test. This is specified in the “Test setup&quot; tab in the “URLs to stress:&quot; text box. The URLs will be picked in a round-robin fashion. The first browser will get the first url, the next one will get the second and so on, if the list will get exhausted the browsers will get fed it from beginning. You can theoretically put them in the box with some other text (like pasting it from a Skype window without stripping the message decoration around them) – SoakIE should be smart enough to parse the text and get the URLs out of it.</p>
<p>You can download <a href="http://www.najmanowicz.com/blog_bin/SoakIE.zip">SoakIE here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.najmanowicz.com/2009/05/10/soakie-a-web-server-stress-tool-with-a-twist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advanced Language Manipulation Tool for EPiServer</title>
		<link>http://blog.najmanowicz.com/2009/04/06/advanced-language-manipulation-tool-for-episerver/</link>
		<comments>http://blog.najmanowicz.com/2009/04/06/advanced-language-manipulation-tool-for-episerver/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 15:49:11 +0000</pubDate>
		<dc:creator>Adam Najmanowicz</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Downloadable]]></category>
		<category><![CDATA[EPiCode]]></category>
		<category><![CDATA[EPiServer]]></category>
		<category><![CDATA[Microsoft SqlServer]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[Web applications]]></category>

		<guid isPermaLink="false">http://blog.najmanowicz.com/2009/04/06/advanced-language-manipulation-tool-for-episerver/</guid>
		<description><![CDATA[Have you ever (or have your customers) created and edited a page in one language only to realize that their selected locale was wrong? Have you ever wished you could delete a master language branch of a page&#160; after creating its localized counterpart but you could only delete the newly created slave language instead? Have [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever (or have your customers) created and edited a page in one language only to realize that their selected locale was wrong? Have you ever wished you could delete a master language branch of a page&#160; after creating its localized counterpart but you could only delete the newly created slave language instead? Have a customer ever requested that they could copy a whole branch and you convert it to another language so that they could then translate in-place?</p>
<p>Well I have… and I’m sure I will. And so did Fredrikj on the our #epicode IRC channel ;).</p>
<p>Basically I had the tool that would convert from one language to another, but Fredrikj requested something that would switch master language of a page from one to another. Since I’ve already had some of the work done, I’ve updated the stored procedure I’ve written some time ago and slapped a nice GUI up on it. Here’s the result:</p>
<p>&#160;</p>
<p align="center"><a href="http://blog.najmanowicz.com/wp-content/uploads/2009/04/andvancedlanguagetool.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="AndvancedLanguageTool" border="0" alt="AndvancedLanguageTool" src="http://blog.najmanowicz.com/wp-content/uploads/2009/04/andvancedlanguagetool-thumb.png" width="480" height="484" /></a> </p>
<p>What the tool allows you to do is perform either language conversion or master branch switching on a selected page and all of its children (if you choose so).</p>
<p>The stored procedure have been updated to work on CMS5 R2 (will no longer work on R1 – but if you need that functionality, comment here or give me a shout and I’ll create a compatible version for you).</p>
<p>A word of caution though – I take no guarantee whatsoever about its operation. Especially, if you wreck your client’s database with it. I did what I could to prevent some of the obvious problems (like <strong><em>switching</em></strong> to a non existing master or <strong><em>converting</em></strong> to an existing one) but I will not be responsible if it won’t work for you. make a database backup and experiment there before you do any changes on the real data. That said – it works for me, so I think it should also work for you.</p>
<p>You can download the <a title="Episerver Advanced Language Tools" href="http://www.najmanowicz.com/blog_bin/EPiServerLanguageTools.zip" rel="enclosure">archive containing the tool here</a>. unzip it to your EPiServer web application folder keeping the folder structure or the plugin reference will be wrong. Include the *.aspx and the *.cs files in your project and apply the SQL file to your database (The manipulation is performed by a stored procedure located in the file).</p>
<p>Also if you’re performing the change in a load balanced environment, you may need to restart the other servers once you do the changes. I reset the DataFactory cache, but I am not sure it propagates through to other servers.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.najmanowicz.com/2009/04/06/advanced-language-manipulation-tool-for-episerver/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>My private little G1/Android wish and hit list</title>
		<link>http://blog.najmanowicz.com/2009/03/30/my-private-little-g1android-wish-and-hit-list/</link>
		<comments>http://blog.najmanowicz.com/2009/03/30/my-private-little-g1android-wish-and-hit-list/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 20:03:35 +0000</pubDate>
		<dc:creator>Adam Najmanowicz</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[G1]]></category>
		<category><![CDATA[GSM]]></category>
		<category><![CDATA[Gmail]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://blog.najmanowicz.com/2009/03/30/my-private-little-g1android-wish-and-hit-list/</guid>
		<description><![CDATA[First of all, I have to say that I like the phone a lot. While you may get an impression from the rest of the post that I have a lot of beef with the phone, that&#8217;s really not the case. The very fact that I can compile a short, coherent list of things that [...]]]></description>
			<content:encoded><![CDATA[<p>First of all, I have to say that I like the phone a lot. While you may get an impression from the rest of the post that I have a lot of beef with the phone, that&#8217;s really not the case. The very fact that I can compile a short, coherent list of things that I think could be improved upon, made me realize how little there is to be wishing for. And none of the problems is a deal breaker. It&#8217;s not like the phone is missing Copy&amp;Paste or MMS ;). It does almost all I expected it to do (even in version 1.0), but since a few of my colleagues is looking forward to get one I thought I&#8217;d throw in a list of the little annoyances that I have faced using it, so they might verify how important the drawbacks might be to them. I am not sure how many of those can be addressed with third party applications but, for sure not all of them can, and I would definitely love Google to step in and provide a system-fix for them at some point. </p>
<h1>The Wish List</h1>
<h3>Look for wireless networks more aggressively</h3>
<p>Basically I find that very often I am still talking to the cell network when I could perfectly well be connected through a Wi-Fi. Turning Wi-Fi off and then back on again corrects the problem. This is annoying on a couple of levels. I have 3G turned off to conserve battery, It not noticing the Wi-Fi actually slows me down quite a bit, not to mention using up the precious data from the data plan (it&#8217;s only 500MB on the G1 plan in Poland) </p>
<h3>Fix the battery problem</h3>
<p>I mean really&#8230; 1 day is the best it can do when I do pretty much anything during the day with it. I could live with it being a little bit bigger if I didn&#8217;t have to fear it will die on me before the evening. I realize that this is because we have background apps, but perhaps you can introduce a CPU throttle technique that will slow down the operation when the horse power is not really needed. Perhaps something the next gen hardware will have to address.</p>
<h3>Allow me to have multiple identities</h3>
<p>The first thing you do when you start the phone is linking it to a Google account. That provides you with a really nice integration of Google calendar, mail &amp; contacts. And it’s not just setting up apps for it. The whole system is aware of your identity and any app that wants to (and that you allow it to), might use them as a service. For example, a to-do list is able to schedule events in your Google calendar and setup mail notifications and send over mail invites your contacts to a meeting. It can reserve a time in your calendar for shopping that your wife has asked you to do. that’s great but… why is my phone fixed to a single Google identity? And yes, I realize that I can send email to and from multiple mail accounts and access other calendars through the browser. That&#8217;s not the point. I want <strong><em>BE</em></strong> adam.najmanowicz AT cognifide.com when I&#8217;m at work and <strong><em>BE</em></strong> adam AT najmanowicz.com when I&#8217;m leaving the office. I have a perfectly fine 8GB card sitting idle in it that could easily store a number of identities and swap between them. I want to be able to manage multiple calendars conveniently and have applications like to-do lists tied to them. Come on Google, even Windows 95 could do it! Introduce multiple profiles with easy switch!</p>
<h3>Application uninstallation directly from the App drawer</h3>
<p>Android Marketplace is a great repository that you can get plethora of apps quickly. It&#8217;s a blessing&#8230; and a curse. It&#8217;s a major pain in the rare to hunt the apps that you want to remove on the mile long list of apps that additionally re-populates after every uninstall without keeping track of where you left off while removing the previous app.    <br />In the perfect word I could long-tap an icon and additionally to dragging it to the desktop I could drag it to some uninstaller corner. </p>
<h1>The “Must haves”</h1>
<p>That&#8217;s as much for anyone else as it is for my reference should I need to reset the phone to factory settings. </p>
<h4>DroidWiki</h4>
<p>A wiki like notepad. Supporting some basic wiki mark-up and links between notes. Brilliant idea, great implementation, perfect placement for a wiki! </p>
<h4>Useful switches</h4>
<p>This is what you will use to turn your Wi-Fi off and on again when it will fail to connect to the Wi-Fi again. </p>
<h4>Astrid</h4>
<p>Versatile and powerful, yet simple and elegant to-do list </p>
<h4>Skype (Beta)</h4>
<p>Naturally if you are using the Skype network. This is a native and group chat supporting Skype client. </p>
<h4>Twidroid</h4>
<p>So far my client of choice for Twitter. This is indispensible if you&#8217;re a part of the twitter craze. </p>
<h4>The weather channel </h4>
<p>Weather channel gizmo that allows you to check the weather for any area in the world at any time. </p>
<h4>ConvertAll</h4>
<p>Convert any unit to another. </p>
<h4>Tricorder</h4>
<p>For the geek cred. </p>
<h1>Conclusion</h1>
<p>Again, I need to reiterate, this is the best phone I&#8217;ve ever had. Having a full physical QWERTY keyboard and a browser with me all the time has definitely changed my life. I&#8217;m much more organized. I can track stuff much better and I have my priority list and my schedule always with me accessible from web as well as from the phone. The integration with Google apps is a tremendous selling point and none of the issues is a real deal breaker for me. Yet, this is the stuff that I will look up to in the following system releases.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.najmanowicz.com/2009/03/30/my-private-little-g1android-wish-and-hit-list/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Get out of my way! &#8230; or the story of file metadata for VirtualPathProvider in EPiServer</title>
		<link>http://blog.najmanowicz.com/2009/03/17/get-out-of-my-way-or-the-story-of-file-metadata-for-virtualpathprovider-in-episerver/</link>
		<comments>http://blog.najmanowicz.com/2009/03/17/get-out-of-my-way-or-the-story-of-file-metadata-for-virtualpathprovider-in-episerver/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 00:18:00 +0000</pubDate>
		<dc:creator>Adam Najmanowicz</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[EPiServer]]></category>
		<category><![CDATA[Internet Information Services]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[Web applications]]></category>

		<guid isPermaLink="false">http://blog.najmanowicz.com/2009/03/17/get-out-of-my-way-or-the-story-of-file-metadata-for-virtualpathprovider-in-episerver/</guid>
		<description><![CDATA[Immediately after you implement the VirtualPathProvider proxy from my previous post you will notice a one fairly serious lack in it. Namely all the files within that provider will be hiding behind the registration form. That is not cool for a couple of reasons…

You may want to keep all of the files in one store [...]]]></description>
			<content:encoded><![CDATA[<p>Immediately after you implement the VirtualPathProvider proxy from my previous post you will notice a one fairly serious lack in it. Namely all the files within that provider will be hiding behind the registration form. That is not cool for a couple of reasons…</p>
<ul>
<li>You may want to keep all of the files in one store – being forced to put them into a designated folder is not desired. </li>
<li>You may want to make some file freely available for some time and lock it after a while, or the other way around (e.g. to allow the robots to crawl it initially). having to move them is just silly and defeats the purpose. </li>
</ul>
<p>So how do you discriminate the files that you want locked from those that you want to be publically available, and potentially from those that you want only the logged in users to be able to get?</p>
<h2></h2>
<h2>Specifying the EPiServer File Metadata sweetness</h2>
<p>One of the potential solutions would be to define a special rights group and check for that group for the people that have your “registered” magic-cookie. That however introduces a bogus group, and I would rather like to avoid that. However if you look into the <strong><em>FileSummary.config</em></strong> file that’s located in your web application folder you will find a slightly mysterious content. A bit of hacking reveals that you can actually add your own metadata to the file. For example adding the access rights based on what I’ve established above would look as follows (the content you can already find in the file that comes with the public templates that-we-all-oh-so-love is skipped):</p>
<p><span id="more-120"></span></p>
<pre>
<div style="font-family: courier new; background: white; color: black; font-size: 8pt">
<span style="color: blue">&lt;</span><span style="color: #a31515">root</span><span style="color: blue"> </span><span style="color: red">xmlns:xforms</span><span style="color: blue">=</span>&quot;<span style="color: blue">http://www.w3.org/2002/xforms</span>&quot;<span style="color: blue"> </span>
<span style="color: blue">      </span><span style="color: red">xmlns:xsi</span><span style="color: blue">=</span>&quot;<span style="color: blue">http://www.w3.org/2001/XMLSchema-instance</span>&quot;<span style="color: blue">&gt;</span>

<span style="color: blue">  &lt;</span><span style="color: #a31515">model</span><span style="color: blue">&gt;</span>
<span style="color: blue">    &lt;</span><span style="color: #a31515">instance</span><span style="color: blue">&gt;</span>
      ...
<span style="color: blue">      &lt;</span><span style="color: #a31515">AccessLevel</span><span style="color: blue"> /&gt;</span>
<span style="color: blue">    &lt;/</span><span style="color: #a31515">instance</span><span style="color: blue">&gt;</span>
<span style="color: blue">  &lt;/</span><span style="color: #a31515">model</span><span style="color: blue">&gt;</span>

  ...
<span style="color: blue">  &lt;</span><span style="color: #a31515">xforms:select1</span><span style="color: blue"> </span><span style="color: red">appearance</span><span style="color: blue">=</span>&quot;<span style="color: blue">full</span>&quot;<span style="color: blue"> </span>
<span style="color: blue">                  </span><span style="color: red">ref</span><span style="color: blue">=</span>&quot;<span style="color: blue">AccessLevel</span>&quot;<span style="color: blue"> </span><span style="color: red">id</span><span style="color: blue">=</span>&quot;<span style="color: blue">id_field51</span>&quot;<span style="color: blue">&gt;</span>
<span style="color: blue">    &lt;</span><span style="color: #a31515">xforms:item</span><span style="color: blue">&gt;</span>
<span style="color: blue">      &lt;</span><span style="color: #a31515">xforms:label</span><span style="color: blue">&gt;</span>Unrestricted<span style="color: blue">&lt;/</span><span style="color: #a31515">xforms:label</span><span style="color: blue">&gt;</span>
<span style="color: blue">      &lt;</span><span style="color: #a31515">xforms:value</span><span style="color: blue">&gt;</span>Unrestricted<span style="color: blue">&lt;/</span><span style="color: #a31515">xforms:value</span><span style="color: blue">&gt;</span>
<span style="color: blue">    &lt;/</span><span style="color: #a31515">xforms:item</span><span style="color: blue">&gt;</span>
<span style="color: blue">    &lt;</span><span style="color: #a31515">xforms:item</span><span style="color: blue">&gt;</span>
<span style="color: blue">      &lt;</span><span style="color: #a31515">xforms:label</span><span style="color: blue">&gt;</span>Requires Registration<span style="color: blue">&lt;/</span><span style="color: #a31515">xforms:label</span><span style="color: blue">&gt;</span>
<span style="color: blue">      &lt;</span><span style="color: #a31515">xforms:value</span><span style="color: blue">&gt;</span>RequireRegistration<span style="color: blue">&lt;/</span><span style="color: #a31515">xforms:value</span><span style="color: blue">&gt;</span>
<span style="color: blue">    &lt;/</span><span style="color: #a31515">xforms:item</span><span style="color: blue">&gt;</span>
<span style="color: blue">    &lt;</span><span style="color: #a31515">xforms:item</span><span style="color: blue">&gt;</span>
<span style="color: blue">      &lt;</span><span style="color: #a31515">xforms:label</span><span style="color: blue">&gt;</span>Requires CMS Login<span style="color: blue">&lt;/</span><span style="color: #a31515">xforms:label</span><span style="color: blue">&gt;</span>
<span style="color: blue">      &lt;</span><span style="color: #a31515">xforms:value</span><span style="color: blue">&gt;</span>LoggedUserAccess<span style="color: blue">&lt;/</span><span style="color: #a31515">xforms:value</span><span style="color: blue">&gt;</span>
<span style="color: blue">    &lt;/</span><span style="color: #a31515">xforms:item</span><span style="color: blue">&gt;</span>
<span style="color: blue">  &lt;/</span><span style="color: #a31515">xforms:select1</span><span style="color: blue">&gt;</span>
  ...

<span style="color: blue">&lt;/</span><span style="color: #a31515">root</span><span style="color: blue">&gt;</span></div>
</pre>
<p>Great. So what does it look in the file manager now?</p>
<p align="center"><a href="http://blog.najmanowicz.com/wp-content/uploads/2009/03/metadataeditor.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="metadata-editor" border="0" alt="metadata-editor" src="http://blog.najmanowicz.com/wp-content/uploads/2009/03/metadataeditor-thumb.png" width="518" height="355" /></a> </p>
<p>Splendid!</p>
<h2>Accessing the metadata</h2>
<p>Now that we gave the user to specify the metadata, we need the VPP to act upon them. For the benefit of automation of parsing I’ve specified the enum defining the access levels as follows:</p>
<pre>
<div style="font-family: courier new; background: white; color: black; font-size: 8pt">
<span style="color: blue">enum</span> <span style="color: #2b91af">FileAccessLevel</span>
{
    Unrestricted,
    RequireRegistration,
    LoggedUserAccess
}
</div>
</pre>
<p>Now we need to update the GetFile method to discriminate the access levels (I have decorated the core lines with <font color="#ff0000">&#8211;<strong>&gt;</strong></font>) those are the lines that access the meta data based on their format specified in the <strong><em>FileSummary.config</em></strong>.</p>
<pre class="brush: csharp; highlight: [11, 12, 13]">
public override VirtualFile GetFile(string virtualPath)
{
    string handledPath;

    if (TryGetHandledAbsolutePath(virtualPath, out handledPath))
    {
        UnifiedFile file = base.GetFile(virtualPath) as UnifiedFile;

        if (file != null)
        {
            string strAccessLevel = (string) file.Summary.Dictionary["AccessLevel"] ??
                                    FileAccessLevel.RequireRegistration.ToString();
            FileAccessLevel accessLevel = (FileAccessLevel) Enum.Parse(typeof (FileAccessLevel), strAccessLevel);

            bool isLoggedIn = HttpContext.Current.Profile != null &#038;&#038; !HttpContext.Current.Profile.IsAnonymous;
            bool isRegistered = HttpContext.Current.Request.Cookies.AllKeys.Contains(PASS_COOKIE_NAME);
            string email = isRegistered ? HttpContext.Current.Request.Cookies[PASS_COOKIE_NAME].Value :
                (isLoggedIn ? HttpContext.Current.Profile.UserName : "unregistered");

            switch (accessLevel)
            {
                case (FileAccessLevel.Unrestricted):
                    return file;
                    break;
                case(FileAccessLevel.RequireRegistration):
                    if (!isRegistered &#038;&#038; ! isLoggedIn)
                    {
                        HttpContext.Current.Response.Redirect(
                            string.Format(registrationFormUrl,
                                          HttpContext.Current.Server.HtmlEncode(virtualPath)));
                        return null;
                    }
                    return file;
                    break;
                case(FileAccessLevel.LoggedUserAccess):
                    if (isLoggedIn)
                    {
                        return file;
                    }
                    return null;
                    break;
                default:
                    return file;
            }
        }
    }
    return Previous.GetFile(virtualPath);
}
</pre>
<p>Now the user is really in control of what is published to the general public and robots, what is protected with the registration form and what is only available to logged in users. (now you may add more granularity with file rights naturally, this is just a basic setting that an editor without administrative rights can add.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.najmanowicz.com/2009/03/17/get-out-of-my-way-or-the-story-of-file-metadata-for-virtualpathprovider-in-episerver/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Simple registration for files served by EPiServer</title>
		<link>http://blog.najmanowicz.com/2009/03/12/simple-registration-for-files-served-by-episerver/</link>
		<comments>http://blog.najmanowicz.com/2009/03/12/simple-registration-for-files-served-by-episerver/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 21:01:00 +0000</pubDate>
		<dc:creator>Adam Najmanowicz</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[EPiCode]]></category>
		<category><![CDATA[EPiServer]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[Web applications]]></category>

		<guid isPermaLink="false">http://blog.najmanowicz.com/2009/03/12/simple-registration-for-files-served-by-episerver/</guid>
		<description><![CDATA[With the culture of knowledge sharing and open source spreading, everyone races to show they have something valuable that you may want. And while you may not ask for money for your content you may still want to get something in return, say a contact, an email address that’s verified (or not), to keep in [...]]]></description>
			<content:encoded><![CDATA[<p>With the culture of knowledge sharing and open source spreading, everyone races to show they have something valuable that you may want. And while you may not ask for money for your content you may still want to get something in return, say a contact, an email address that’s verified (or not), to keep in touch with the consumer of your content. </p>
<p>Yet a full fledged registration doesn’t seem like a proper thing to do – cluttering your EPiServer user repository with (let’s face it – for a large part fake or temporary email addresses that user create only to get your content).</p>
<p>While there may be a lot of ways to handle that (streaming it through a page Response.WriteFile might seem as one of the more obvious ones), I would like to show you a cleaner, simpler and more elegant way that I’ve come up with.</p>
<p>We really don’t want people to deep link to our files without them knowing the files are from our site, that’s just rude – so hiding them behind an obscure URL wouldn’t work (thus we cannot use the regular file providers). We’ve already establish that we don’t want to log them in, so setting file rights are useless. But I want all the benefits including client-side caching.</p>
<p>Basically the solution boils down to creating a thin layer over the File provider of our choice, in my case the versioning file provider. The only method we need to override in it is <strong>GetFile</strong>. I want to allow downloading for logged in users and I want to allow downloading for all users that have a “magic-cookie” set. If either of the conditions are met, the file just downloads using the underlying provider’s routines including all the logic EPiServer has put for caching and rights. But if neither of the requirements are met, the user is directed to a page of our choice. </p>
<p><span id="more-117"></span></p>
<pre>
<div style="font-family: courier new; background: white; color: black; font-size: 8pt"><span style="color: blue">public</span> <span style="color: blue">override</span> <span style="color: #2b91af">VirtualFile</span> GetFile(<span style="color: blue">string</span> virtualPath)
{
    <span style="color: blue">string</span> handledPath;

    <span style="color: blue">if</span> (TryGetHandledAbsolutePath(virtualPath, <span style="color: blue">out</span> handledPath))
    {
        <span style="color: blue">if</span> ((<span style="color: #2b91af">HttpContext</span>.Current.Profile != <span style="color: blue">null</span> &amp;&amp; !<span style="color: #2b91af">HttpContext</span>.Current.Profile.IsAnonymous) ||
            <span style="color: #2b91af">HttpContext</span>.Current.Request.Cookies.AllKeys.Contains(PASS_COOKIE_NAME))
        {
            <span style="color: blue">return</span> <span style="color: blue">base</span>.GetFile(virtualPath);
        }

        <span style="color: #2b91af">HttpContext</span>.Current.Response.Redirect(
            <span style="color: blue">string</span>.Format(registrationFormUrl,<span style="color: #2b91af">HttpContext</span>.Current.Server.HtmlEncode(virtualPath)));
        <span style="color: blue">return</span> <span style="color: blue">null</span>;
    }
    <span style="color: blue">return</span> Previous.GetFile(virtualPath);
}</div>
</pre>
<p>How you specify that page’s totally up to you, but there is a nice initialization routine called during the Virtual Path Provider loading phase where all of the settings that are specified in your relevant web.config VPP declaration are passed to you, why not use it? What you’ll need define your VPP in the web.config is what follows:</p>
<pre>
<div style="font-family: courier new; background: white; color: black; font-size: 8pt">
<span style="color: blue">&lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">showInFileManager</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot;<span style="color: blue"> </span><span style="color: red">virtualName</span><span style="color: blue">=</span>&quot;<span style="color: blue">CookieEnabled</span>&quot;<span style="color: blue"> </span><span style="color: red">virtualPath</span><span style="color: blue">=</span>&quot;<span style="color: blue">~/CookieEnabled/</span>&quot;<span style="color: blue"> </span>
<span style="color: blue">     </span><span style="color: red">bypassAccessCheck</span><span style="color: blue">=</span>&quot;<span style="color: blue">false</span>&quot;<span style="color: blue"> </span><span style="color: red">name</span><span style="color: blue">=</span>&quot;<span style="color: blue">CookieEnabled</span>&quot;<span style="color: blue"> </span>
<span style="color: blue">     </span><span style="color: red">type</span><span style="color: blue">=</span>&quot;<span style="color: blue">Cognifide.EPiServer.CookieEnabledVirtualPathProvider.CookieEnabledVirtualPathProvider,Cognifide.EPiServer.CookieEnabledVirtualPathProvider</span>&quot;<span style="color: blue"> </span>
<span style="color: blue">     </span><span style="color: red">indexingServiceCatalog</span><span style="color: blue">=</span>&quot;<span style="color: blue">Web</span>&quot;<span style="color: blue"> </span><span style="color: red">physicalPath</span><span style="color: blue">=</span>&quot;<span style="color: blue">C:\vpp\Resources</span>&quot;<span style="color: blue"> </span>
<span style="color: blue">     </span><span style="color: red">RegistrationFormUrl</span><span style="color: blue">=</span>&quot;<span style="color: blue">/File-Asset-Request-Form/?filepath={0}</span>&quot;<span style="color: blue"> /&gt;</span>
</div>
</pre>
<p>
  <br />you can then define your class as:</p>
<pre>
<div style="font-family: courier new; background: white; color: black; font-size: 8pt">
<span style="color: blue">public</span> <span style="color: blue">class</span> <span style="color: #2b91af">CookieEnabledVirtualPathProvider</span> : <span style="color: #2b91af">VirtualPathVersioningProvider</span>
{
    <span style="color: blue">private</span> <span style="color: blue">const</span> <span style="color: blue">string</span> REGISTRATION_FORM_URL_WEB_CONFIG_PARAM_NAME = <span style="color: #a31515">&quot;RegistrationFormUrl&quot;</span>;
    <span style="color: blue">public</span> <span style="color: blue">const</span> <span style="color: blue">string</span> PASS_COOKIE_NAME = <span style="color: #a31515">&quot;ResourcePass&quot;</span>;
    <span style="color: blue">private</span> <span style="color: blue">string</span> registrationFormUrl;

    <span style="color: blue">public</span> CookieEnabledVirtualPathProvider(<span style="color: blue">string</span> name, <span style="color: #2b91af">NameValueCollection</span> configParameters) :
        <span style="color: blue">base</span>(name, configParameters)
    {
        registrationFormUrl = configParameters[REGISTRATION_FORM_URL_WEB_CONFIG_PARAM_NAME];
    }

    ...

}
</div>
</pre>
<p>So we know now where we want to direct people without a “magic-cookie” who want to get our assets, and how to do it, but how do we finally allow that file to get down to them?</p>
<p>In your page – for the same of simplicity I assume you will be using XForms for gathering the user data, but that really does not matter. When you validate the form data (or get the user to click on a link that you’ve sent them) you just set the “magic” cookie that I called “ResourcePass” to any value and to to expire in some a long amount of time, like a year. So that they can now access your files unrestrained and direct them BACK at the URL they came from – and now the VPP will allow them to just download the file they initially requested:</p>
<pre>
<div style="font-family: courier new; background: white; color: black; font-size: 8pt">
<span style="color: blue">protected</span> <span style="color: blue">void</span> XForm_BeforeSubmitPostedData(<span style="color: blue">object</span> sender, <span style="color: #2b91af">SaveFormDataEventArgs</span> e)
{
    <span style="color: blue">if</span> (!Page.IsValid)
    {
        e.CancelSubmit = <span style="color: blue">true</span>;
    }
    <span style="color: blue">else</span>
    {
        <span style="color: blue">string</span> requestedFile = Request.Params[<span style="color: #a31515">&quot;filepath&quot;</span>];
        <span style="color: #2b91af">HttpCookie</span> cookie = <span style="color: blue">new</span> <span style="color: #2b91af">HttpCookie</span>(<span style="color: #2b91af">CookieEnabledVirtualPathProvider</span>.PASS_COOKIE_NAME, <span style="color: #a31515">&quot;true&quot;</span>);
        cookie.Expires = <span style="color: #2b91af">DateTime</span>.Now.AddYears(1);
        cookie.HttpOnly = <span style="color: blue">true</span>;
        Response.Cookies.Add(cookie);
        <span style="color: blue">if</span> (!<span style="color: blue">string</span>.IsNullOrEmpty(requestedFile))
        {
            Response.Redirect(requestedFile);
        }
    }
}
</div>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.najmanowicz.com/2009/03/12/simple-registration-for-files-served-by-episerver/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Merged contacts in gmail rendered uneditable &#8211; the fix</title>
		<link>http://blog.najmanowicz.com/2009/02/28/merged-contacts-in-gmail-rendered-uneditable-the-fix/</link>
		<comments>http://blog.najmanowicz.com/2009/02/28/merged-contacts-in-gmail-rendered-uneditable-the-fix/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 11:43:33 +0000</pubDate>
		<dc:creator>Adam Najmanowicz</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[GSM]]></category>
		<category><![CDATA[Gmail]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Solution]]></category>

		<guid isPermaLink="false">http://blog.najmanowicz.com/2009/02/28/merged-contacts-in-gmail-rendered-uneditable-the-fix/</guid>
		<description><![CDATA[Long story short. Bought G1 lately so I&#8217;ve decided to bring peace to my tormented contact list once and for all. Editing in Gmail is&#8230; adequate. I&#8217;ve been able to import most of my contacts &#8211; naturally countless of those were duplicates as I integrated my mail contact list and my phone contact list. Where [...]]]></description>
			<content:encoded><![CDATA[<p>Long story short. Bought G1 lately so I&#8217;ve decided to bring peace to my tormented contact list once and for all. Editing in Gmail is&#8230; adequate. I&#8217;ve been able to import most of my contacts &#8211; naturally countless of those were duplicates as I integrated my mail contact list and my phone contact list. Where gmail contacts list editing excels is at allowing you to merge those.</p>
<p>It’s incredibly convenient:</p>
<p><a href="http://blog.najmanowicz.com/wp-content/uploads/2009/02/gmail-merge-contacts.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="gmail_merge_contacts" border="0" alt="gmail_merge_contacts" src="http://blog.najmanowicz.com/wp-content/uploads/2009/02/gmail-merge-contacts-thumb.png" width="244" height="90" /></a> </p>
<p>And fairly deadly to the merged contact. Once those contacts are merged and you save them but later try to come back to them to re-edit, I’ve noticed that whenever I select them for editing after that, they don’t pop up for the task, but instead the previously selected contact is being opened for editing. I can see the details of such contact, it synchronizes with the phone perfectly, just the editing won’t work. </p>
<p>Browsing through gmail support groups I’ve found out that a lot of people have this problem but somewhat it eludes Google. People suggest that clearing up cookies or history worked for them. No luck here.</p>
<p>What did the trick though was exporting all of them to the Google CSV:</p>
<p align="center"><a href="http://blog.najmanowicz.com/wp-content/uploads/2009/02/gmail-merge-contacts2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="gmail_merge_contacts2" border="0" alt="gmail_merge_contacts2" src="http://blog.najmanowicz.com/wp-content/uploads/2009/02/gmail-merge-contacts2-thumb.png" width="573" height="368" /></a> </p>
<p>&nbsp;</p>
<p>Deleting all the contacts and then importing them back. Unfortunately once you do that all the associations they’ve had with the groups that youv’e defined are gone, but at least you can edit them again!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.najmanowicz.com/2009/02/28/merged-contacts-in-gmail-rendered-uneditable-the-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebParts based Sidebar for EPiServer &#8211; how to use it?</title>
		<link>http://blog.najmanowicz.com/2009/01/08/webparts-based-sidebar-for-episerver-how-to-use-it/</link>
		<comments>http://blog.najmanowicz.com/2009/01/08/webparts-based-sidebar-for-episerver-how-to-use-it/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 17:06:47 +0000</pubDate>
		<dc:creator>Adam Najmanowicz</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Downloadable]]></category>
		<category><![CDATA[EPiCode]]></category>
		<category><![CDATA[EPiServer]]></category>
		<category><![CDATA[Internet Information Services]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web applications]]></category>
		<category><![CDATA[WebParts]]></category>

		<guid isPermaLink="false">http://blog.najmanowicz.com/2009/01/08/webparts-based-sidebar-for-episerver-how-to-use-it/</guid>
		<description><![CDATA[Once you’ll update the framework to the extended one, you will immediately notice that… nothing has changed. Hmm… did something go wrong? 
Well, not really. By default the framework will be run in the “legacy mode”. Thanks to an old article by our own Marek Blotny, I’ve learned how to build Plugin settings which are [...]]]></description>
			<content:encoded><![CDATA[<p>Once you’ll update the framework to the extended one, you will immediately notice that… nothing has changed. Hmm… did something go wrong? </p>
<p>Well, not really. By default the framework will be run in the “legacy mode”. Thanks to <a href="http://marekblotny.blogspot.com/2008/07/plugins-and-datafactory-event-handlers.html">an old article by our own Marek Blotny</a>, I’ve learned how to build Plugin settings which are just perfect for the purpose!</p>
<p align="left">So to configure and enable the new features you need to open your admin UI and in the “Config” click on the “Plugin Manager” item and select our framework plugin as shown in the picture</p>
<p align="center"><a href="http://blog.najmanowicz.com/wp-content/uploads/2009/01/webpartframeworkpluginsettings1.png"><img title="WebPartFrameworkPluginSettings1" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="164" alt="WebPartFrameworkPluginSettings1" src="http://blog.najmanowicz.com/wp-content/uploads/2009/01/webpartframeworkpluginsettings1-thumb.png" width="244" border="0" /></a></p>
<p>The available options are:</p>
<p><span id="more-110"></span><br />
<table cellspacing="0" cellpadding="2" border="0">
<tbody>
<tr>
<td><b>Setting Name</b></td>
<td><b>Meaning</b></td>
<td><b>Sample</b></td>
</tr>
<tr>
<td><b><i>Default WebParts Path Pattern</i></b></td>
<td>The pattern to be used when no pattern is defined for a page.</td>
<td>%inherit%</td>
</tr>
<tr>
<td><b><i>WebParts Path Patterns</i></b></td>
<td>The semicolon separated pairs of pattern;pattern name;          <br />This is the part you will want to customize most.</td>
<td>%template%|%pageid%%legacyregion%;Legacy regionalized;%template%|%pageid%;Legacy globalized;page|%pageid%|%region%;Page/region;pagetype|%pagetypeid%;Page Type</td>
</tr>
<tr>
<td><b><i>Cache WebParts in Memory</i></b></td>
<td>Determines whether the WebParts are to be cached&#160; between usages (this is useful for a small set of WebParts (like a number of sidebars) but rather discouraged if you use the legacy mode as there can be a lot of those in such case.</td>
<td>unchecked by default (check to improve performance in sidebar mode)</td>
</tr>
<tr>
<td><b><i>Legacy WebParts Support (per-page only)</i></b></td>
<td>If checked, disables the extensions described by this blog.</td>
<td>checked by default (uncheck to enable the sidebar extensions)</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>As shown here:</p>
<p><a href="http://blog.najmanowicz.com/wp-content/uploads/2009/01/webpartframeworkpluginsettings2.png"><img title="WebPartFrameworkPluginSettings2" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="179" alt="WebPartFrameworkPluginSettings2" src="http://blog.najmanowicz.com/wp-content/uploads/2009/01/webpartframeworkpluginsettings2-thumb.png" width="244" border="0" /></a> </p>
<p>&#160;</p>
<p>Once you fill in the settings as they are suggested in the above table the context menu (or adjust to your needs) will show you the new options:</p>
<p align="center"><a href="http://blog.najmanowicz.com/wp-content/uploads/2009/01/webpartframeworkpluginsettings3.png"><img title="WebPartFrameworkPluginSettings3" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="173" alt="WebPartFrameworkPluginSettings3" src="http://blog.najmanowicz.com/wp-content/uploads/2009/01/webpartframeworkpluginsettings3-thumb.png" width="244" border="0" /></a> </p>
</p>
<p>The new sub menu will allow you to change the pattern by which the WebParts are selected, while “Edit Web Parts” option will enable you to edit the WebParts for the current effective WebPart set.</p>
<p><font color="#ff0000"><strong>First of all – if you want to select a pattern on a page you need a means of storing it. At this moment The framework does it in a property. Which means &#8211; for every page type that wants to redefine the web parts rather than using the default pattern (in our case %inherited%) you need to add String property with a “WebPartsPath” name (I may actually add some routines to add the property definition automatically if there will be enough demand for that).</strong></font></p>
<h1>What does “Effective WebPart Set” mean?</h1>
<p>Assuming (which is the most interesting scenario) that %inherit% is the default pattern the following is true: </p>
<p>&#160;</p>
<table border="1">
<tbody>
<tr>
<td><b>Page</b></td>
<td><b>WebPartsPath</b></td>
<td><b>Effective path</b></td>
<td><b>Description</b></td>
</tr>
<tr>
<td>Start</td>
<td>&#160;</td>
<td>%root%</td>
<td>Since it&#8217;s a start page and it does not define path %root% is used.</td>
</tr>
<tr>
<td>+ News</td>
<td>&#160;</td>
<td>%root%</td>
<td>inherits from start page which does not define path but inherits from %root%.</td>
</tr>
<tr>
<td>+ Events</td>
<td>page|%pageid%</td>
<td>page|5</td>
<td>directly implements its own pattern.</td>
</tr>
<tr>
<td>| + Partner Day</td>
<td>%inherit%</td>
<td>page|5</td>
<td>Inherits after its parent page.</td>
</tr>
<tr>
<td>+ International</td>
<td>page|%pageid%|%region%</td>
<td>page|6|en, page|6|se</td>
<td>Defines separate WebParts for every language that the page is created for.</td>
</tr>
<tr>
<td>| + Sweden</td>
<td>%inherit%</td>
<td>page|6|se</td>
<td>Inherits after its parent page in its own language.</td>
</tr>
<tr>
<td>| + England</td>
<td>%inherit%</td>
<td>page|6|en</td>
<td>Inherits after its parent page in its own language.</td>
</tr>
</tbody>
</table>
<p>Once you select the effective web parts for the page or just agree with the WebParts pre-selected for you based on the default path you can edit them just like previously. Mind that when you edit WebParts on a page all the pages that have the same “effective path” are going to change as well. (which was our intention in the first place).</p>
<p>&#160;</p>
<p>The library extension is going to be posted on Epicode as soon as I get a hold of Steve to approve the changes :)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.najmanowicz.com/2009/01/08/webparts-based-sidebar-for-episerver-how-to-use-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebParts based Sidebar for EPiServer &#8211; the motivation and specification</title>
		<link>http://blog.najmanowicz.com/2009/01/08/webparts-based-sidebar-for-episerver-the-motivation-and-specification/</link>
		<comments>http://blog.najmanowicz.com/2009/01/08/webparts-based-sidebar-for-episerver-the-motivation-and-specification/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 14:04:12 +0000</pubDate>
		<dc:creator>Adam Najmanowicz</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Downloadable]]></category>
		<category><![CDATA[EPiCode]]></category>
		<category><![CDATA[EPiServer]]></category>
		<category><![CDATA[Internet Information Services]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web applications]]></category>
		<category><![CDATA[WebParts]]></category>

		<guid isPermaLink="false">http://blog.najmanowicz.com/2009/01/08/webparts-based-sidebar-for-episerver-the-motivation-and-specification/</guid>
		<description><![CDATA[Back in the day when we started designing our last project we’ve been presented with a following problem – a big number of templates with slightly different sidebars.
Hmm… 
Is sidebar a part of content? No, rather not. We don’t want the editors to have to setup the sidebar for every article they write (and the [...]]]></description>
			<content:encoded><![CDATA[<p>Back in the day when we started designing our last project we’ve been presented with a following problem – a big number of templates with slightly different sidebars.</p>
<p>Hmm… </p>
<p>Is sidebar a part of content? No, rather not. We don’t want the editors to have to setup the sidebar for every article they write (and the site has a few dozens of articles created on it every day).</p>
<p>Is sidebar more of a template thing? Well… more like it, but still… we have articles all over the site with different sidebar elements when the articles are in different parts of the site (ok so we could add rules what controls display in which part of the site). <strong>But wait! There’s more!</strong> The sidebar will be different for every language (region). Now we’re talking a dozen of templates or a rules engine just to make the sidebar different. Customising the template with properties isn’t ideal either as it makes EPiServer UI very cluttered. Additionally we want to change sidebars across many templates so the whole branch/section of the site will be able to share the same sidebar.</p>
<p>To a degree this is an academic discussion as we’ve been through it with the previous version of the site and we already knew that integrating this stuff into templates just won’t work and we will be in a world of pain just changing the templates over and over adding little tweaks and changes while the customer ads promotions and performs ad campaigns. Well, we can do it, of course, but it’s not a work a programmer will enjoy, and we all want to do new and more exciting things, don’t we?</p>
<p>We have an internally developed&#160; module to make something like that, that is fully home-grown by another internal team (we now have 3 “squads” capable or making incredible things with EPiServer and we tend to share a lot of technologies and try to rotate people around to adopt the good habits and experiences) and I was (and still am) VERY impressed by it. The technology uses EPiServer pages for defining every module (which are located somewhere outside the site root branch. and then you can mix and match them either declaratively in the code) or by handpicking them in the UI. It’s really cool, though, during the discussions it turned out that we might have to add big chunks of functionality and might end up with separate branches of module-pages for different languages/regions, but… frankly… about that time <a href="http://labs.episerver.com/en/Blogs/Ted-Nyberg/Dates/112276/8/Using-web-parts-in-EPiServer/">an article by Ted Nyberg</a> reminded me about a technology I have read about quite a while ago in <a href="http://labs.episerver.com/en/Blogs/Stein-Viggo-Grenersen/Dates/112262/2/EPiServer-on-steroids/">an article by Stein-Viggo Grenersen</a> and ooohhhhhh… I got seduced. I really wanted to try if for a long time and Ted’s article made it a snap to try and get convinced, and more important… convince Stu ;) that it’s the right way to explore.</p>
<h2>So I started to dig.</h2>
<p><span id="more-103"></span></p>
<h2></h2>
<p><a href="http://labs.episerver.com/en/Blogs/Stein-Viggo-Grenersen/Dates/112262/2/EPiServer-on-steroids/"><img style="display: inline; margin: 0px 10px 0px 0px" src="http://www.najmanowicz.com/blog_images/DragDropWebPartsmaller.gif" align="left" /></a>Talked with <a href="http://stevecelius.spaces.live.com/">Steve</a> (the original creator of the Framework) a bit and learned that I can “customize a path rewriter” to suit my needs. Great! I just hoped I won’t have to deal with some nasty GUID’s matching, but no! Turns out, all it takes to identify a WebPart set is to have any unique string naming it.</p>
<p>So basically what we needed was a manager to deal with the naming templates and a way to determine the WebParts set to be used per page.</p>
<p>Till now the framework used template file name followed by the page ID, followed by an eventual language/region if a page was not the master branch, for example:</p>
<blockquote><p>~/templates/Demo/WebPartPage.aspx|26    <br />~/templates/Demo/WebPartPage.aspx|26|en-us </p></blockquote>
<p>which makes them unique per page, which is not as appealing when you use EPiServer as it for a big part duplicates its functionality. Also a bit of a caveat here for agile programming methodology which promotes an often and early refactoring – if you move your page around or change its name – you lose the WebParts for all pages using it.</p>
<p>What we needed is a flexible and extensible scheme for reusing “WebParts sets” and that’s what our extension allows for.</p>
<p>Also since we’re very performance sensitive, and we operate in a multi server scenarios a lot we’ve added web parts blobs caching. Meaning that the site does not have to reach to the database every time a page is rendered.</p>
<p>The very appealing side of the framework is that it can be extended form the bottom (persistence) from the top (editors, controls, webparts), as well as being pluggable with custom plumbing.</p>
<h2>The Sidebar Extensions for WebParts Framework</h2>
<p>So to put all the requirements together, we needed the sidebars to be:</p>
<ul>
<li>customizable (out of the box) </li>
<li>easy to use for both developers and editors (out of the box) Wow Steve, I can’t really appreciate enough how cool it is to code for it and how nice it is for the users! </li>
<li>localizable </li>
<li>reusable </li>
<li>inheritable for site branches </li>
</ul>
<h2>WebParts path patterns</h2>
<p>The main idea was to free the path names from the restriction they had – being hardcoded for a page. So to do it without hard-coding them I’ve introduced path patterns. </p>
<h3>What is a pattern?</h3>
<p>Basically a pattern is a way the framework is supposed to encode the WebParts&#160; id for the system to identify. Your site can have any number of “named patterns” and the framework gives you means of switching between them. Pattern allow for almost any string to be a part of it although some tokens have special meaning:</p>
<table cellspacing="0" cellpadding="2" width="680" border="0">
<tbody>
<tr>
<td valign="top" width="200"><strong>Token</strong></td>
<td valign="top" width="478"><strong>Replacemnt Value</strong></td>
</tr>
<tr>
<td valign="top" width="200">%pageid%</td>
<td valign="top" width="478">id of the page the path is formed for</td>
</tr>
<tr>
<td valign="top" width="200">%region%</td>
<td valign="top" width="478">language/region of the WebParts</td>
</tr>
<tr>
<td valign="top" width="200">%pagetypeid%</td>
<td valign="top" width="478">type of the page</td>
</tr>
<tr>
<td valign="top" width="200">%template%</td>
<td valign="top" width="478">legacy token to make it possible to use template names as part of path.          <br />This is just for compatibility so you can have some of the pages using an old scheme.</td>
</tr>
<tr>
<td valign="top" width="200">%legacyregion%</td>
<td valign="top" width="478">legacy token for regionalizable pages (usage described later)</td>
</tr>
<tr>
<td valign="top" width="200">%inherited%</td>
<td valign="top" width="478">states that a page shoud inherit its WebParts from its parent in the page hierarchy (this can only be used as a complete pattern – cannot be a part of a larger pattern)</td>
</tr>
<tr>
<td valign="top" width="200">%root%</td>
<td valign="top" width="478">(again whole pattern) the %root% token is used when the inheritance based on hierarchy does not resolve into another token while reaching the root page.</td>
</tr>
</tbody>
</table>
<h3>Some sample patterns</h3>
<table cellspacing="0" cellpadding="2" width="600" border="1">
<tbody>
<tr>
<td valign="top" width="100"><strong>Name</strong></td>
<td valign="top" width="100"><strong>Pattern</strong></td>
<td valign="top" width="150"><strong>Sample Instance</strong> <strong>of the Pattern</strong></td>
<td valign="top" width="200"><strong>Description</strong></td>
</tr>
<tr>
<td valign="top" width="100">Root pattern</td>
<td valign="top" width="100">%root%</td>
<td valign="top" width="150">%root%</td>
<td valign="top" width="200">The pattern that all inheritance automatically falls back to</td>
</tr>
<tr>
<td valign="top" width="100">Inherited</td>
<td valign="top" width="100">%inherit%</td>
<td valign="top" width="150">anything parent defines</td>
<td valign="top" width="200">Tells the page to use the web parts its parent is using – the inheritance is possible all the way up in the hierarchy to the %root% pattern, meaning – if my parent inherits its WebParts from its parent, so will I.</td>
</tr>
<tr>
<td valign="top" width="100">Legacy regionalized</td>
<td valign="top" width="100">%template%|%pageid%%legacyregion%</td>
<td valign="top" width="150">~/templates/Demo/​​WebPartPage.aspx|26|en-us</td>
<td valign="top" width="200">Creates legacy “non language independent path”</td>
</tr>
<tr>
<td valign="top" width="100">Legacy global </td>
<td valign="top" width="100">%template%|%pageid%</td>
<td valign="top" width="150">~/templates/Demo/​​WebPartPage.aspx|26</td>
<td valign="top" width="200">Creates legacy “language independent path”</td>
</tr>
<tr>
<td valign="top" width="100">Page/region specific</td>
<td valign="top" width="100">page|%pageid%|%region%</td>
<td valign="top" width="150">page|26|en-us</td>
<td valign="top" width="200">template independent per-page/per-language pattern</td>
</tr>
<tr>
<td valign="top" width="100">PageType specific</td>
<td valign="top" width="100">pagetype|%pagetypeid%</td>
<td valign="top" width="150">pagetype|5</td>
<td valign="top" width="200">page type specific path (notice how the previous pattern has “page” and this one has “pagetype” in it) – this is done to avoid conflicts in numbers between pages and page types of the same id</td>
</tr>
<tr>
<td valign="top" width="100">My Sidebar</td>
<td valign="top" width="100">my-sidebar</td>
<td valign="top" width="150">my-sidebar</td>
<td valign="top" width="200">You can create “named sets” that will stay the same across all pages using it</td>
</tr>
<tr>
<td valign="top" width="100">My Localizable Sidebar</td>
<td valign="top" width="100">my-sidebar|%region%</td>
<td valign="top" width="150">my-sidebar|en-us</td>
<td valign="top" width="200">A localized version of the previous “named set”</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.najmanowicz.com/2009/01/08/webparts-based-sidebar-for-episerver-the-motivation-and-specification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix for EPiServer CMS5 interfering with your EPiServer 4</title>
		<link>http://blog.najmanowicz.com/2008/06/27/fix-for-episerver-cms5-interfering-with-your-episerver-4/</link>
		<comments>http://blog.najmanowicz.com/2008/06/27/fix-for-episerver-cms5-interfering-with-your-episerver-4/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 14:47:11 +0000</pubDate>
		<dc:creator>Adam Najmanowicz</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[EPiCode]]></category>
		<category><![CDATA[EPiServer]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web applications]]></category>

		<guid isPermaLink="false">http://blog.najmanowicz.com/2008/06/27/fix-for-episerver-cms5-interfering-with-your-episerver-4/</guid>
		<description><![CDATA[
The problem that can make a grown up man cry… 
You’re editing your EPiServer 4 project and suddenly the edit mode stops working. the server reports compilation errors. something along the lines:
Compiler error: CS0433: Type „EPiServer.Global” exists in „c:\WINDOWS\assembly\GAC_MSIL\EPiServer\5.1.422.122__8fe83dea738b45b7\EPiServer.dll” and „c:\WINDOWS\assembly\GAC\EPiServer\4.61.5.83__8fe83dea738b45b7\EPiServer.dll”

The solution is to go to your web.config and edit the compilation section. The section [...]]]></description>
			<content:encoded><![CDATA[</p>
<p>The problem that can make a grown up man cry… </p>
<p>You’re editing your EPiServer 4 project and suddenly the edit mode stops working. the server reports compilation errors. something along the lines:</p>
<blockquote><p>Compiler error: CS0433: Type „EPiServer.Global” exists in „c:\WINDOWS\assembly\GAC_MSIL\EPiServer\5.1.422.122__8fe83dea738b45b7\EPiServer.dll” and „c:\WINDOWS\assembly\GAC\EPiServer\4.61.5.83__8fe83dea738b45b7\EPiServer.dll”</p>
</blockquote>
<p>The solution is to go to your web.config and edit the compilation section. The section will most probably look something like this:</p>
<pre>
<div style="font-size: 8pt; background: white; color: black; font-family: courier new"><span style="color: blue">&lt;</span><span style="color: #a31515">configuration</span><span style="color: blue">&gt;</span>
<span style="color: blue">  &lt;</span><span style="color: #a31515">system.web</span><span style="color: blue">&gt;</span>
<span style="color: blue">    &lt;</span><span style="color: #a31515">compilation</span><span style="color: blue"> </span><span style="color: red">defaultLanguage</span><span style="color: blue">=</span>&quot;<span style="color: blue">c#</span>&quot;<span style="color: blue"> </span><span style="color: red">debug</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot;<span style="color: blue">&gt;</span>
<span style="color: blue">      &lt;</span><span style="color: #a31515">assemblies</span><span style="color: blue">&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">EPiServer, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8FE83DEA738B45B7</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">EPiServer.BaseLibrary, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8FE83DEA738B45B7</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">EPiServer.Configuration, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8FE83DEA738B45B7</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">EPiServer.Implementation, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8FE83DEA738B45B7</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">EPiServer.XForms, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8FE83DEA738B45B7</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">EPiServer.Events, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8FE83DEA738B45B7</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">EPiServer.Lucene, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8FE83DEA738B45B7</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">ElektroPost.Licensing, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8FE83DEA738B45B7</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">EPiServer.Wsrp, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8FE83DEA738B45B7</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">EPiServer.WebParts, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8FE83DEA738B45B7</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">EPiServer.UI, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8FE83DEA738B45B7</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">EPiServer.Web.WebControls, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8FE83DEA738B45B7</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">      &lt;/</span><span style="color: #a31515">assemblies</span><span style="color: blue">&gt;</span>
<span style="color: blue">    &lt;/</span><span style="color: #a31515">compilation</span><span style="color: blue">&gt;</span>
<span style="color: blue">  &lt;/</span><span style="color: #a31515">system.web</span><span style="color: blue">&gt;                  </span>
<span style="color: blue">&lt;/</span><span style="color: #a31515">configuration</span><span style="color: blue">&gt;    </span>
</div>
</pre>
<p>in my case only the 4th line referencing the EPiServer.dll was interfering with the editing working, but this can easily be trimmed to only first 3 options, so once you&#8217;re done with removing CMS5 entries it could look something like:</p>
<pre>
<div style="font-size: 8pt; background: white; color: black; font-family: courier new"><span style="color: blue">&lt;</span><span style="color: #a31515">configuration</span><span style="color: blue">&gt;</span>
<span style="color: blue">  &lt;</span><span style="color: #a31515">system.web</span><span style="color: blue">&gt;</span>
<span style="color: blue">    &lt;</span><span style="color: #a31515">compilation</span><span style="color: blue"> </span><span style="color: red">defaultLanguage</span><span style="color: blue">=</span>&quot;<span style="color: blue">c#</span>&quot;<span style="color: blue"> </span><span style="color: red">debug</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot;<span style="color: blue">&gt;</span>
<span style="color: blue">      &lt;</span><span style="color: #a31515">assemblies</span><span style="color: blue">&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">        &lt;</span><span style="color: #a31515">add</span><span style="color: blue"> </span><span style="color: red">assembly</span><span style="color: blue">=</span>&quot;<span style="color: blue">System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35</span>&quot;<span style="color: blue">/&gt;</span>
<span style="color: blue">      &lt;/</span><span style="color: #a31515">assemblies</span><span style="color: blue">&gt;</span>
<span style="color: blue">    &lt;/</span><span style="color: #a31515">compilation</span><span style="color: blue">&gt;</span>
<span style="color: blue">  &lt;/</span><span style="color: #a31515">system.web</span><span style="color: blue">&gt;                  </span>
<span style="color: blue">&lt;/</span><span style="color: #a31515">configuration</span><span style="color: blue">&gt;    </span>
</div>
</pre>
<p>The root of the problem supposedly lies in EPiServer SDK integrated with Visual Studio and it’s Visual Studio that puts those lines there once you attempt to add a new element with one of its toolbars or use the Insert-&gt;New item… from File menu or context menu in Project Explorer.</p>
<p>Thanks to the guys on <a href="http://blog.najmanowicz.com/2007/05/08/epicode-hits-irc/">#epicode IRC channel</a> for helping out quickly with the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.najmanowicz.com/2008/06/27/fix-for-episerver-cms5-interfering-with-your-episerver-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
