<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>episerver &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/episerver/</link>
	<description>Feed of posts on WordPress.com tagged "episerver"</description>
	<pubDate>Sun, 27 Dec 2009 04:33:41 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Adding images using the Community API]]></title>
<link>http://jarlef.wordpress.com/2009/12/26/adding-images-using-the-community-api/</link>
<pubDate>Sat, 26 Dec 2009 22:00:30 +0000</pubDate>
<dc:creator>jarlef</dc:creator>
<guid>http://jarlef.wordpress.com/2009/12/26/adding-images-using-the-community-api/</guid>
<description><![CDATA[This is sequel post of the Using the EPiServer Community API outside IIS where I described how you c]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This is sequel post of the <a href="http://jarlef.wordpress.com/2009/12/11/using-the-episerver-community-framework-outside-iis/">Using the EPiServer Community API outside IIS</a> where I described how you can call the EPiServer CommunityAPI inside a standalone console application. This post will go a little further and show you how you can import images in the same maner.</p>
<p><strong><u>The issue</u></strong></p>
<p>In my atttempt to create a lot of users with attached my pages profiles i stumbled across a issue when adding portrait images. It turnes out that the ImageGallery module in the EPiServer Community Framework refers directly to the&#160; <strong>System.Web.Hosting.HostingEnvironment</strong>, instead of wrapping it inside a custom object as the EPiServer CMS does it with the <strong>EPiServer.Web.Hosting.GenericHostingEnvironment</strong> class. The HostingEnvironment is thereby not initialized and calls to e.g. <strong>HostingEnvironment.MapPath()</strong> will fail.</p>
<p><strong><u>The solution</u></strong></p>
<p>The only way around this is to create a fake web application context. I did not attempt to figure out this on my own, so I hoped somebody had done this before. After some searching i finally found a <a href="http://haacked.com/archive/2007/06/19/unit-tests-web-code-without-a-web-server-using-httpsimulator.aspx">nice hack onPhil Haack’s blog</a>. He have created a HttpSimulator class that is intended to be used when performing unit tests. The HttpSimulator sets private field values using reflection values in the same way i’ve injected the community configuration. </p>
<p>To enable adding images do the follwing:</p>
<ol>
<li>Download the <a href="http://haacked.com/code/HttpSimulator.zip">HttpSimulator</a> </li>
<li>Unzip and copy the following files into your console application
<ul>
<li>HttpSimulator.cs </li>
<li>ReflectionHelper.cs </li>
<li>SimulatedHttpRequest.cs </li>
</ul>
<ul><a href="http://jarlef.files.wordpress.com/2009/12/project.jpg"><img style="display:inline;border-width:0;" title="Project" border="0" alt="Project" src="http://jarlef.files.wordpress.com/2009/12/project_thumb.jpg?w=240&#038;h=191" width="240" height="191" /></a>&#160;</ul>
</li>
<li>Wrapp all of your community api calls inside the following code block </li>
</ol>
<pre style="overflow:scroll;" class="csharpcode"><span class="kwrd">using</span> (<span class="kwrd">new</span> Subtext.TestLibrary.HttpSimulator(<span class="str">&#34;/&#34;</span>, Directory.GetCurrentDirectory()).SimulateRequest())
{
<span class="rem">//your community api calls here</span>
}</pre>
<p>&#160;</p>
<p><strong>Example:</strong></p>
<p>The following example creates/gets a test user and creates a new new profile image for that user</p>
<pre style="overflow:scroll;" class="csharpcode"><span class="rem">//Create web application context + http context</span>
<span class="kwrd">using</span> (<span class="kwrd">new</span> Subtext.TestLibrary.HttpSimulator(<span class="str">&#34;/&#34;</span>, Directory.GetCurrentDirectory()).SimulateRequest())
{

    <span class="rem">//*******************************</span>
    <span class="rem">// Initializing the community api</span>
    <span class="rem">//*******************************</span>

    <span class="rem">//Read app config file</span>
    System.Configuration.Configuration config = <span class="kwrd">null</span>;
    config = System.Configuration.ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);

    <span class="rem">//Inject configuration into the EPiServer Common + EPiServer Community framework</span>
    Type type = <span class="kwrd">null</span>;
    FieldInfo field = <span class="kwrd">null</span>;

    type = <span class="kwrd">typeof</span>(EPiServer.Common.Configuration.EPiServerCommonSection);
    field = type.BaseType.GetField(<span class="str">&#34;m_config&#34;</span>, BindingFlags.Static &#124; BindingFlags.NonPublic);
    field.SetValue(<span class="kwrd">null</span>, config);

    type = <span class="kwrd">typeof</span>(EPiServer.Community.Configuration.EPiServerCommunitySection);
    field = type.BaseType.GetField(<span class="str">&#34;m_config&#34;</span>, BindingFlags.Static &#124; BindingFlags.NonPublic);
    field.SetValue(<span class="kwrd">null</span>, config);

    <span class="rem">//Initializing the framework                </span>
    EPiServer.Common.Web.Global.OnBeginRequest();

    <span class="kwrd">if</span> (EPiServer.Community.CommunitySystem.CurrentContext == <span class="kwrd">null</span>)
    {
        <span class="kwrd">throw</span> <span class="kwrd">new</span> Exception(<span class="str">&#34;The community context is not initialized&#34;</span>);
    }

    <span class="rem">//****************************</span>
    <span class="rem">// Using the community api</span>
    <span class="rem">//****************************</span>

    <span class="rem">//the test user to add a profile image</span>
    <span class="kwrd">string</span> username = <span class="str">&#34;TestUser&#34;</span>;

    <span class="rem">//try to find the test user</span>
    EPiServer.Common.Security.IUser user = EPiServer.Community.CommunitySystem.CurrentContext.DefaultSecurity.GetUserByUserName(username);

    <span class="kwrd">if</span> (user == <span class="kwrd">null</span>)
    {
        <span class="rem">//the test user was not found -&#62; lets create a new user</span>
        user = EPiServer.Community.CommunitySystem.CurrentContext.DefaultSecurity.NewUser;
        user.UserName = username;
        user.Alias = <span class="str">&#34;Java Developer&#34;</span>;
        user.GivenName = <span class="str">&#34;Test&#34;</span>;
        user.SurName = <span class="str">&#34;User&#34;</span>;
        user.PassWord = <span class="str">&#34;SomePassword123&#34;</span>;
        user.EMail = <span class="str">&#34;testuser@mysite.com&#34;</span>;
        user.BirthDate = <span class="kwrd">new</span> DateTime(1900, 1, 1);

        EPiServer.Common.Data.DatabaseHandler.RunInTransaction(<span class="kwrd">delegate</span>
           {
               <span class="rem">//This will create the user with mypage profile</span>
               user = EPiServer.Community.CommunitySystem.CurrentContext.DefaultSecurity.AddUser(user);
           });
    }

    <span class="rem">//Get hold of the users mypage profile</span>
    EPiServer.Community.MyPage.MyPage profile = EPiServer.Community.MyPage.MyPageHandler.GetMyPage(user);

    <span class="rem">//make the profile object writable</span>
    profile = (EPiServer.Community.MyPage.MyPage)profile.Clone();

    <span class="kwrd">if</span> (profile.Portrait == <span class="kwrd">null</span>)
    {
        <span class="rem">//the user profile does not have a image -&#62; lets add a new one</span>
        <span class="kwrd">string</span> imagePath = <span class="str">@&#34;Images\JavaDeveloper.jpg&#34;</span>;

        <span class="kwrd">using</span> (FileStream file = File.Open(imagePath, FileMode.Open))
        {
            EPiServer.Community.ImageGallery.Image portraitImage
                 = <span class="kwrd">new</span> EPiServer.Community.ImageGallery.Image(<span class="str">&#34;ProfileImage.jpg&#34;</span>,
                                                              <span class="str">&#34;A random java developer&#34;</span>,
                                                              file);

            portraitImage.PublishState = EPiServer.Common.Publishing.PublishState.Published;
            portraitImage.Uploader = profile.User;

            profile.Portrait = portraitImage;

            EPiServer.Common.Data.DatabaseHandler.RunInTransaction(<span class="kwrd">delegate</span>
            {
                EPiServer.Community.MyPage.MyPageHandler.UpdateMyPage(profile);
            });
        }
    }
}</pre>
<p>&#160;</p>
<p>And here is the end result:</p>
<p><a href="http://jarlef.files.wordpress.com/2009/12/profile.jpg"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="Profile" border="0" alt="Profile" src="http://jarlef.files.wordpress.com/2009/12/profile_thumb.jpg?w=567&#038;h=311" width="567" height="311" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Using the EPiServer Community API outside IIS]]></title>
<link>http://jarlef.wordpress.com/2009/12/11/using-the-episerver-community-framework-outside-iis/</link>
<pubDate>Fri, 11 Dec 2009 21:46:20 +0000</pubDate>
<dc:creator>jarlef</dc:creator>
<guid>http://jarlef.wordpress.com/2009/12/11/using-the-episerver-community-framework-outside-iis/</guid>
<description><![CDATA[I have recently come across a scenario where i had&#160; to migrate alot of data into EPiServer Comm]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I have recently come across a scenario where i had&#160; to migrate alot of data into EPiServer Community from a legacy system. Since there is quite of a lot of data that needed to be transfered from one system to another, the ideal solutions for us was to do this by code via a console app The console app exports data from the legacy system and inserts it into EPiServer Community by using the powerful community framework. This is however not as simple as it sounds. Here is a little howto on what you have to do to overcome this challenge. </p>
<p><u><strong></strong></u></p>
<p><u><strong>1. Creating a community/relate site</strong></u></p>
<p>Create a new site using the deployment center. This is the community site i want to import data into. In this example i have installed an relate site into the following directory c:\EPiServer\Sites\RelateDemo\Source\Web. Open the project file in the web folder in Visual Studio. Rename the <strong>EPiServer.Templates.RelatePlus</strong> to <strong>Web</strong>. Save the solution in by select the solution project in Visual studio and save it via File –&#62; Save as. Store it in the parent folder of the project (c:\EPiServer\Sites\RelateDemo\Source)</p>
<p><strong><u></u></strong></p>
<p><strong><u>2. Creating the console app</u></strong></p>
<p>Create a new console application by selecting the solution file –&#62; new project –&#62; console application. I called my console app <strong>MigrationTool</strong>. Set the console application as the startup project. The solution should now look similar to this: </p>
<table border="0" cellspacing="0" cellpadding="2" width="572">
<tbody>
<tr>
<td valign="top" width="200"><a href="http://jarlef.files.wordpress.com/2009/12/solution.jpg"><img style="display:inline;border-width:0;" title="Solution" border="0" alt="Solution" src="http://jarlef.files.wordpress.com/2009/12/solution_thumb.jpg?w=234&#038;h=244" width="234" height="244" /></a></td>
<td valign="top" width="370"><a href="http://jarlef.files.wordpress.com/2009/12/folderstructure.jpg"><img style="display:inline;border-width:0;" title="FolderStructure" border="0" alt="FolderStructure" src="http://jarlef.files.wordpress.com/2009/12/folderstructure_thumb.jpg?w=307&#038;h=169" width="307" height="169" /></a> </td>
</tr>
</tbody>
</table>
<p>Now you must add a bounch of references to the EPiServer Common Framework and THe EPiServer Community Framework. Simple right click the console app project (e.g <strong>MigrationTool)</strong>, then select<strong> add reference. </strong>Add all assemblies found in the following directories:</p>
<ul>
<li>C:\Program Files (x86)\EPiServer\CommonFramework\2.3.517.36\bin </li>
<li>C:\Program Files (x86)\EPiServer\Community\3.2.517.24\bin </li>
<p>   <u><strong></strong></u></ul>
<ul><u><strong></strong></u></ul>
<ul><u><strong>3. Reusing the community configuration</strong></u></ul>
<p>The goal of the console app is to use the community framework in the same matter as the RelatePlus templates does. This requires however a fair amount of configuration in the console apps app.config file and it would basicly look the same as the web.config of the Web project. Instead of creating a new config file for the console app, it would be better to reuse the copying the existing configuration from our web project. </p>
<p>Create a script that copies the config files from the web project by right clicking the the console project and select <strong>Properites </strong>and then select the <strong>Build events </strong>tab. Add the following script in the Post-Build events textbox</p>
<p><strong>xcopy &#34;$(SolutionDir)web\*.config&#34; &#34;$(TargetDir)&#34; /y /q /s      <br />copy $(TargetDir)web.config $(TargetPath).config /y</strong></p>
<p>Like this</p>
<p><a href="http://jarlef.files.wordpress.com/2009/12/script.jpg"><img style="display:inline;border-width:0;" title="Script" border="0" alt="Script" src="http://jarlef.files.wordpress.com/2009/12/script_thumb.jpg?w=439&#038;h=154" width="439" height="154" /></a> </p>
<p>Notice the last line of the script. It creates a file called <strong>MigrationTool.exe.config </strong>so that the console app can read the community configuration.</p>
<p>When you build the console app and click the ”don’t lie to me”-button you will notice the bin folder will now contain the following files:</p>
<p><a href="http://jarlef.files.wordpress.com/2009/12/copiedfiles.jpg"><img style="display:inline;border-width:0;" title="CopiedFiles" border="0" alt="CopiedFiles" src="http://jarlef.files.wordpress.com/2009/12/copiedfiles_thumb.jpg?w=288&#038;h=319" width="288" height="319" /></a> </p>
<p>You can now add some code uses the community framework in the console app. E.g fetching the default admin user via the community api:</p>
<pre class="csharpcode" style="overflow:scroll;"><span class="rem">//Using the community api</span>
EPiServer.Common.Security.IUser user = EPiServer.Community.CommunitySystem.CurrentContext.DefaultSecurity.GetUser(1);
Console.WriteLine(user.UserName);</pre>
<div>&#160;</div>
<div>Don’t be disapointed. It won’t run quite yet.</div>
<div>
  </div>
<p><strong><u></u></strong></p>
<p><strong><u>4. Initializing the Community Framework</u></strong></p>
<p>If you try to use any of the methods on the community api now you will get a horrible null reference exception since the community framework is not initialize. To work around this you need to trigger the community api to initialize. Add the following code above the code from the previous section:</p>
<pre class="csharpcode"><span class="rem">//Initializing the framework                </span>
EPiServer.Common.Web.Global.OnBeginRequest();</pre>
<p><strong><u>5. Mocking the HttpContext</u></strong></p>
<p>The console app will still not work. I digged far and deep into to the community api and i spoted that the api references a lot of HttpContext.Current. The most notable is the CachingHandler class that relies on the HttpContext.Current.Cache object. To work around this you need to mock the HttpContext. Add a reference to the <strong>System.Web.dll</strong> in the console app project and add the following code above the code from the previous sections&#160;&#160; </p>
<pre class="csharpcode"><span class="rem">//Mock HttpContext</span>
<span class="kwrd">string</span> fileName = <span class="str">&#34;default.aspx&#34;</span>;
<span class="kwrd">string</span> url = <span class="str">&#34;http://local.relatedemo.com&#34;</span>;
<span class="kwrd">string</span> queryString = <span class="kwrd">null</span>;

var sb = <span class="kwrd">new</span> StringBuilder();
var sw = <span class="kwrd">new</span> StringWriter(sb);
var request = <span class="kwrd">new</span> HttpRequest(fileName, url, queryString);
var response = <span class="kwrd">new</span> HttpResponse(sw);
var context = <span class="kwrd">new</span> HttpContext(request, response);
HttpContext.Current = context;</pre>
<p><strong><u></u></strong></p>
<p><strong><u>6. The Hack: Injecting the community configuration</u></strong></p>
<p>Oh no. Another problem. When running the application now it will throw the following exception:</p>
<p><em>The application relative virtual path &#8216;~/&#8217; is not allowed here.</em></p>
<p>It turnes out that the EPiServer Common Framework + EPiServer Community Framework assemblies is reading their configuration by using the the System.Web.Configuration.WebConfigurationManager and providing it with a relative path “~” which won’t work outside a web server environment. To avoid the configuration being read using the WebConfigurationMananger you need to inject the configuration into the framework classes yourself.</p>
<p>Add a reference to the <strong>System.configuration.dll</strong> and add the following code above the previous code. </p>
<pre class="csharpcode" style="overflow:scroll;"><span class="rem">//Read app config file</span>
System.Configuration.Configuration config = <span class="kwrd">null</span>;
config = System.Configuration.ConfigurationManager.OpenExeConfiguration(<span class="kwrd">typeof</span>(Program).Assembly.Location);

<span class="rem">//Inject configuration into the EPiServer Common + EPiServer Community framework</span>
Type type = <span class="kwrd">null</span>;
FieldInfo field = <span class="kwrd">null</span>;

type = <span class="kwrd">typeof</span>(EPiServer.Common.Configuration.EPiServerCommonSection);
field = type.BaseType.GetField(<span class="str">&#34;m_config&#34;</span>, BindingFlags.Static &#124; BindingFlags.NonPublic);
field.SetValue(<span class="kwrd">null</span>, config);

type = <span class="kwrd">typeof</span>(EPiServer.Community.Configuration.EPiServerCommunitySection);
field = type.BaseType.GetField(<span class="str">&#34;m_config&#34;</span>, BindingFlags.Static &#124; BindingFlags.NonPublic);
field.SetValue(<span class="kwrd">null</span>, config);</pre>
<p>This code reads the configuration from the <strong>MigrationTool.exe.config</strong> file and injects it into two private static fields deep inside the framework classes using reflection. The EPiServer Common Framework and the EPiServer Common Framework will hence detect the configuration has already been read verifying that the <strong>m_config</strong> is no longer null and WebConfigurationManager.OpenWebConfiguration(“~”) is never called <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong><u></u></strong></p>
<p><strong><u>7. The Happy Ending</u></strong></p>
<p>Finally. The code is working and the alias of the username of the admin is printed to the screen:</p>
<div>&#160;<a href="http://jarlef.files.wordpress.com/2009/12/happyending.jpg"><img style="display:inline;border-width:0;" title="HappyEnding" border="0" alt="HappyEnding" src="http://jarlef.files.wordpress.com/2009/12/happyending_thumb.jpg?w=223&#038;h=95" width="223" height="95" /></a></div>
<div>&#160;</div>
<div>Here is the complete source code for this examples:</div>
<div>&#160;</div>
<pre class="csharpcode" style="overflow:scroll;"><span class="rem">//Read app config file</span>
System.Configuration.Configuration config = <span class="kwrd">null</span>;
config = System.Configuration.ConfigurationManager.OpenExeConfiguration(<span class="kwrd">typeof</span>(Program).Assembly.Location);

<span class="rem">//Inject configuration into the EPiServer Common + EPiServer Community</span>
Type type = <span class="kwrd">null</span>;
FieldInfo field = <span class="kwrd">null</span>;

type = <span class="kwrd">typeof</span>(EPiServer.Common.Configuration.EPiServerCommonSection);
field = type.BaseType.GetField(<span class="str">&#34;m_config&#34;</span>, BindingFlags.Static &#124; BindingFlags.NonPublic);
field.SetValue(<span class="kwrd">null</span>, config);

type = <span class="kwrd">typeof</span>(EPiServer.Community.Configuration.EPiServerCommunitySection);
field = type.BaseType.GetField(<span class="str">&#34;m_config&#34;</span>, BindingFlags.Static &#124; BindingFlags.NonPublic);
field.SetValue(<span class="kwrd">null</span>, config);

<span class="rem">//Mock HttpContext</span>
<span class="kwrd">string</span> fileName = <span class="str">&#34;default.aspx&#34;</span>;
<span class="kwrd">string</span> url = <span class="str">&#34;http://local.relatedemo.com&#34;</span>;
<span class="kwrd">string</span> queryString = <span class="kwrd">null</span>;

var sb = <span class="kwrd">new</span> StringBuilder();
var sw = <span class="kwrd">new</span> StringWriter(sb);
var request = <span class="kwrd">new</span> HttpRequest(fileName, url, queryString);
var response = <span class="kwrd">new</span> HttpResponse(sw);
var context = <span class="kwrd">new</span> HttpContext(request, response);
HttpContext.Current = context;

<span class="rem">//Initializing the framework                </span>
EPiServer.Common.Web.Global.OnBeginRequest();

<span class="rem">//Using the community api</span>
EPiServer.Common.Security.IUser user = EPiServer.Community.CommunitySystem.CurrentContext.DefaultSecurity.GetUser(1);
Console.WriteLine(user.UserName);</pre>
<div>&#160;</div>
<p>Now you can create users (with belonging mypage), forum rooms, topics and threads etc. All inside a external non web application. </p>
<p>I hope that this hack is not needed in future releases of the EPiServer Community, but rater add more flexiblity to the framework like using IoC when reading configuration, cach etc so that these small but anoying dependencies can be finally be removed. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Behoven styr valet av CMS, eller?]]></title>
<link>http://pervikstrom.wordpress.com/2009/11/27/behoven-styr-valet-av-cms-eller/</link>
<pubDate>Fri, 27 Nov 2009 13:10:55 +0000</pubDate>
<dc:creator>Per Vikström</dc:creator>
<guid>http://pervikstrom.wordpress.com/2009/11/27/behoven-styr-valet-av-cms-eller/</guid>
<description><![CDATA[Diskussionerna kring publiceringssystem (content management system = CMS) gick heta när Kajeten disk]]></description>
<content:encoded><![CDATA[Diskussionerna kring publiceringssystem (content management system = CMS) gick heta när Kajeten disk]]></content:encoded>
</item>
<item>
<title><![CDATA[Vilket CMS väljer du?]]></title>
<link>http://pervikstrom.wordpress.com/2009/11/23/vilket-cms-valjer-du/</link>
<pubDate>Mon, 23 Nov 2009 10:32:07 +0000</pubDate>
<dc:creator>Per Vikström</dc:creator>
<guid>http://pervikstrom.wordpress.com/2009/11/23/vilket-cms-valjer-du/</guid>
<description><![CDATA[Det talas rätt mycket om content management system (CMS) i dessa dagar. Jag var inne och nuddade vid]]></description>
<content:encoded><![CDATA[Det talas rätt mycket om content management system (CMS) i dessa dagar. Jag var inne och nuddade vid]]></content:encoded>
</item>
<item>
<title><![CDATA[EpiChatty-EPiServer CMS gadget]]></title>
<link>http://yourdorn.wordpress.com/2009/11/18/epichatty-episerver-cms-gadget/</link>
<pubDate>Wed, 18 Nov 2009 17:26:03 +0000</pubDate>
<dc:creator>yourdorn</dc:creator>
<guid>http://yourdorn.wordpress.com/2009/11/18/epichatty-episerver-cms-gadget/</guid>
<description><![CDATA[Hi, here is my small contribution to the Gadget competition. Meet EpiChatty, your personal assistant]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Hi, here is my small contribution to the Gadget competition. Meet EpiChatty, your personal assistant (chat bot) that can give you help and information about EPiServer CMS. It could serve as a help desk assistant to EPiServer CMS editors / administrators / developers / designers and to content editors.</p>
<p>The main idea behind this is to have Google Talk client embedded as a gadget on dashboard and run EPiChatty as a console application which can interact with the user and give appropriate response.</p>
<p>Google Talk implements Extensible Messaging and Presence Protocol (XMPP) protocol which essentially exchange messages using XML between clients and servers. More information about this protocol can be found at <a title="http://xmpp.org/" href="http://xmpp.org/">http://xmpp.org/</a> and more information about Google Talk API can be found at <a title="http://code.google.com/apis/talk/" href="http://code.google.com/apis/talk/">http://code.google.com/apis/talk/</a></p>
<p>As Google do not provide any C# implementation of XMPP protocol and as I am primarily a C# developer,(not brave enough to try Google’s java based implementation for this <a href="http://code.google.com/appengine/docs/java/xmpp/overview.html" target="_blank">protocol</a>), so I have to look for different options. After bit more research,  I found out that <a href="http://www.ag-software.de/agsxmpp-sdk.html" target="_blank">agsXMPP</a> is an open source SDK / library for the XMPP protocol which is written in managed C# and is dedicated to .NET and Mono technologies. More information can be found about this SDK can be found at .</p>
<p>With all my components in place, I have learn basics about the new protocol (which I have never used before) and also use the SDK to implement it (easy).  It took a while to do a ‘hello world’ kind of code, as Google server require a different port (5222) than 80 to be open as well so that it could communicate. Once I figured that out with help from support team at <a href="http://www.ag-software.de/agsxmpp-sdk.html" target="_blank">agsXMPP</a>, next thing was to implement the automated behaviour for the asked questions.</p>
<p>There are several ways that this could be implemented, but I went for the XML based approach. I have stored questions and answers in a set patterned way so that if user ask ‘what is’ or ‘how to’ or any ‘generic’ question, a patterned would be matched and answer would be returned. The main reason behind this approach was its simplicity and extendibility.</p>
<p>Here is the screen shot how the EPiChatty gadget will look like on dashboard</p>
<p><a href="$epichatty_not_signed_in4.jpg"></a><a href="http://yourdorn.wordpress.com/files/2009/11/epichatty_not_signed_in.jpg"><img class="alignnone size-medium wp-image-7" title="epichatty not signed in" src="http://yourdorn.wordpress.com/files/2009/11/epichatty_not_signed_in.jpg?w=225" alt="" width="326" height="434" /></a></p>
<p>The gadget view contains embedded Google Talk client and the controller simply returns the view.  The login it will redirect to central Google account services where you could login and then it will return you back to the dashboard.</p>
<p><a href="http://yourdorn.wordpress.com/files/2009/11/epichatty_logged_in1.jpg"><img class="alignnone size-medium wp-image-10" title="epichatty_logged_in" src="http://yourdorn.wordpress.com/files/2009/11/epichatty_logged_in1.jpg?w=225" alt="" width="348" height="464" /></a></p>
<p>once login you can ask ‘what is’ or ‘how to’ or ‘generic’ questions</p>
<p><a href="$epichatty_logged_in4.jpg"></a><a href="http://yourdorn.wordpress.com/files/2009/11/epichatty_logged_in2.jpg"><img class="alignnone size-medium wp-image-9" title="epichatty_logged_in2" src="http://yourdorn.wordpress.com/files/2009/11/epichatty_logged_in2.jpg?w=225" alt="" width="336" height="448" /></a><br />
<a href="$epichatty_logged_in23.jpg"><br />
</a></p>
<p>Here is the screen shot of the console application showing that EPiChatty is available to chat</p>
<p><a href="$epichatty_console4.jpg"><br />
</a><a href="http://yourdorn.wordpress.com/files/2009/11/epichatty_console.jpg"><img class="alignnone size-medium wp-image-11" title="epichatty_console" src="http://yourdorn.wordpress.com/files/2009/11/epichatty_console.jpg?w=300" alt="" width="368" height="185" /></a></p>
<p>I have made the EPiChatty as a console application so that it could run separately from the main application as a light weight process in background. In case you want to start chatting and test it out, send an invite to <a href="mailto:epichatty@googlemail.com">epichatty@googlemail.com</a> . I will be hosting it till the end of December 2009 and then EPiChatty will be on long vacations.</p>
<p>Source files contain every thing apart from the password for the EPiChatty Google’s account. If you would like to host your own, you can create a new Google account and replace the username and password in console application and run the console application.</p>
<p><a href="http://cid-d07e913ed01d978e.skydrive.live.com/self.aspx/.Public/EpiChatty.zip">Source</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[EPiServer Extension methods, part 1 of many]]></title>
<link>http://thisisnothing.wordpress.com/2009/11/07/episerver-extension-methods-part-1-of-many/</link>
<pubDate>Sat, 07 Nov 2009 00:10:15 +0000</pubDate>
<dc:creator>hn</dc:creator>
<guid>http://thisisnothing.wordpress.com/2009/11/07/episerver-extension-methods-part-1-of-many/</guid>
<description><![CDATA[So Frederik Vig started a community project around EPiServer Extensions which I believe is a great i]]></description>
<content:encoded><![CDATA[So Frederik Vig started a community project around EPiServer Extensions which I believe is a great i]]></content:encoded>
</item>
<item>
<title><![CDATA[Beställarstöd i webbprojekt?]]></title>
<link>http://pervikstrom.wordpress.com/2009/11/05/bestallarstod-i-webbprojekt/</link>
<pubDate>Thu, 05 Nov 2009 11:20:09 +0000</pubDate>
<dc:creator>Per Vikström</dc:creator>
<guid>http://pervikstrom.wordpress.com/2009/11/05/bestallarstod-i-webbprojekt/</guid>
<description><![CDATA[Jag tycker att det allt oftare dyker upp frågor kring hur företag kan få stöd och hjälp kring webbpr]]></description>
<content:encoded><![CDATA[Jag tycker att det allt oftare dyker upp frågor kring hur företag kan få stöd och hjälp kring webbpr]]></content:encoded>
</item>
<item>
<title><![CDATA[Varför så få "varför" i webbprojekt och vad ska kunden göra på din sajt?]]></title>
<link>http://pervikstrom.wordpress.com/2009/11/03/varfor-sa-fa-varfor-i-webbprojekt-och-vad-ska-kunden-gora-pa-din-sajt/</link>
<pubDate>Tue, 03 Nov 2009 12:56:46 +0000</pubDate>
<dc:creator>Per Vikström</dc:creator>
<guid>http://pervikstrom.wordpress.com/2009/11/03/varfor-sa-fa-varfor-i-webbprojekt-och-vad-ska-kunden-gora-pa-din-sajt/</guid>
<description><![CDATA[Ett &#8220;vanligt&#8221; EPiServer-projekt under min tid på Getupdated innebar oftast att kunden vi]]></description>
<content:encoded><![CDATA[Ett &#8220;vanligt&#8221; EPiServer-projekt under min tid på Getupdated innebar oftast att kunden vi]]></content:encoded>
</item>
<item>
<title><![CDATA[De bästa kommunwebbarna]]></title>
<link>http://xites.wordpress.com/2009/11/01/de-basta-kommunwebbarna/</link>
<pubDate>Sun, 01 Nov 2009 15:24:56 +0000</pubDate>
<dc:creator>Xite</dc:creator>
<guid>http://xites.wordpress.com/2009/11/01/de-basta-kommunwebbarna/</guid>
<description><![CDATA[Sveriges Kommuner och Landsting, SKL har korat de bästa webbplatserna sett ur besökarnas ögon. Huddi]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Sveriges Kommuner och Landsting, SKL har korat de bästa webbplatserna sett ur besökarnas ögon. <a href="http://www.huddinge.se" target="_blank">Huddinge </a>och <a href="http://www.tyreso.se/" target="_blank">Tyresö </a>kom på delad förstaplats. Huddinge är utvecklad av <a href="http://www.extrude.se" target="_blank">Extrude Interactive </a>och Tyresö har skapats av <a href="http://www.avantime.se" target="_blank">Avantime</a>.<br />
Båda webbplatserna är baserade på publiceringssystemet <a href="http://www.episerver.se" target="_blank">EPiServer </a>CMS.</p>
<p>Testet gick i korthet ut på att besökaren så snabbt som möjligt skulle hitta olika typer av information.</p>
<p>Läs mer om testet hos <a href="http://www.skl.se/artikel.asp?C=406&#38;A=62359" target="_blank">SKL</a></p>
<p>Läs mer om <a href="http://www.episerver.extrude.se" target="_blank">EPiServer</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Integrera istället för att uppgradera?]]></title>
<link>http://soaintegration.wordpress.com/2009/10/29/integration-istallet-for-nytt-ekonomisystem/</link>
<pubDate>Thu, 29 Oct 2009 23:11:16 +0000</pubDate>
<dc:creator>andreaswallberg</dc:creator>
<guid>http://soaintegration.wordpress.com/2009/10/29/integration-istallet-for-nytt-ekonomisystem/</guid>
<description><![CDATA[Många företag har i dagens hårda klimat inte råd att ta en enorm investering på IT sidan för att kon]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Många företag har i dagens hårda klimat inte råd att ta en enorm investering på IT sidan för att konsolidera sina affärssystem. Argumenten för att konvertera tryter, och utmaningarna med projekten är stora. Det finns en stor risk att företaget går på knäna i samband med implementationen och resultatet blir inte alltid så bra som man tänkt sig.</p>
<p>Visst finns det lycksamma ERP implementationer, men det är alltför ofta man hör motsatsen.</p>
<p>Vad finns det då för alternativ om man sitter fast i ett standardsystem som inte har den funktionalitet man önskar?</p>
<p>Antingen kan man hantera lösningen i stödapplikationer som man utvecklar vid sidan om, använda standardiserade produkter som Microsoft Excel, eller Access, eller så kan man investera i en portal för sitt företag.</p>
<h2>Integration i desperation</h2>
<p>Genom att öppna tjänster ifrån ERP lösningen och tillhandahålla enklare lösningar som körs i en gemensam portal, ett intranät, på företaget får man möjligheten att utveckla ny funktionalitet ovanpå det gamla systemet, utan att behöva byta ut alltihop.</p>
<p>Det som behövs för att lösa problemet är först och främst en robust <a title="integrationsplattform" href="http://www.e-man.se/sv/Erbjudande/Integration/Plattform/" target="_self">integrationsplattform</a>, som stabilt och säkert exponerar tjänster ifrån ditt gamla ERP eller Ekonomisystem.</p>
<p>Ovanpå din integrationsplattform etablerar du sedan en applikationsmiljö som finns tillgänglig i hela organisationen, som är webbaserad och som kan enkelt och flexibelt tillhandahålla applikationer som är specifika för användarens ändamål.  Steget efter detta blir att verkligen knyta ihop delar av processer, så att användare i organisationen får ett gränssnitt för att göra sina uppgifter istället för att hantera flera olika system. Möjligheterna till kostnadsbesparing blir många!</p>
<h2>En tjänsterorienterad plattform kräver eftertanke</h2>
<p>Tjänsterna kan sedan användas i applikationer som utvecklats i till exempel Microsoft Sharepoint, EPiServer eller andra plattformar. Utmaningarna med en sån här typ av lösning är många; Med 2 större system och 10 mindre system där varje system exponerar tjänster eller involveras i utvecklingen så riskerar man redan i en sådan relativt liten miljö att få en hög tjänster som skall exponeras, versionshanteras, administreras och förvaltas med en ökad förvaltningskostnad som följd.</p>
<h2>Vill du ha hjälp med integrationsfrågor?</h2>
<p>Vi på e-man har lång erfarenhet av att spara pengar genom att effektivisera befintliga integrationslösningar samt göra dem anpassade för en allt mer krävande affärsverksamhet.<br />
Vi har <b><a href="http://www.e-man.se/sv/Erbjudande/Integration/">Integration</a></b> som vår expertis, och kan hjälpa till med allt från att ta fram en affärsanpassad <b><a href="http://www.e-man.se/sv/Erbjudande/Integration/Integrationsstrategi/">integrationsstrategi</a></b> till utvärdering av <b><a href="http://www.e-man.se/sv/Erbjudande/Integration/Plattform/">integrationsplattform</a></b> och tillhandahålla resurser för de stora plattformarna, exempelvis <b><a href="http://www.e-man.se/sv/Erbjudande/Integration/Plattform/BizTalk/">Biztalk</a></b> och <b><a href="http://www.e-man.se/sv/Erbjudande/Integration/Plattform/TIBCO/">TIBCO BusinessWorks</a></b></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Liveupdate PollGadget]]></title>
<link>http://swippen.wordpress.com/2009/10/22/liveupdate-pollgadget/</link>
<pubDate>Thu, 22 Oct 2009 11:41:08 +0000</pubDate>
<dc:creator>swippen</dc:creator>
<guid>http://swippen.wordpress.com/2009/10/22/liveupdate-pollgadget/</guid>
<description><![CDATA[Here come my contribution to the gadgets competition in the &#8220;Open gadgets 2009&#8243; category]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img class="alignnone size-full wp-image-65" title="The Liveupdate Poll Gadget" src="http://swippen.wordpress.com/files/2009/10/poll0.jpg" alt="The Liveupdate Poll Gadget" width="450" height="114" /></p>
<p>Here come my contribution to the gadgets competition in the &#8220;Open gadgets 2009&#8243; category. The gadget works with EPiServer XForm to get live results on a poll or question from the site. Meaning as people vote or answer your question on the site you can follow the result live on the dashboard. You can connect the gadget to any XForm and onthe XForm you can use any any field you wish to follow live. You also have the ability to turn off the live update if there is any performance issue or so. (I have tried to keep it pretty optimized so this will hopefully never be a problem). To configure the gadget you just use the edit menu on the gadget (The little arrow in the upper right corner of the gadget) and set its properties. This means you can have many of this gadgettype with different data working at the same time on the dashboard. It also only updates if there is any change in the data and never updates if the gadget is not visible (it is hidden on another tab or such).</p>
<p>Since I am very early with this gadget I give the possibility for others to see my code use parts of it to help with their development of the gadget. <strong>So I hope I get some competition credits for being early!!</strong> =)</p>
<h2>Functionality</h2>
<p>I will try to explain the functionality a little more in detail by explaining on how configure your own poll. Once the gadget is installed (see the installation instructions further down) you are now able to make your own polls.</p>
<p>First set up a new page (use the XForm page template or the demo) in the XForm properties create a new XForm and in this make sure you have a heading (and have &#8220;heading&#8221; as class since I currently search for this to be able to display heading in the gadget). Create a field like a radio or check boxes or what you like and note down what name you give it. Now save everything and view it in view mode. Should look something like this:</p>
<p><img class="alignnone size-full wp-image-61" title="Display of the poll in view mode" src="http://swippen.wordpress.com/files/2009/10/poll1.jpg" alt="Display of the poll in view mode" width="450" height="369" /></p>
<p>After this you go to the dashboard and add a new poll gadget. Edit the gadget and fill in the information. The pageId of your new page, the property name for the form (probably XForm if you use public templates) and the field name that you noted down earlier. Currently there is only 1 chart type (the pie chart).</p>
<p><img class="alignnone size-full wp-image-62" title="Configuration of the Poll gadget." src="http://swippen.wordpress.com/files/2009/10/configure1.jpg" alt="Configuration of the Poll gadget." width="450" height="223" /></p>
<p>Now save your settings and you should have a gadget with no data. So go to the page in view mode and do a few vote to get some data. And watch the magic.</p>
<p><img class="alignnone size-full wp-image-59" title="A view of the EPiServer Poll Gadget in action" src="http://swippen.wordpress.com/files/2009/10/view3.jpg" alt="A view of the EPiServer Poll Gadget in action" width="450" height="171" /></p>
<h2>Business Value</h2>
<p>I think the business value of this gadget is pretty high. I can see a lot of scenarios where you would like some fast responses to questions be it on an external site or an intranet. This gives the possibility to follow these live and take actions when needed. It also looks pretty cool on the dashboard which might help partners sell EPiServer to customers that like flashy things =)</p>
<h2>Technical Overview</h2>
<p>The Poll gadget uses <a title="Google Chart API" href="http://code.google.com/apis/chart/">Google chart API</a> as a graphical representation and renders the result as an image. This is the only external reference that is used in this gadget. The data comes as said from the XForms in EPiServer that uses data store as storage in EPiServer 6. The new data store should make these kinds of requests fast. The settings for the gadget is also stored in the new data store. The gadget also uses Linq to XML to get hold of the questions from the form XML. The ajaxrequest that is sent between the client and server to update the chart only send a small id to the server and gets json object with a link back.</p>
<h2>Installation Instructions</h2>
<ol>
<li>Follow the CTP2 installation instructions to install CTP2 <a title="CMS 6 CTP 2 install instructions" href="http://world.episerver.com/Documentation/Items/Installation-Instructions/EPiServer-CMS/Version-6/Installation-Instructions---EPiServer-CMS-6-CTP2/" target="_blank">CTP2 install instructions</a>. Also install Globalized public template content.</li>
<li>Open the poll zip file and extract the content of in into the public templates folder for your CTP2 site.</li>
<li>Convert the project file to MVC project. Info on how to do this you can find here: <a href="http://tednyberg.com/post/How-to-create-gadgets-for-EPiServer-6-using-ASPNET-MVC.aspx" target="_blank">How to create a gadget &#8211; By Ted Nyberg</a> Also do the step with web.config (adding the public template assembly).</li>
<li>Open the project in Visual Studio and include the 4 folders Content, Controllers, Models and Views to the project by right clicking and choose &#8220;Include in Project&#8221; on the folders.</li>
<li>Add reference to EPiServer.Shell, EPiServer.Data (found by browse to bin folder), system.web.mvc and system.runtime.serialization (found on the .NET tab).</li>
<li>Build the solution, go the the dashboard and you will see your poll gadget. (Even though it has no data yet, since you probably haven&#8217;t visited the demo page to use the Xform)</li>
</ol>
<p>Feel free to ask any questions about the installation and I will try to help and update this. (Sorry for not beeing the ultimate installer guy and making some cool installer).</p>
<p>Download the Code here: <a title="PollGadget Download" href="http://www.sockerbit.net/PollGadget.zip" target="_blank">Download</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ska du migrera din webbplats?]]></title>
<link>http://pervikstrom.wordpress.com/2009/10/15/ska-du-migrera-din-webbplats/</link>
<pubDate>Thu, 15 Oct 2009 20:55:27 +0000</pubDate>
<dc:creator>Per Vikström</dc:creator>
<guid>http://pervikstrom.wordpress.com/2009/10/15/ska-du-migrera-din-webbplats/</guid>
<description><![CDATA[Det är dags för en ny webbplats. Ny plattform. Ny design. Uppdatering. Ny systemversion. Oavsett vil]]></description>
<content:encoded><![CDATA[Det är dags för en ny webbplats. Ny plattform. Ny design. Uppdatering. Ny systemversion. Oavsett vil]]></content:encoded>
</item>
<item>
<title><![CDATA[Tips: Sharing episerver-projects between developers]]></title>
<link>http://jarlef.wordpress.com/2009/10/14/tips-sharing-episerver-projects-between-developers/</link>
<pubDate>Wed, 14 Oct 2009 21:49:00 +0000</pubDate>
<dc:creator>jarlef</dc:creator>
<guid>http://jarlef.wordpress.com/2009/10/14/tips-sharing-episerver-projects-between-developers/</guid>
<description><![CDATA[This is a little how-to on making it easier to share your episerver projects between multiple develo]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This is a little how-to on making it easier to share your episerver projects between multiple developers by making the location of the episerver resources more abstract.</p>
<p>1. Don’t use absolute file locations in your web.config. </p>
<p>Instead of pointing directly to the absolute file locations of your unified filesystem like:</p>
<ul>
<li>c:\EPiServer\VPP\MySite\Global </li>
<li>c:\EPiServer\VPP\MySite\PageFiles </li>
<li>c:\EPiServer\VPP\MySite\Documents </li>
</ul>
<p><font color="#000000">or even the episerver installation folder</font></p>
<ul>
<li>C:\Program Files (x86)\EPiServer\CMS\5.2.375.133\application\Util </li>
<li>C:\Program Files (x86)\EPiServer\CMS\5.2.375.133\application\UI </li>
<li>C:\Program Files (x86)\EPiServer\CMS\5.2.375.133\application\App_Themes\Default </li>
<li>C:\Program Files (x86)\EPiServer\CMS\5.2.375.133\application\WebServices </li>
</ul>
<p><font color="#000000">You should rater create local shares on the&#160; C<em>:\EPiServer\VPP\MySite</em> and the <em>C:\Program Files (x86)\EPiServer</em> folders. This helps you abstract the physical disk location of these resources. Some developers might need to store on a seperat disk than the c-drive and some developers might not have 64-bit machines and the episerver installation would be located under C:\Program Files\EPiServer instead of C:\Program Files (x86)\EPiServer. This is useful when dealing with a large web.config files that you would like to share through the source control.</font></p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="200"><a href="http://jarlef.files.wordpress.com/2009/10/screen11.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="Screen1" border="0" alt="Screen1" src="http://jarlef.files.wordpress.com/2009/10/screen1_thumb1.png?w=284&#038;h=303" width="284" height="303" /></a></td>
<td valign="top" width="200"><a href="http://jarlef.files.wordpress.com/2009/10/screen21.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="Screen2" border="0" alt="Screen2" src="http://jarlef.files.wordpress.com/2009/10/screen2_thumb1.png?w=257&#038;h=320" width="257" height="320" /></a></td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<blockquote><p>&#60;!—PageFiles folder –&#62;</p>
<p>&#60;add showInFileManager=&#34;false&#34; virtualName=&#34;Page Files&#34; virtualPath=&#34;~/PageFiles/&#34; bypassAccessCheck=&#34;false&#34; name=&#34;SitePageFiles&#34; type=&#34;EPiServer.Web.Hosting.VirtualPathVersioningProvider,EPiServer&#34; indexingServiceCatalog=&#34;Web&#34; physicalPath=&#34;\\127.0.0.1\MySite$\PageFiles&#34; /&#62;</p>
<p>&#60;!—Global folder &#8211;&#62;      </p>
<p>&#60;add showInFileManager=&#34;true&#34; virtualName=&#34;Global Files&#34; virtualPath=&#34;~/Global/&#34; bypassAccessCheck=&#34;false&#34; name=&#34;SiteGlobalFiles&#34; type=&#34;EPiServer.Web.Hosting.VirtualPathVersioningProvider,EPiServer&#34; indexingServiceCatalog=&#34;Web&#34; physicalPath=&#34;\\127.0.0.1\MySite$\Global&#34; /&#62;</p>
<p>&#60;!—Documents folder&#8211;&#62;</p>
<p>&#60;add showInFileManager=&#34;true&#34; virtualName=&#34;Documents&#34; virtualPath=&#34;~/Documents/&#34; bypassAccessCheck=&#34;false&#34; maxVersions=&#34;5&#34; name=&#34;SiteDocuments&#34; type=&#34;EPiServer.Web.Hosting.VirtualPathVersioningProvider,EPiServer&#34; physicalPath=&#34;\\127.0.0.1\MySite$\Documents&#34; /&#62;</p>
<p>&#60;!—EPiServer folders &#8211;&#62;</p>
<p>&#60;add name=&#34;UtilFiles&#34; virtualPath=&#34;~/Util/&#34; physicalPath=&#34;\\127.0.0.1\EPiServer$\CMS\5.2.375.133\application\Util&#34; type=&#34;EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider,EPiServer&#34; /&#62;      <br />&#60;add name=&#34;App_Themes_Default&#34; virtualPath=&#34;~/App_Themes/Default/&#34; physicalPath=&#34;\\127.0.0.1\EPiServer$\CMS\5.2.375.133\application\App_Themes\Default&#34; type=&#34;EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider,EPiServer&#34; /&#62;       <br />&#60;add name=&#34;WebServiceFiles&#34; virtualPath=&#34;~/WebServices/&#34; physicalPath=&#34;\\127.0.0.1\EPiServer$\CMS\5.2.375.133\application\WebServices&#34; type=&#34;EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider,EPiServer&#34; /&#62;       <br />&#60;add name=&#34;UI&#34; virtualPath=&#34;~/cms/&#34; physicalPath=&#34;\\127.0.0.1\EPiServer$\CMS\5.2.375.133\application\UI&#34; type=&#34;EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider,EPiServer&#34; /&#62;</p>
</blockquote>
<p>NB You might abstract the location of the “Global”, “PageFiles” and “Documents” even more by replacing the local machine mapping <a href="//\\127.0.0.1\"><em>\\127.0.0.1\</em></a>&#160; with a custom machine name. e.g&#160; <a href="//\\mysitefilesystem\"><em>\\mysitefilesystem\</em></a>. Then do a mapping to the wanted machine through c:\windows\system32\drivers\etc\host file. </p>
<p>2. Exclude the connectionStrings.config file from the source control</p>
<p>Some developers might want to use a local database and some might use a database stored on a shared location during the development process.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[EPiServer and MVC]]></title>
<link>http://fbrz.wordpress.com/2009/10/10/episerver-and-mvc/</link>
<pubDate>Sat, 10 Oct 2009 13:21:57 +0000</pubDate>
<dc:creator>Fabio</dc:creator>
<guid>http://fbrz.wordpress.com/2009/10/10/episerver-and-mvc/</guid>
<description><![CDATA[Thanks to the great work of Joel Abrahamsson (here his first stab at the solution) and a little more]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Thanks to the <a href="http://pagetypebuilder.codeplex.com/">great work</a> of Joel Abrahamsson (here <a href="http://joelabrahamsson.com/post/2009/07/29/A-first-stab-at-EPiServer-CMS-with-ASPNET-MVC-and-Page-Type-Builder.aspx">his first stab</a> at the solution)  and a little more prototyping, it looks like EPiServer and MVC can play together very well! Time to say goodbye to asp.net webforms templates on EPiServer?</p>
<p>At Syzygy, we got this working with EPiServer 5.2.375.236 (the latest production version), MVC 1.0 and recompiled versions of the PageTypeBuilder and Castle DynamicProxy2 assemblies (the reason for this was to solve trust exceptions when the code was running from IIS 7.5).</p>
<p>The trick to get the EPiServer Friendly URL rewriter to play nicely with MVC is to use custom MvcHandler and IControllerFactory implementations: a wild-card style route can be passed to the custom handler which then will be able to:</p>
<ul>
<li>find out from EPiServer the ID of the content item (from the friendly URL)</li>
<li>load the page data</li>
<li>read custom properties of the page data such as &#8220;ControllerName&#8221; and &#8220;ActionName&#8221;</li>
<li>forward the page data to the correct controller / action through our controller factory</li>
</ul>
<p>So, in our prototype, we implemented the custom MVC handler with the following code:</p>
<pre class="brush: csharp;">
		protected override void ProcessRequest(HttpContextBase httpContext)
		{
			var internalUrlBuilder = GetInternalUrl(httpContext.Request.RawUrl);
			var mvcPage = CurrentPageResolver.Instance.GetCurrentPage(internalUrlBuilder.QueryCollection[&#34;id&#34;] ?? string.Empty);
			var controllerName = mvcPage.ControllerName;
			var actionName = mvcPage.ActionName;

			RequestContext.RouteData.Values.Add(&#34;action&#34;, actionName);
			RequestContext.RouteData.Values.Add(&#34;controller&#34;, controllerName);

			RequestContext.RouteData.Values[&#34;data&#34;] = mvcPage;

			var controller = ControllerBuilder.Current.GetControllerFactory().CreateController(RequestContext, controllerName);
			controller.Execute(RequestContext);
		}
</pre>
<p>This code will intercept the request, convert the raw URL (as generated by the EPiServer Friendly URL rewriter) into the internal EPiServer URL, which will give us the ID of the content item (or, when in edit mode, the ID followed by an underscore and the version ID – i.e. &#8220;the slug&#8221;).</p>
<p>At this point, we can use any custom class to call the EPiServer DataFactory and get the PageData object. In our custom CurrentPageResolver class, the page data is cast to the base class for all our page types (MvcPageData), which contains information about the controller and the action to use for rendering.</p>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using EPiServer;
using EPiServer.Core;
using MvcCms.Bases;

namespace MvcCms.Utilities
{
    public class CurrentPageResolver
    {
        private static readonly CurrentPageResolver instance = new CurrentPageResolver();

        private CurrentPageResolver()
        {
        }

        public static CurrentPageResolver Instance
        {
            get { return instance; }
        }

        public MvcPageData GetCurrentPage(string id)
        {
            if (String.IsNullOrEmpty(id))
            {
                return GetHomePage();
            }

            return IsWorkPage(id) ?
                           GetWorkPage(id) : GetPage(id);
        }

        private static bool IsWorkPage(string id)
        {
            return id.Contains(&#34;_&#34;);
        }

        private static MvcPageData GetWorkPage(string slug)
        {
            PageData page = null;

            string[] splitSlug = slug.Split(new[] {'_'}, StringSplitOptions.RemoveEmptyEntries);

            int pageId;
            if (splitSlug.Length &#62; 1 &#38;&#38; int.TryParse(splitSlug[0], out pageId))
            {
                int workPageId;
                if (int.TryParse(splitSlug[1], out workPageId))
                {
                    var workPageReference = new PageReference(pageId, workPageId);
                    page = DataFactory.Instance.GetPage(workPageReference);
                }
            }

            return page as MvcPageData;
        }

        protected MvcPageData GetPage(string id)
        {
            int pageId;
            if (int.TryParse(id, out pageId))
            {
                var pageReference = new PageReference(pageId);
                return DataFactory.Instance.GetPage(pageReference) as MvcPageData;
            }

            return null;
        }

        public static MvcPageData GetHomePage()
        {
            return DataFactory.Instance.GetPage(PageReference.StartPage) as MvcPageData;
        }

        public List&#60;MvcPageData&#62; GetChildren()
        {
            return GetChildren(GetHomePage().PageLink);
        }

        public List&#60;MvcPageData&#62; GetChildren(PageReference parent)
        {
            PageDataCollection pages = DataFactory.Instance.GetChildren(parent);
            var list = new List&#60;MvcPageData&#62;(pages.Count);
            foreach (PageData page in pages)
            {
                list.Add(page as MvcPageData);
            }
            return list;
        }
    }
}
</pre>
<p>Our page type base (MvcPageData) class looks like this:</p>
<pre class="brush: csharp;">
using System.Collections.Generic;
using MvcCms.Utilities;
using PageTypeBuilder;

namespace MvcCms.Bases
{
    public abstract class MvcPageData : TypedPageData
    {
        public abstract string ControllerName { get; }
        public virtual string ActionName
        {
            get
            {
                return &#34;Index&#34;;
            }
        }

        public string PageUrlSegment
        {
            get { return this.GetPropertyValue(page =&#62; page.PageUrlSegment); }
        }

        public virtual List&#60;MvcPageData&#62; Children
        {
            get
            {
                if (PageLink == StartPage.PageLink)
                {
                    return new List&#60;MvcPageData&#62;(0);
                }

                return CurrentPageResolver.Instance.GetChildren(PageLink);
            }
        }

        public virtual List&#60;MvcPageData&#62; SiteLinks
        {
            get { return CurrentPageResolver.Instance.GetChildren(StartPage.PageLink); }
        }

        public MvcPageData StartPage
        {
            get { return CurrentPageResolver.GetHomePage(); }
        }
    }
}
</pre>
<p>The custom controller factory will use the information that is contained in the route data to create the correct controller from the available ones. Once the controller is created, this will again be able to use the MvcPageData available in the route data (through a custom model binder), and pass it to a view.</p>
<p>The last step would be to wire up all the work in the global.asax, ignoring the requests to edit, admin, util and app_themes URLs. </p>
<pre class="brush: csharp;">
		protected void Application_Start(Object sender, EventArgs e)
		{
			ControllerBuilder.Current.SetControllerFactory(new MvcControllerFactory());
			ModelBinders.Binders.Add(typeof (MvcPageData), new PageDataModelBinder());

			RegisterRoutes(RouteTable.Routes);
		}

		public static void RegisterRoutes(RouteCollection routes)
		{
			routes.IgnoreRoute(&#34;{resource}.axd/{*pathInfo}&#34;);
			routes.IgnoreRoute(&#34;cms/{*pathInfo}&#34;);
			routes.IgnoreRoute(&#34;util/{*pathInfo}&#34;);
			routes.IgnoreRoute(&#34;app_themes/{*pathInfo}&#34;);

			routes.Add(new Route(&#34;{*data}&#34;, new WildCardRouteHandler()));
		}
</pre>
<p>In order to get the <a href="http://cid-3d3c147d60da8c06.skydrive.live.com/self.aspx/.Public/EPiServer-Mvc.zip">solution</a> working, you&#8217;ll need to follow the instructions in the readme.txt file. Any problems, contact me.</p>
<p>Enjoy!</p>
<p>Fabio</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Investera utan att planera?]]></title>
<link>http://pervikstrom.wordpress.com/2009/10/08/investera-utan-att-planera/</link>
<pubDate>Thu, 08 Oct 2009 20:15:13 +0000</pubDate>
<dc:creator>Per Vikström</dc:creator>
<guid>http://pervikstrom.wordpress.com/2009/10/08/investera-utan-att-planera/</guid>
<description><![CDATA[Ibland önskar man att man inte har rätt i sina tankar/farhågor. Det jag skrev i &#8220;Hur använder ]]></description>
<content:encoded><![CDATA[Ibland önskar man att man inte har rätt i sina tankar/farhågor. Det jag skrev i &#8220;Hur använder ]]></content:encoded>
</item>
<item>
<title><![CDATA[Webben går före traditionell marknadsföring]]></title>
<link>http://kommunicera.wordpress.com/2009/10/02/webben-gar-fore-traditionell-marknadsforing/</link>
<pubDate>Fri, 02 Oct 2009 09:16:41 +0000</pubDate>
<dc:creator>Sofia</dc:creator>
<guid>http://kommunicera.wordpress.com/2009/10/02/webben-gar-fore-traditionell-marknadsforing/</guid>
<description><![CDATA[I kristider och lågkonjunkturer sparar företagen. De insatser som ändå görs måste vara kostnadseffek]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I kristider och lågkonjunkturer sparar företagen. De insatser som ändå görs måste vara kostnadseffektiva och kunna leverera mätbar effekt i form av siffror som går att presentera för att få vidare förtroende.</p>
<p>Trenden visar att webben är det media som går bäst. EpiServer har gjort en undersökning bland marknadschefer ang vad de tänker lägga sina marknadspengar framöver. &#8220;Fyra av tio företag kommer att öka investeringarna på sin sajt under det kommande året och tre av fyra ska investera i sajten året som kommer&#8221; (<a href="http://www.dagensmedia.se/nyheter/dig/article74083.ece" target="_blank">dagensmedia.se</a>).</p>
<p>Låter bra tycker jag som jobbar på just en webbyrå <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . Det jag ser som en av webbens största fördelar är att den är just kostnadseffektiv jämfört med exempelvis tryckt media. Dessutom går det att mäta sina investeringar på webben på ett helt annat sätt än annonser i tidningar etc. Med hjälp av webbanalyser och statistik kan man få fram exakta siffror på vad sin webbinvestering har gett för resultat i pengar. Helt otroligt, men ack så sant.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[tng söker nu ännu fler systemutvecklare till LBi]]></title>
<link>http://webbjobb.wordpress.com/2009/09/17/tng-soker-nu-annu-fler-systemutvecklare-till-lbi/</link>
<pubDate>Thu, 17 Sep 2009 18:26:03 +0000</pubDate>
<dc:creator>webbjobb</dc:creator>
<guid>http://webbjobb.wordpress.com/2009/09/17/tng-soker-nu-annu-fler-systemutvecklare-till-lbi/</guid>
<description><![CDATA[LBi (tidigare Framfab) är en av Världens ledande internetkonsulter med fokus på webbutveckling. Vi h]]></description>
<content:encoded><![CDATA[LBi (tidigare Framfab) är en av Världens ledande internetkonsulter med fokus på webbutveckling. Vi h]]></content:encoded>
</item>
<item>
<title><![CDATA[EPiServer Marketing Arena: Combo of CMS With Marketing and Sales Engine]]></title>
<link>http://irinaguseva.wordpress.com/2009/09/13/episerver-marketing-arena-combo-of-cms-with-marketing-and-sales-engine/</link>
<pubDate>Mon, 14 Sep 2009 00:44:08 +0000</pubDate>
<dc:creator>Irina  Guseva</dc:creator>
<guid>http://irinaguseva.wordpress.com/2009/09/13/episerver-marketing-arena-combo-of-cms-with-marketing-and-sales-engine/</guid>
<description><![CDATA[EPiServer, on its ongoing quest in &#8220;the new era of the Engaged Web,&#8221; has news for market]]></description>
<content:encoded><![CDATA[EPiServer, on its ongoing quest in &#8220;the new era of the Engaged Web,&#8221; has news for market]]></content:encoded>
</item>
<item>
<title><![CDATA[A quick comparsion between FindPagesWithCriteria and a recursive GetChildren]]></title>
<link>http://thisisnothing.wordpress.com/2009/08/27/a-quick-comparsion-between-findpageswithcriteria-and-a-recursive-getchildren/</link>
<pubDate>Thu, 27 Aug 2009 09:59:32 +0000</pubDate>
<dc:creator>hn</dc:creator>
<guid>http://thisisnothing.wordpress.com/2009/08/27/a-quick-comparsion-between-findpageswithcriteria-and-a-recursive-getchildren/</guid>
<description><![CDATA[On the project I&#8217;m working on at the moment there are plans to do a lot of page retrieving bas]]></description>
<content:encoded><![CDATA[On the project I&#8217;m working on at the moment there are plans to do a lot of page retrieving bas]]></content:encoded>
</item>
<item>
<title><![CDATA[EPiServer property settings in the Help text field ]]></title>
<link>http://thisisnothing.wordpress.com/2009/08/24/episerver-property-settings-in-the-help-text-field/</link>
<pubDate>Mon, 24 Aug 2009 06:17:05 +0000</pubDate>
<dc:creator>hn</dc:creator>
<guid>http://thisisnothing.wordpress.com/2009/08/24/episerver-property-settings-in-the-help-text-field/</guid>
<description><![CDATA[In one of my previous posts I listed a number of suggested improvements to the EPiServer property sy]]></description>
<content:encoded><![CDATA[In one of my previous posts I listed a number of suggested improvements to the EPiServer property sy]]></content:encoded>
</item>
<item>
<title><![CDATA[Lookup against postal register?]]></title>
<link>http://blog.brynildsen.com/2009/07/10/lookup-against-postal-register/</link>
<pubDate>Fri, 10 Jul 2009 15:20:45 +0000</pubDate>
<dc:creator>abrynildsen</dc:creator>
<guid>http://blog.brynildsen.com/2009/07/10/lookup-against-postal-register/</guid>
<description><![CDATA[In a customer project, I needed to do lookups against the Norwegian postal register. Normally, I hav]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In a customer project, I needed to do lookups against the Norwegian postal register. Normally, I have made a table in a SQL database or had an XML file that I have query against. This has created several problems, like to keep the register updated.    </p>
<p>GeoNames is geographical database available under a Creative Common attribution license. This data is accessible free of charge through a number of web services. One of the services you can query against is postal register for over 40+ countries. Send postal code and country code (<a href="http://www.iso.org/iso/english_country_names_and_code_elements">ISO-3166</a>), and get data like city, county, county number and postal code back.</p>
<p>I&#8217;ve created an interface to the webservice &#34;PostalCodeLookup&#34;. You find the code here : <a title="http://snipplr.com/view/16844/postal-code/" href="http://snipplr.com/view/16844/postal-code/">http://snipplr.com/view/16844/postal-code/</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[MembershipProvider - Importing old user-accounts]]></title>
<link>http://dandarache.wordpress.com/2009/07/06/membershipprovider-importing-old-user-accounts/</link>
<pubDate>Mon, 06 Jul 2009 07:43:00 +0000</pubDate>
<dc:creator>Dan Jansson</dc:creator>
<guid>http://dandarache.wordpress.com/2009/07/06/membershipprovider-importing-old-user-accounts/</guid>
<description><![CDATA[Recently i stumbled into a problem where I needed to import already existing user-accounts from an o]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Recently i stumbled into a problem where I needed to import already existing user-accounts from an old website into a new EPiServer website that was using the ASP.NET Membership-system. </p>
<p>The question was: </p>
<ul>
<li>How can you automatically create approximately 7,500 user-accounts in an easy way by using the ASP.NET Membership-system? </li>
<li>What are the requirements for doing this and is it possible to connect the newly created user-account with a certain role or several roles? </li>
<li>What about Profiles? Can you create the UserProfile as a part of the import-process? </li>
</ul>
<p>Well, after a little research i came up with the following solution: </p>
<ul>
<li>Create a Windows desktop-application (this is not a requirement, but it eases the development process) that uses the classes for the ASP.NET Mebership system. </li>
<li>Make sure the application can access the datasource for the old useraccounts; preferable a SQL Server database or some sort of datasource that is easy to extract data from. </li>
<li>Log every account that is imported even if the import failed in order to investigate the reason for the failure. </li>
</ul>
<p>Requirements:</p>
<ul>
<li>The passwords must be in clear-text in the datasource you are importing from. When the account is created in the ASP.NET Membership-system the password will be hashed/encrypted which means that you will not be able to read it in clear-text, so this is a one-way import process. </li>
</ul>
<p>The solution is quite simple and straightforward. A couple of methods and some configuration makes it possible to create <em>n</em> user-accounts from the old membership-system.</p>
<p><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://dandarache.files.wordpress.com/2009/07/image.png?w=204&#038;h=137" width="204" height="137" /> </p>
<p>The client application.</p>
<div style="border-bottom:gray 1px solid;border-left:gray 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:consolas, &#39;max-height:200px;font-size:8pt;overflow:auto;border-top:gray 1px solid;cursor:text;border-right:gray 1px solid;margin:20px 0 10px;padding:4px;">
<div style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;">
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   1:</span> <span style="color:#0000ff;">using</span> System;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   2:</span> <span style="color:#0000ff;">using</span> System.Collections.Generic;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   3:</span> <span style="color:#0000ff;">using</span> System.ComponentModel;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   4:</span> <span style="color:#0000ff;">using</span> System.Data;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   5:</span> <span style="color:#0000ff;">using</span> System.Drawing;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   6:</span> <span style="color:#0000ff;">using</span> System.Linq;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   7:</span> <span style="color:#0000ff;">using</span> System.Text;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   8:</span> <span style="color:#0000ff;">using</span> System.Windows.Forms;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   9:</span> <span style="color:#0000ff;">using</span> System.Web;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  10:</span> <span style="color:#0000ff;">using</span> System.Web.Profile;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  11:</span> <span style="color:#0000ff;">using</span> System.Web.Security;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  12:</span> <span style="color:#0000ff;">using</span> System.IO;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  13:</span>&#160; </pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  14:</span> <span style="color:#0000ff;">namespace</span> AccountConverter</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  15:</span> {</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  16:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">partial</span> <span style="color:#0000ff;">class</span> frmConvert : Form</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  17:</span>     {</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  18:</span>         <span style="color:#0000ff;">public</span> frmConvert()</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  19:</span>         {</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  20:</span>             InitializeComponent();</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  21:</span>         }</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  22:</span>&#160; </pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  23:</span>         <span style="color:#008000;">/// &#60;summary&#62;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  24:</span>         <span style="color:#008000;">/// Start the conversion process.</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  25:</span>         <span style="color:#008000;">/// &#60;/summary&#62;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  26:</span>         <span style="color:#008000;">/// &#60;param name=&#34;sender&#34;&#62;&#60;/param&#62;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  27:</span>         <span style="color:#008000;">/// &#60;param name=&#34;e&#34;&#62;&#60;/param&#62;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  28:</span>         <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">void</span> btConvert_Click(<span style="color:#0000ff;">object</span> sender, EventArgs e)</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  29:</span>         {</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  30:</span>             <span style="color:#008000;">// Get all active users </span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  31:</span>             List&#60;ConvertingCustomer&#62; oldAccounts = GetOldAccounts();</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  32:</span>&#160; </pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  33:</span>             progressBar1.Minimum = 0;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  34:</span>             progressBar1.Maximum = oldAccounts.Count();</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  35:</span>&#160; </pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  36:</span>             <span style="color:#008000;">// Iterate through all users that should be converted.</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  37:</span>             <span style="color:#0000ff;">int</span> i = 0;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  38:</span>             <span style="color:#0000ff;">foreach</span> (ConvertingCustomer account <span style="color:#0000ff;">in</span> oldAccounts)</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  39:</span>             {</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  40:</span>                 <span style="color:#008000;">// Set current rownumber</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  41:</span>                 i += 1;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  42:</span>&#160; </pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  43:</span>                 <span style="color:#0000ff;">try</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  44:</span>                 {</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  45:</span>                     <span style="color:#008000;">// Convert the current account</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  46:</span>                     CreateAccount(account);</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  47:</span>&#160; </pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  48:</span>                     <span style="color:#008000;">// Update the listbox with status for the current account</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  49:</span>                     UpdateListBox(i, <span style="color:#0000ff;">string</span>.Format(<span style="color:#006080;">&#34;SUCCESS: {0}\t{1}&#34;</span>,</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  50:</span>                         account.AccountNumber,</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  51:</span>                         account.UserName));</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  52:</span>&#160; </pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  53:</span>                     <span style="color:#008000;">// Log that the account was successfully converted</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  54:</span>                     Log(account.AccountNumber, ConvertStatus.SUCCESS.ToString(), <span style="color:#006080;">&#34;Account was successfully converted.&#34;</span>);</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  55:</span>                 }</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  56:</span>                 <span style="color:#0000ff;">catch</span> (Exception ex)</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  57:</span>                 {</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  58:</span>                     <span style="color:#008000;">// Update the listbox with status</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  59:</span>                     UpdateListBox(i, <span style="color:#0000ff;">string</span>.Format(<span style="color:#006080;">&#34;FAILED: {0}\t{1}\t{2}&#34;</span>,</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  60:</span>                         account.AccountNumber,</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  61:</span>                         account.UserName,</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  62:</span>                         ex.Message));</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  63:</span>&#160; </pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  64:</span>                     <span style="color:#008000;">// Log that the account could not be converted</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  65:</span>                     Log(account.AccountNumber, ConvertStatus.FAILED.ToString(), ex.Message);</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  66:</span>                 }</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  67:</span>&#160; </pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  68:</span>                 <span style="color:#008000;">// Update the progressbar</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  69:</span>                 progressBar1.Value = i;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  70:</span>                 progressBar1.Update();</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  71:</span>             }</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  72:</span>         }</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  73:</span>&#160; </pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  74:</span>         <span style="color:#008000;">/// &#60;summary&#62;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  75:</span>         <span style="color:#008000;">/// Convert a single account. Create a new account with the ASP.NET Membership-system, connect it to a certain role and create an user-profile.</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  76:</span>         <span style="color:#008000;">/// &#60;/summary&#62;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  77:</span>         <span style="color:#008000;">/// &#60;param name=&#34;convertingCustomer&#34;&#62;An object with necessary data for the customer to be converted.&#60;/param&#62;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  78:</span>         <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">void</span> CreateAccount(ConvertingCustomer convertingCustomer)</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  79:</span>         {</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  80:</span>             <span style="color:#008000;">// Create the User</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  81:</span>             MembershipUser mu = Membership.CreateUser(</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  82:</span>                 <span style="color:#0000ff;">string</span>.Format(<span style="color:#006080;">&#34;{0}{1}&#34;</span>, <span style="color:#006080;">&#34;TEST_&#34;</span>, convertingCustomer.UserName),</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  83:</span>                 convertingCustomer.Password,</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  84:</span>                 convertingCustomer.UserName);</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  85:</span>             mu.IsApproved = <span style="color:#0000ff;">true</span>;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  86:</span>&#160; </pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  87:</span>             <span style="color:#008000;">// Add the user to the Customers-role</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  88:</span>             Roles.AddUserToRoles(</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  89:</span>                 convertingCustomer.UserName,</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  90:</span>                 <span style="color:#0000ff;">new</span> <span style="color:#0000ff;">string</span>[] { <span style="color:#006080;">&#34;Customers&#34;</span> });</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  91:</span>&#160; </pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  92:</span>             <span style="color:#008000;">// Update the User-Profile</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  93:</span>             WebProfile webProfile = <span style="color:#0000ff;">new</span> WebProfile(WebProfile.Create(convertingCustomer.UserName));</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  94:</span>             webProfile.Email = convertingCustomer.UserName;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  95:</span>             webProfile.CustomerNumber = convertingCustomer.AccountNumber;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  96:</span>             <span style="color:#008000;">// ... add your own fields here</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  97:</span>             webProfile.Save();</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  98:</span>         }</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  99:</span>         </pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 100:</span>         <span style="color:#008000;">/// &#60;summary&#62;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 101:</span>         <span style="color:#008000;">/// Connect to a datasource and get data for the old accounts that is to be converted.</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 102:</span>         <span style="color:#008000;">/// &#60;/summary&#62;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 103:</span>         <span style="color:#008000;">/// &#60;returns&#62;&#60;/returns&#62;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 104:</span>         <span style="color:#0000ff;">private</span> List&#60;ConvertingCustomer&#62; GetOldAccounts()</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 105:</span>         {</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 106:</span>             <span style="color:#008000;">// Get old account-data.</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 107:</span>             <span style="color:#008000;">//var myOldAccounts = datasource.GetAccounts();</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 108:</span>&#160; </pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 109:</span>             <span style="color:#008000;">// Get accounts from datasource</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 110:</span>             <span style="color:#008000;">//var accountDataList = from account in myOldAccounts</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 111:</span>             <span style="color:#008000;">//                      select new ConvertingCustomer</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 112:</span>             <span style="color:#008000;">//                      {</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 113:</span>             <span style="color:#008000;">//                          AccountNumber = account.CustomerId,</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 114:</span>             <span style="color:#008000;">//                          UserName = account.UserName,</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 115:</span>             <span style="color:#008000;">//                          Password = account.Password</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 116:</span>             <span style="color:#008000;">//                      };</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 117:</span>             <span style="color:#008000;">//return accountDataList.ToList&#60;ConvertingCustomer&#62;(); </span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 118:</span>             </pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 119:</span>             <span style="color:#0000ff;">return</span> <span style="color:#0000ff;">new</span> List&#60;ConvertingCustomer&#62; </pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 120:</span>             {</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 121:</span>                 AccountNumber = <span style="color:#006080;">&#34;123456&#34;</span>,</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 122:</span>                 UserName = <span style="color:#006080;">&#34;TestUser@labs.com&#34;</span>,</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 123:</span>                 Password = <span style="color:#006080;">&#34;Pa$$w0rd&#34;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 124:</span>             }</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 125:</span>         }</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 126:</span>         </pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 127:</span>         <span style="color:#008000;">/// &#60;summary&#62;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 128:</span>         <span style="color:#008000;">/// Log the progress with the account conversion.</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 129:</span>         <span style="color:#008000;">/// &#60;/summary&#62;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 130:</span>         <span style="color:#008000;">/// &#60;param name=&#34;accountNumber&#34;&#62;The customers accountnumber in the backend.&#60;/param&#62;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 131:</span>         <span style="color:#008000;">/// &#60;param name=&#34;status&#34;&#62;Status of the progress.&#60;/param&#62;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 132:</span>         <span style="color:#008000;">/// &#60;param name=&#34;message&#34;&#62;An errormessage or a message with information about the conversion.&#60;/param&#62;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 133:</span>         <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">void</span> Log(<span style="color:#0000ff;">string</span> accountNumber, <span style="color:#0000ff;">string</span> status, <span style="color:#0000ff;">string</span> message)</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 134:</span>         {</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 135:</span>             <span style="color:#0000ff;">using</span> (StreamWriter sw = <span style="color:#0000ff;">new</span> StreamWriter(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, <span style="color:#006080;">&#34;convert.log&#34;</span>), <span style="color:#0000ff;">true</span>, Encoding.UTF8))</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 136:</span>             {</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 137:</span>                 sw.WriteLine(<span style="color:#006080;">&#34;{0}\t{1}\t{2}&#34;</span>, status, accountNumber, message);</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 138:</span>             }</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 139:</span>         }</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 140:</span>&#160; </pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 141:</span>         <span style="color:#008000;">/// &#60;summary&#62;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 142:</span>         <span style="color:#008000;">/// Update the ListBox in the GUI to display the progress.</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 143:</span>         <span style="color:#008000;">/// &#60;/summary&#62;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 144:</span>         <span style="color:#008000;">/// &#60;param name=&#34;recordNumber&#34;&#62;An integer with the rownumber of the account that was processed.&#60;/param&#62;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 145:</span>         <span style="color:#008000;">/// &#60;param name=&#34;message&#34;&#62;The resulting message from the conversion process.&#60;/param&#62;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 146:</span>         <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">void</span> UpdateListBox(<span style="color:#0000ff;">int</span> recordNumber, <span style="color:#0000ff;">string</span> message)</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 147:</span>         {</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 148:</span>             lbConvertProgress.Items.Insert(0, <span style="color:#0000ff;">string</span>.Format(<span style="color:#006080;">&#34;#{0} - {1}&#34;</span>, recordNumber, message));</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 149:</span>             lbConvertProgress.Update();</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 150:</span>         }</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 151:</span>         </pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 152:</span>         <span style="color:#008000;">/// &#60;summary&#62;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 153:</span>         <span style="color:#008000;">/// An internal class used to handle customer-data. </span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 154:</span>         <span style="color:#008000;">/// &#60;/summary&#62;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 155:</span>         <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">class</span> ConvertingCustomer</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 156:</span>         {</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 157:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> UserName;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 158:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> Password;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 159:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> AccountNumber;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 160:</span>         }</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 161:</span>         </pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 162:</span>         <span style="color:#008000;">/// &#60;summary&#62;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 163:</span>         <span style="color:#008000;">/// An enum with conversion-status.</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 164:</span>         <span style="color:#008000;">/// &#60;/summary&#62;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 165:</span>         <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">enum</span> ConvertStatus</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 166:</span>         {</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 167:</span>             SUCCESS,</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 168:</span>             FAILED</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 169:</span>         }</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 170:</span>&#160; </pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 171:</span>     }</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;"> 172:</span> }</pre>
</p></div>
</div>
<p>The App.Config-file. </p>
<div style="border-bottom:gray 1px solid;border-left:gray 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:consolas, &#39;max-height:200px;font-size:8pt;overflow:auto;border-top:gray 1px solid;cursor:text;border-right:gray 1px solid;margin:20px 0 10px;padding:4px;">
<div style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;">
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   1:</span> &#60;?xml version=<span style="color:#006080;">&#34;1.0&#34;</span> encoding=<span style="color:#006080;">&#34;utf-8&#34;</span> ?&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   2:</span> &#60;configuration&#62;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   3:</span>     &#60;connectionStrings&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   4:</span>         &#60;add name=<span style="color:#006080;">&#34;MyDataSourceConnectionString&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   5:</span>              connectionString=<span style="color:#006080;">&#34;Data Source=myDatabaseServer;Database=myDatabase;User Id=myDBUser;password=P@ssw0rd;Connection Timeout=30&#34;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   6:</span>              providerName=<span style="color:#006080;">&#34;System.Data.SqlClient&#34;</span> /&#62;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   7:</span>     &#60;/connectionStrings&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   8:</span>     &#60;system.web&#62;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   9:</span>         &#60;membership defaultProvider=<span style="color:#006080;">&#34;SqlServerMembershipProvider&#34;</span>&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  10:</span>             &#60;providers&#62;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  11:</span>                 &#60;clear/&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  12:</span>                 &#60;add name=<span style="color:#006080;">&#34;SqlServerMembershipProvider&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  13:</span>                      type=<span style="color:#006080;">&#34;System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&#34;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  14:</span>                      connectionStringName=<span style="color:#006080;">&#34;MyDataSourceConnectionString&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  15:</span>                      requiresQuestionAndAnswer=<span style="color:#006080;">&#34;false&#34;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  16:</span>                      applicationName=<span style="color:#006080;">&#34;MyWebApplication&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  17:</span>                      requiresUniqueEmail=<span style="color:#006080;">&#34;true&#34;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  18:</span>                      passwordFormat=<span style="color:#006080;">&#34;Hashed&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  19:</span>                      maxInvalidPasswordAttempts=<span style="color:#006080;">&#34;5&#34;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  20:</span>                      minRequiredPasswordLength=<span style="color:#006080;">&#34;6&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  21:</span>                      minRequiredNonalphanumericCharacters=<span style="color:#006080;">&#34;0&#34;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  22:</span>                      passwordAttemptWindow=<span style="color:#006080;">&#34;10&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  23:</span>                      passwordStrengthRegularExpression=<span style="color:#006080;">&#34;&#34;</span>/&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  24:</span>             &#60;/providers&#62;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  25:</span>         &#60;/membership&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  26:</span>         &#60;roleManager enabled=<span style="color:#006080;">&#34;true&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  27:</span>                      defaultProvider=<span style="color:#006080;">&#34;SqlServerRoleProvider&#34;</span>&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  28:</span>             &#60;providers&#62;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  29:</span>                 &#60;clear/&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  30:</span>                 &#60;add name=<span style="color:#006080;">&#34;SqlServerRoleProvider&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  31:</span>                      connectionStringName=<span style="color:#006080;">&#34;MyDataSourceConnectionString&#34;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  32:</span>                      applicationName=<span style="color:#006080;">&#34;MyWebApplication&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  33:</span>                      type=<span style="color:#006080;">&#34;System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&#34;</span>/&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  34:</span>             &#60;/providers&#62;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  35:</span>         &#60;/roleManager&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  36:</span>         &#60;profile enabled=<span style="color:#006080;">&#34;true&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  37:</span>                  defaultProvider=<span style="color:#006080;">&#34;SqlProfile&#34;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  38:</span>                  automaticSaveEnabled=<span style="color:#006080;">&#34;true&#34;</span>&#62;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  39:</span>             &#60;properties&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  40:</span>                 &#60;add name=<span style="color:#006080;">&#34;CustomerNumber&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  41:</span>                      type=<span style="color:#006080;">&#34;System.String&#34;</span>/&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  42:</span>                 &#60;add name=<span style="color:#006080;">&#34;Email&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  43:</span>                      type=<span style="color:#006080;">&#34;System.String&#34;</span>/&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  44:</span>                 &#60;add name=<span style="color:#006080;">&#34;Name&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  45:</span>                      type=<span style="color:#006080;">&#34;System.String&#34;</span>/&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  46:</span>                 &#60;add name=<span style="color:#006080;">&#34;Phone&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  47:</span>                      type=<span style="color:#006080;">&#34;System.String&#34;</span>/&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  48:</span>                 &#60;add name=<span style="color:#006080;">&#34;CellPhone&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  49:</span>                      type=<span style="color:#006080;">&#34;System.String&#34;</span>/&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  50:</span>             &#60;/properties&#62;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  51:</span>             &#60;providers&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  52:</span>                 &#60;clear/&#62;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  53:</span>                 &#60;add name=<span style="color:#006080;">&#34;SqlProfile&#34;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  54:</span>                      type=<span style="color:#006080;">&#34;System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&#34;</span></pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  55:</span>                      connectionStringName=<span style="color:#006080;">&#34;MyDataSourceConnectionString&#34;</span></pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  56:</span>                      applicationName=<span style="color:#006080;">&#34;MyWebApplication&#34;</span>/&#62;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  57:</span>             &#60;/providers&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  58:</span>         &#60;/profile&#62;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  59:</span>     &#60;/system.web&#62;</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  60:</span>     &#60;appSettings /&#62;</pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, &#39;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  61:</span> &#60;/configuration&#62;</pre>
</p></div>
</div>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c6698163-06a4-4c8d-a205-afa72ebe54f2" class="wlWriterEditableSmartContent">Technorati-taggar: <a href="http://technorati.com/tags/ASP.NET" rel="tag">ASP.NET</a>,<a href="http://technorati.com/tags/MembershipProvider" rel="tag">MembershipProvider</a>,<a href="http://technorati.com/tags/NET" rel="tag">NET</a></div>
</div>]]></content:encoded>
</item>

</channel>
</rss>
