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

<channel>
	<title>The Blog at Jumptree &#187; .NET</title>
	<atom:link href="http://blog.jumptree.com/index.php/category/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jumptree.com</link>
	<description>a guide to project management, business, coding and anything else that we can think of.</description>
	<lastBuildDate>Fri, 23 Jul 2010 15:55:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Installing Applications using Microsoft Platform Installer</title>
		<link>http://blog.jumptree.com/2010/installing-jumptree-using-microsoft-platform-installer/</link>
		<comments>http://blog.jumptree.com/2010/installing-jumptree-using-microsoft-platform-installer/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 19:23:10 +0000</pubDate>
		<dc:creator>Liming Xu</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Jumptree Project Tips]]></category>

		<guid isPermaLink="false">http://blog.jumptree.com/?p=168</guid>
		<description><![CDATA[Previously, we blogged about Microsoft Platform Installer (MS PI) and the few lessons we learned while packaging up Jumptree to be installable by MS PI. Since then, we had a few questions on how exactly do we use the MS PI GUI to install the package on IIS 7, today weâ€™ll walk&#160; you through it [...]]]></description>
			<content:encoded><![CDATA[<p>Previously, we blogged about Microsoft Platform Installer (MS PI) and<br />
the few lessons we learned while packaging up Jumptree to be installable by MS PI.    </p>
<p>Since then, we had a few questions on how exactly do we use the MS<br />
PI GUI to install the package on IIS 7, today weâ€™ll walk&#160; you through it<br />
and hopefully make it a little more easier.     </p>
<p><strong>Disclaimer:</strong> While Jumptree is compatible with Microsoft Platform Installer, itâ€™s not officially supported.</p>
<p>Before we get started, first make sure you created an empty database, in our case, we created an empty database called â€œV12SP1â€.</p>
<h2 style="width:588px">Step 1: Install Microsoft Platform Installer. </h2>
<h2 style="width:588px">Step 2: Open up your IIS Manager (Control Panel â€“&gt; Administrative Tools â€“&gt; IIS Manager)</h2>
<div class="screenshot" style="width:588px">
  	<img title="MSPI1" width="588" height="295"  src="http://blog.jumptree.com/wp-content/uploads/2010/01/WindowsLiveWriterInstallingJumptreeusingMicrosoftPlatform_12A6AMSPI1_thumb.png" />
</div>
<h2 style="width:588px">Step 3: Click on â€œImport Applicationâ€ Link on the right under â€œDeployâ€ Section and navigate to Jumptree release file </h2>
<blockquote>
<p>*Tips:&#160; Make sure you clicked on the â€œDefault Web Siteâ€ on the left panel or else, â€œDeployâ€ section wonâ€™t show up</p>
</blockquote>
<div class="screenshot" style="width:588px">
	<img title="MSPI1" width="588" height="295"  src="http://blog.jumptree.com/wp-content/uploads/2010/01/WindowsLiveWriterInstallingJumptreeusingMicrosoftPlatform_12A6AMSPI1_thumb.png" />
</div>
<div class="screenshot" style="width:588px">
  <img title="MSPI2"  width="588" height="429" alt="MSPI2" src="http://blog.jumptree.com/wp-content/uploads/2010/01/WindowsLiveWriterInstallingJumptreeusingMicrosoftPlatform_12A6AMSPI2_thumb.png" width="562" border="0" />
</div>
<h2 style="width:588px">Step 4: Select the Contents of the Package, use everything default </h2>
<div class="screenshot" style="width:588px">
	<img title="MSPI4" width="588" height="427" alt="MSPI4" src="http://blog.jumptree.com/wp-content/uploads/2010/01/WindowsLiveWriterInstallingJumptreeusingMicrosoftPlatform_12A6AMSPI4_thumb.png" width="562" border="0" />
</div>
<h2 style="width:588px">Step 5: Select a â€œDatabaseâ€ . (â€œUse Existing Databaseâ€)  </h2>
<div class="screenshot" style="width:588px">
	<img title="MSPI5" width="588" height="429" alt="MSPI5" src="http://blog.jumptree.com/wp-content/uploads/2010/01/WindowsLiveWriterInstallingJumptreeusingMicrosoftPlatform_12A6AMSPI5_thumb_1.png" width="562" border="0" />
</div>
<blockquote>
<p>
*Note: Use existing database is the safest&#160; and works both on SQL server 2000, 2005, and 2008. However, during our testing, for some reasons, â€œCreate New Databaseâ€ only works with 2005 and above. Does not work with Sql server 2000.
</p>
</blockquote>
<h2 style="width:588px">Step 6: Enter Application Package Information </h2>
<div class="screenshot" style="width:588px">
	<img title="MSPI6"  width="588" height="425" alt="MSPI6" src="http://blog.jumptree.com/wp-content/uploads/2010/01/WindowsLiveWriterInstallingJumptreeusingMicrosoftPlatform_12A6AMSPI6_thumb_1.png" width="562" border="0" />
</div>
<p>You can modify the values as needed such as the virtual directory name â€œJumptreeâ€. Your database IP address, database name, user name / password, etc. Just make sure your user name has the sufficient privileges to create tables, procedures and etc. (DB_Owner)</p>
<h2 style="width:588px">Step 7: Installation Progress and Summary </h2>
<div class="screenshot" style="width:588px">
<img title="MSPI7"  width="588"  height="450" alt="MSPI7" src="http://blog.jumptree.com/wp-content/uploads/2010/01/WindowsLiveWriterInstallingJumptreeusingMicrosoftPlatform_12A6AMSPI7_thumb.png" width="592" border="0" />
</div>
<h2 style="width:588px">Step 8: License file and Installer </h2>
<p>First, if you are an customer and you installed the purchased version, then please drop your license file into [Installation Directory]/APP_Data/ directory. </p>
<p>If you are installing a trial version, then you do not have to do the previous.</p>
<p>For security purpose, you need to disable the installer after itâ€™s done, so please open up web.config and find     </p>
<p><code><br />
&lt;add key=&quot;enableinstaller&quot; value=&quot;true&quot; /&gt;<br />
</code></p>
<p>and change it to    </p>
<p><code><br />
&lt;add key=&quot;enableinstaller&quot; value=&quot;false&quot; /&gt;<br />
</code></p>
<h2 style="width:588px">Step 9: Login </h2>
<p>If your virtual directory is /Jumptree, then go to     </p>
<p><a href="http://localhost/Jumptree/login.aspx">http://localhost/Jumptree/login.aspx</a></p>
<p>username/password : admin/admin    </p>
<p>Thanks and hope you have fun and be productive with Jumptree   </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jumptree.com/2010/installing-jumptree-using-microsoft-platform-installer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lessons Learned from Packaging our ASP.NET Application for the Microsoft Web Platform Installer</title>
		<link>http://blog.jumptree.com/2010/lessons-learned-mspi/</link>
		<comments>http://blog.jumptree.com/2010/lessons-learned-mspi/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 10:55:07 +0000</pubDate>
		<dc:creator>Liming Xu</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Jumptree Project Tips]]></category>

		<guid isPermaLink="false">http://blog.jumptree.com/?p=135</guid>
		<description><![CDATA[Disclaimer: While Jumptree Project is compatible with Microsoft Web Platform Installer, it&#8217;s not officially supported. In 2009, Microsoft released their Web Platform Installer. The Microsoft Web Platform Installer 2.0 (Web PI) is a free tool that makes getting the latest components of the Microsoft Web Platform, including Internet Information Services (IIS), SQL Server Express, .NET [...]]]></description>
			<content:encoded><![CDATA[<div class="tutorial">
<p><strong>Disclaimer:</strong> While Jumptree Project is compatible with Microsoft Web Platform Installer, it&#8217;s not officially supported.</p>
<p>In 2009, Microsoft released their <a href="http://www.microsoft.com/web/Downloads/platform.aspx">Web Platform Installer</a>.</p>
<blockquote><p>The Microsoft Web Platform Installer 2.0 (Web PI) is a free tool that makes getting the latest components of the Microsoft Web Platform, including Internet Information Services (IIS), SQL Server Express, .NET Framework and Visual Web Developer easy. The Web PI also makes it easy to install and run the most popular free web applications for blogging, content management and more with the built-in <a href="http://www.microsoft.com/web/gallery/">Windows Web Application Gallery</a>.</p></blockquote>
<p>By bundling all these components together, e.g. runtime, database, etc.,  it allows users to easily install and customize all the software they need to develop on a Windows machine.</p>
<p>Now Microsoft already has an excellent guide on how to <a href="http://learn.iis.net/page.aspx/578/package-an-application-for-the-windows-web-application-gallery/">package an application for the Windows Application Gallery</a>.</p>
<p>This guide should provide you with the necessary outline to make your application compatible with the Microsoft Platform Installer.</p>
<p><span id="more-135"></span></p>
<p>However we did run into a few issues, and so this tutorial will document some of the lessons we learned.</p>
<p>Now before we get started, you&#8217;ll want to keep the <a href="http://learn.iis.net/page.aspx/722/reference-for-the-web-application-package/">Web Application Package Reference</a> handy as it describes the details of the installer API tags.</p>
<h2 style="width:500px">The Basics</h2>
<p>The first thing you&#8217;ll realize after <a href="http://www.microsoft.com/web/Downloads/platform.aspx">downloading the Microsoft Web Platform Installer</a> (MS PI) is that your application package will simply be a .zip file.</p>
<p>In the zip file, you need two XML files to be created at the root of your application package to make it compatible with MS PI:</p>
<ol class="list">
<li>manifest.xml</li>
<li>parameters.xml</li>
</ol>
<p>Here&#8217;s how it looks in our Jumptree Project package:</p>
<div class="screenshot" style="width:500px"><img src="http://blog.jumptree.com/wp-content/uploads/2010/02-ms-web-installer/01-folder-structure.png" alt="Folder Structure" width="500" height="350" /></div>
<div class="tip">
<p><strong class="tipTag">Lesson #1:</strong> The structure is important.</p>
<p>The two configurations files have to be at the root&mdash;so that means when you unzip the package, it has to look like the folder structure in the above screenshot.</p>
<p>If there are additional folders on top it, it wonâ€™t work.</p>
<p>In addition, all your website files have to be organized into a folder located at the root, e.g. like our <strong>/Site_Install_Folder.</strong>
</div>
<h2 style="width:500px">Packaging</h2>
<p>Now let&#8217;s take a look at the configuration files.</p>
<p>First, <strong>manifest.xml</strong> is basically a configuration file describing the structure of your package: SQL scripts, permission, etc.</p>
<p>To create a basic package, start with a simple file that has,</p>
<pre><code>&lt;MSDeploy.iisApp&gt;
	&lt;iisApp path="Site_Install_Folder" /&gt;
&lt;/MSDeploy.iisApp&gt;</code></pre>
<div class="tip">
<p><strong class="tipTag">Lesson #2:</strong> Path=&quot;[Fold Name]&quot;</p>
<p>[Fold Name] can be any folder name that includes your web application, as long as the folder exists at the <strong>root of your package.</strong>
</div>
<p>If your package uses a database, then to make your SQL scripts executable by MS PI, simply add,</p>
<pre><code>&lt;dbfullsql path="install.sql" /&gt;</code></pre>
<p>to the <strong>mainifest.xml,</strong> where <strong>install.sql</strong> can be any SQL files you have.</p>
<p>For example, this is what we did for Jumptree Project,</p>
<pre><code>&lt;MSDeploy.iisApp&gt;
	&lt;iisApp path="Site_Install_Folder" /&gt;
	&lt;dbfullsql path="Site_Install_Folder/App_Data/SqlScripts/Membership.sql" transacted="false" /&gt;
	&lt;dbfullsql path="Site_Install_Folder/App_Data/SqlScripts/pmv1.2release.sql" transacted="false" /&gt;
	&lt;dbfullsql path="Site_Install_Folder/App_Data/SqlScripts/DefaultPerspectives.sql" transacted="false" /&gt;
	&lt;dbfullsql path="Site_Install_Folder/App_Data/SqlScripts/CustomizeFieldTyes.sql" transacted="false" /&gt;
	&lt;dbfullsql path="Site_Install_Folder/App_Data/SqlScripts/StarterKitDefaultUser.sql" /&gt;
&lt;/MSDeploy.iisApp&gt;</code></pre>
<div class="tip">
<p><strong class="tipTag">Lesson #3:</strong> If you have multiple scripts to be executed, then simply add them multiple times.</p>
<p>You don&#8217;t need to merge them into a single file.</p>
<p>In addition, we also learned that there&#8217;s a <code>transacted</code> attribute for your SQL scripts to wrap around a transaction if anything fails.</p>
<p>Since our scripts were coded with transactions in mind, we didn&#8217;t really need it.</p></div>
<p>Next, <strong>parameters.xml</strong> is simply a file with a list of parameters that the Web PI will use&mdash;or prompt the users for actions.</p>
<p>To configure your application to be automatically installed in a virtual directory, add the following <code>parameter</code> with the <code>parameterEntry</code> code,</p>
<pre><code>&lt;parameters&gt;
	&lt;parameter
		name = "AppPath"
		defaultValue = "Default Web Site/Jumptree"
		tags = "iisapp"
	&gt;
		&lt;parameterEntry
			type  = "ProviderPath"
			scope = "iisapp"
			match = "Site_Install_Folder"
		/&gt;
	&lt;/parameter&gt;
...</code></pre>
<div class="tip">
<p><strong class="tipTag">Lesson #4:</strong> On Parameters</p>
<p>First, the parameter <strong>name</strong> and <strong>tags</strong> attribute.</p>
<p>To be safe, use <code>AppPath</code> and <code>iisapp</code> as shown in the article.</p>
<p>As for â€˜the <strong>defaultValue</strong> attribute, <code>Default Web Site</code> is the only supported single-webiste on IIS 5.1 (and normally the same for others), so Iâ€™d recommend keeping that.</p>
<p>Second, the attribute <code>match</code> on <strong>paremeterEntry</strong> tag  needs to match what you had in <strong>manifest.xml.</strong></p>
<p>Recall earlier, we mentioned the <code>path=[Fold Name]</code> in the <strong>maninfest.xml?</strong></p>
<p>Well, thatâ€™s what it is. The <strong>[Fold Name]</strong>
</div>
<p>Now one last thing&#8230;</p>
<p>Previously, I mentioned that if you have SQL scripts that need to be executed, then list them in <strong>manifest.xml.</strong></p>
<p>Well to execute these scripts, MS PI needs to know the connection string used to connect to the database. And to do that, you&#8217;ll need to add the connection string parameter to <strong>parameters.xml,</strong></p>
<pre><code>lt;parameter
	name = "ConString1"
	defaultValue = "Server={dbServer};Database={dbName};uid={dbUsername};Pwd={dbUserPassword};"
	tags = "SQL, Hidden, SQLConnectionString, Validate"
&gt;
	&lt;parameterEntry
		type  = "ProviderPath"
		scope = "dbfullsql"
		match = "Membership.sql"
	/&gt;
&lt;/parameter&gt;</code></pre>
<div class="tip">
<p><strong class="tipTag">Lesson #5:</strong> It&#8217;s important for the parameter to have the tags <code>SQL, Hidden, SQLConnectionString</code></p>
<p>If you miss one of them, then it&#8217;ll behave really oddly. Originally, we didn&#8217;t have the <strong>SQL</strong> tag and it took us a few hours to figure out what went wrong.</p>
<p>Furthermore, if you have <strong>multiple SQL scripts,</strong> then you need to provide multiple parameters.</p>
<p>And make sure the <code>name</code> attribute is unique.
</div>
<h2 style="width:500px">Testing</h2>
<p>To prepare the package for testing, just zip up the folder with the <strong>manifest.xml</strong> and <strong>parameters.xml</strong> at its root.</p>
<p>If everything looks right and you still have problems getting MS PI to work, then something might be wrong with your zip file.</p>
<p>We had problems with IZArc, <a href="http://forums.iis.net/t/1161215.aspx">we posted on their forum here</a>  but <a href="http://www.7-zip.org/">7-Zip</a> and the Windows default zip utility worked fine.</p>
<p>If you&#8217;ve tested with the command line, then PLEASE retest it with the UI. Passing the command line test does NOT guarantee it&#8217;ll pass with the UI.  </p>
<div class="tip">
<p><strong class="tipTag">Lesson #6:</strong> Zip it up and use the Web PI UI to test instead of the command line.</p>
</div>
<p>There were a few occasions where we tested with the command line and everything passed and installed; however, when we tried again with the UI, it failed since in <strong>parameters.xml,</strong>, there are a few parameters  used by the UI (see Lesson #5).</p>
<h2 style="width:500px">IIS 7</h2>
<p>ASP.NET in IIS 7 runs in 2 modes: <strong>Integrated Mode</strong> and <strong>Classic Application Mode.</strong></p>
<div class="tip">
<p><strong class="tipTag">Lesson #7:</strong> By default, IIS 7 runs in <strong>Integrated Mode</strong> and there is a gotcha that requires attention.</p>
</div>
<p>If you get an error that looks like this,</p>
<pre><code>[HttpException (0x80004005): Request is not available in this context]
System.Web.HttpContext.get_Request() +8792912
Jumptree.Web.JumptreeBaseHttpModule.Init(HttpApplication httpapp) +45
System.Web.HttpApplication.InitModulesCommon() +65
System.Web.HttpApplication.InitIntegratedModules() +49
System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +729
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +298
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +363</code></pre>
<p>&#8230;that means your ASP.NET application initialization has been decoupled from the request that triggered it.</p>
<p>Go to <a href="http://mvolo.com/blogs/serverside/archive/2007/11/10/Integrated-mode-Request-is-not-available-in-this-context-in-Application_5F00_Start.aspx">this article for the solution</a>.</p>
<p>Edit: Please see the comment below by &#8220;Mike&#8221;. In addition, if you have httpmodules like we do in Jumptree, then please include the following structure in order to get it working on IIS 7</p>
<pre><code>

&lt;system.webServer&gt;

    &lt;!-- disable runtime rejection of Integrated mode applications that have legacy ASP.NET settings --&gt;
    &lt;validation validateIntegratedModeConfiguration="false" /&gt;
    &lt;modules&gt;
        &lt;add name="ProjectAccessModule" type="Jumptree.PM.Web.HttpModule.ProjectsHttpModule"/&gt;
	....
    &lt;/modules&gt;
 &lt;/system.webServer&gt;
</pre>
<p></code></p>
<p>And that's about it. I hope this article serves as a reference for you while packaging for MS PI.</p>
<p>If you want to see an example of this package in action, then <a href="http://jumptree.com/downloads.aspx">simply download our trial</a> and use MS PI to install it.</p>
</div>
<div class="best">
<p>Want a better way to manage projects and collaborate with your team?</p>
<p>Check out our <a href="http://www.jumptree.com/tour/screenshots/dashboard.aspx">Jumptree Project Management Software &raquo;</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.jumptree.com/2010/lessons-learned-mspi/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Active Directory And ASP.NET 2.0 Forms Authentication</title>
		<link>http://blog.jumptree.com/2008/active-directory-and-aspnet-forms-authentication/</link>
		<comments>http://blog.jumptree.com/2008/active-directory-and-aspnet-forms-authentication/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 06:34:12 +0000</pubDate>
		<dc:creator>Liming Xu</dc:creator>
				<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://blog.jumptree.com/2008/active-directory-and-aspnet-forms-authentication/</guid>
		<description><![CDATA[I don&#8217;t know if I&#8217;m just the minority among the ASP.NET developers, but for years, I&#8217;ve never had to deal with the Active Directory simply because most projects that I&#8217;ve done before were in hosting environments where Active Directory is a luxury to have. Things are different these days when it comes to support a [...]]]></description>
			<content:encoded><![CDATA[<div class="tutorial">
<p>I don&#8217;t know if I&#8217;m just the minority among the ASP.NET developers, but for years, I&#8217;ve never had to deal with the Active Directory simply because most projects that I&#8217;ve done before were in hosting environments where Active Directory is a luxury to have.</p>
<p>Things are different these days when it comes to support a product like <a href="http://www.jumptree.com/tour/screenshots/dashboard.aspx">Jumptree Project</a>. Lately, we&#8217;ve had quite a few inquires from companies and government agencies where Active Directory authentication is the norm, and such it&#8217;s essential for them to link the users in their system with Jumptree together.</p>
<p>So how does a developer&#8212;who is not a network admin guru&#8212;setup such an environment to develop against Active Directory?</p>
<p><strong>The Hardware</strong></p>
<ul class="list">
<li><strong>Machine A Windows 2000 Server</strong> &#8212; We will setup Active Directory here</li>
<li><strong>Machine B Windows XP Pro</strong> &#8212; This will be our client machine where ASP.NET 2.0 will be used to authenticate against the Active Directory</li>
<li><strong>Router</strong> &#8212; Connects Machine A and Machine B together.</li>
</ul>
<p><span id="more-25"></span></p>
<h2>Setting up Active Directory</h2>
<p><strong>Step 1:</strong> First you need to configure Active Directory.</p>
<p>Rather than reinvent the wheel, here&#8217;s a <a href="http://www.windowsnetworking.com/articles_tutorials/w2ksvrin.html">step-by-step instruction guide by Johannes Helmig</a> that you should follow. Just make sure you reboot the server (Machine A) when you are done.</p>
<p><strong>Step 2:</strong> Now to add a user account for our ASP.NET code later to test against. Go to <strong>Administrative Tools > Active Directory Users and Computers.</strong></p>
<p><strong id="domain-name">Step 3:</strong> Next, expand your domain name and then right-click <strong>New > User.</strong></p>
<div class="tip">
<p><strong>TIP:</strong> Copy down the name because you will need it for your ASP.NET Connection String, in my case, it&#8217;s <em>NEMOHome.com</em>.</p>
</div>
<p><strong>Step 4:</strong> The next screen will ask for your first name, last name, full name, user logon name and pre-windows 2000 logo name. Simply entering a name like John Smith or whatever suits your taste.</p>
<p><strong>Step 5:</strong> The last step is to create the password for this user account.</p>
<p>Just check the checkboxes <strong>User cannot change password</strong> and <strong>Password never expires</strong> for simplicity&#8217;s sake and click <strong>Finish</strong> when you are done.</p>
<p>That&#8217;s it for as far as setting up Active Directory goes. Let&#8217;s move onto our Machine B where the Windows XP Pro is.</p>
<h2>Configuring the client machine</h2>
<p><strong>Step 1:</strong> On Machine B, right-click the <strong>My Computer</strong> icon, select the <strong>Computer Name</strong> tab and click the <strong>Change</strong> button.</p>
<p><img src="http://blog.jumptree.com/uploads/2008/03/17/domain.png" alt="Change Domain" /></p>
<p>Click on the <strong>Domain</strong> radio box, and enter the <strong>Domain name</strong> that was <a href="#domain-name">mentioned in Step 3</a>. Click <strong>OK</strong> afterwards.</p>
<p>Now, you should have everything setup. Reboot the machine and when logging on enter the username that you added to the Active Directory using the domain that you setup earlier.</p>
<div class="note">
<p><strong>NOTE:</strong> For me, everything seemed to work at first. But after logging in, it started to hang&#8212;nothing was loading and the screen stayed frozen completely.</p>
<p>So I had do a hard reboot and use the local machine to log back in. </p>
<p>If that happens <strong>make sure you are using the servers IP and not the routers.</strong> </p>
<p>Open up your command prompt and do a <strong>ipconfig /all</strong> and take a look at your <strong>DNS IP Address</strong>.</p>
<p>In my case, originally, my DNS IP Address was pointed to the router and <strong>I had to change the DNS IP Address to the server to get it to work.</strong></p>
<p>To do that, first right-click on <strong>My Network Place</strong> and find your network card. Then right-click on its <strong>Properties</strong> and select <strong>Internet Protocol (TCP/IP).</strong></p>
<p>Then select <strong>Properties</strong> and on the bottom, change the <strong>DNS Address</strong> to your server. Click <strong>OK</strong> and reboot.</p>
</div>
<h2>ASP.NET 2.0 Active Directory with Forms Authentication</h2>
<p>When it comes down to it, the only tricky part about using forms authentication against Active Directory is about two configuration sections.</p>
<ol class="list">
<li>ConnectionString</li>
<li>Membership Configuration</li>
</ol>
<p>Here is a sample of my configuration and I&#8217;ll explain it afterwards:</p>
<pre><code>&lt;configuration&gt;
   &lt;appSettings/&gt;
   &lt;connectionStrings&gt;
      &lt;add
         name="ADConnectionString"
         connectionString= "LDAP://NEMOHome.com/CN=Users,DC=NEMOHome,DC=com"
      /&gt;
   &lt;/connectionStrings&gt;
   &lt;system.web&gt;
      &lt;compilation debug="false" /&gt;
      &lt;membership defaultProvider="MembershipADProvider"&gt;
         &lt;providers&gt;
            &lt;add
               name="MembershipADProvider"
               type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
               connectionStringName="ADConnectionString"
               connectionUsername="NEMOHome.com\liming.xu"
               connectionPassword="changeme"
            /&gt;
         &lt;/providers&gt;
      &lt;/membership&gt;
      &lt;authentication mode="Forms"&gt;
         &lt;forms name=".ASPNET" loginUrl="login.aspx" defaultUrl="protected/default.aspx" /&gt;
      &lt;/authentication&gt;
      &lt;authorization&gt;
         &lt;deny users="?" /&gt;
      &lt;/authorization&gt;
   &lt;/system.web&gt;
&lt;/configuration&gt;</code></pre>
<p>As you can see, the part around the <strong>Authentication</strong> and <strong>Authorization</strong> sections are nothing special, however pay attention to</p>
<p><strong>1. connectionStrings</strong></p>
<p>The syntax of Active Directory starts with <code>LDAP://</code> followed by the domain name that I <a href="#domain-name">mentioned earlier</a> in the article. <strong>It&#8217;s absolutely important for you to get the domain name right.</strong></p>
<p>The second important element is <code>CN=</code> which stands for <em>user container</em> and in my case it&#8217;s <code>Users</code> and the rest of the tokens <code>DC</code> are simply substrings of our domain name.</p>
<p><strong>2. Membership</strong></p>
<p>Now in the membership section, first use this provider:</p>
<pre><code>System.Web.Security.ActiveDirectoryMembershipProvider</code></pre>
<p>&#8230;then set the <code>connectionStringName</code> to the <strong>connectionString</strong>.</p>
<p>Also, the <code>connectionUsername</code> and <code>connectionPassword</code> I used is the account I setup earlier. I&#8217;ve seen others use a different user for this, but I&#8217;m too <del>lazy</del> <ins>efficient</ins>, so I just used the one I created before.</p>
<blockquote><p>When the <strong>ActiveDirectoryMembership</strong> provider connects to Active Directory, it uses the account whose credentials are specified on the <strong>connectionUsername</strong> property (note the lower-case n, which is different from the <strong>connectionStringName</strong> property).</p>
<p>If you specify the <strong>connectionUsername</strong> property, you must also specify the <strong>connectionPassword</strong> property, otherwise an exception is thrown.</p>
<p>If you do not specify account credentials, Active Directory uses your ASP.NET Web applicationâ€™s process account.</p>
<p class="source">From <a href="http://msdn2.microsoft.com/en-us/library/ms998360.aspx">MSDN</a></p>
</blockquote>
<p>And that&#8217;s it. Go to your login page and log in as usual and you will see, everything works as expected. </p>
<div class="note"><strong>NOTE:</strong> By default, <strong>User.Identity.Name</strong> in this case equals to your login username. So your username in this case it&#8217;s <strong>user@domain.</strong></p>
<p>This is called the <strong>UPNs</strong> format. If you don&#8217;t like it and want to simply have the user type in their username without the domain, then in your membership configuration, add</p>
<pre><code>attributeMapUsername="sAMAccountName"</code></pre>
<p>This is called the SAM-Format.</p></div>
<h2>Conclusion</h2>
<p>Overall, not bad eh? Hope this guide helps those ASP.NET developers who are trying to get started with Active Directory. I&#8217;ve attached the test source files here for you, modify as you see fit.</p>
<p class="download"><a href="http://blog.jumptree.com/uploads/2008/03/17/ActiveDirectory.zip" class="file-zip">ActiveDirectory.zip (4 KB)</a></p>
<p>As of now, Jumptree Project Management does not yet support Active Directory authentication. It will be included however in the next v1.2 release.</p>
</div>
<div class="best">
<p>Want a better way to manage projects and collaborate with your team?</p>
<p>Check out our <a href="http://www.jumptree.com/tour/screenshots/dashboard.aspx">Jumptree Project Management Software &raquo;</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.jumptree.com/2008/active-directory-and-aspnet-forms-authentication/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why we chose ASP.NET to run our startup</title>
		<link>http://blog.jumptree.com/2007/why-we-chose-aspnet-to-run-our-startup/</link>
		<comments>http://blog.jumptree.com/2007/why-we-chose-aspnet-to-run-our-startup/#comments</comments>
		<pubDate>Tue, 18 Sep 2007 19:45:38 +0000</pubDate>
		<dc:creator>Liming Xu</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Business]]></category>

		<guid isPermaLink="false">http://blog.jumptree.com/2007/why-we-chose-aspnet-to-run-our-startup/</guid>
		<description><![CDATA[Sasha Sydoruk asks, &#8220;Where are all the cool startups that run on ASP.NET?&#8221; Well I&#8217;m not sure if we&#8217;re considered cool enough, but we choose ASP.NET over Java for a variety of reasons. ASP.NET is easier to setup and deploy Since Jumptree Project is download software, we needed to ensure that we could readily support [...]]]></description>
			<content:encoded><![CDATA[<p>Sasha Sydoruk asks, &#8220;<a href="http://www.sashasydoruk.com/2007/08/19/where-are-all-the-cool-startups-that-run-on-aspnet/">Where are all the cool startups that run on ASP.NET?</a>&#8221;</p>
<p>Well I&#8217;m not sure if we&#8217;re considered <em>cool</em> enough, but we choose ASP.NET over Java for a variety of reasons.</p>
<h2>ASP.NET is easier to setup and deploy</h2>
<p>Since Jumptree Project is download software, we needed to ensure that we could readily support our customer&#8217;s installation and deployment process.</p>
<p>Have you ever run into problems deploying a Java application and then having to spend hours going through your configuration files and resolving library conflicts? Fun!</p>
<p>Java may be multi-platform, but there are numerous middleware implementations of J2EE&#8212;each with its own quirks. So instead of spending time improving your application, you end up having to answer support calls on why your Tomcat application doesn&#8217;t work on IBM Websphere.</p>
<p>With .NET, the environment is pretty much standard&#8212;so it&#8217;s a lot easier for us to provide support.</p>
<p><span id="more-11"></span></p>
<h2>It&#8217;s easier to develop in ASP.NET because it&#8217;s just so RAD</h2>
<p>The .NET platform supports a vast array of libraries that makes a developer&#8217;s life a whole lot easier compared to traditional ASP and Java.</p>
<p>There are a few Java frameworks that stand out, like JSTL, JSF, Struts, Spring, etc., but to make them work together is a painful and convoluted process.</p>
<h2>ASP.NET isn&#8217;t that expensive</h2>
<p>Yes, Java is free. Java Editor Eclipse is free. Java runtime is free. Apache/Tomcat web/servlet server is free.</p>
<p>Free is good.</p>
<p>And this may be the biggest reason why a lot of startups choose something other than .NET.</p>
<p>However, for <strong>US $375</strong> you can join the <a href="https://partner.microsoft.com/40011351">Microsoft Empower for ISVs</a> program and get a whole lotta software, including Visual Studio, Windows Server, SQL Server, Office, MSDN Premium Subscription&#8230;</p>
<p>Of course $375 vs. Free isn&#8217;t really much of a fight, but do consider the hidden costs&#8212;like how much easier it is to setup a .NET environment.</p>
<h2>Great community support</h2>
<p>There are a lot of great .NET blogs and resources such as <a href="http://www.codeproject.com/">The Code Project</a>, <a href="http://4guysfromrolla.com/">4 Guys From Rolla</a>, <a href="http://www.netfx3.com/">NetFx3</a>, and <a href="http://www.codeplex.com/">CodePlex</a>&#8212;a site hosting open source projects.</p>
<p>And if you run into any problems, just check out the <a href="http://forums.asp.net/ ">asp.net forum</a> where Microsoft actually has employees answering your questions! Gotta love it when a multi-billion dollar company is trying to promote something&#8230;</p>
<h2>One platform, multi-language</h2>
<p>What happens if your C# developer decides to leave halfway through a project?</p>
<p>Don&#8217;t worry because you can just as readily hire a VB.NET developer to continue the work because the .NET platform can interpret both languages.</p>
<p>And if you don&#8217;t like C# or VB.NET go ahead and try <a href="http://www.ironruby.net/">Ruby</a> or <a href="http://www.codeplex.com/IronPython">Python</a>.</p>
<h2>The whole product</h2>
<p>In <a href="http://www.amazon.com/dp/0060517123/?tag=jumptree-20">Crossing the Chasm</a>, Geoffrey A. Moore describes the concept of the whole product:</p>
<blockquote>
<p>The concept is very straightforward: There is a gap between the marketing promise made to the customerâ€”the compelling value propositionâ€”and the ability of the shipped product to fulfill that promise. For that gap to be overcome, the product must be augmented by a variety of services and ancillary products to become the whole product.</p>
<p class="source">Page 108, 2002 Edition</p>
</blockquote>
<p>Essentially, the whole product is the sum of the product plus anything else that might benefit the customer, such as technical support, add-ons, and system integration.</p>
<p>So by choosing .NET, we can leverage all the work that Microsoft has done to promote it. And when the time comes, we can more easily integrate our project management software with popular Microsoft products, like Outlook, Excel, and SharePoint.</p>
<h2>What are you good at?</h2>
<p>Ultimately, you should choose a language that you are familiar with and good at. I could have spent time learning Ruby on Rails, PHP or any of the other trendy languages, but I just needed to get started.</p>
<p>And so when I had to choose between Java and .NET&#8212;well&#8230;that was an easy choice.</p>
<div class="best">
<p>Want a better way to manage projects and collaborate with your team?</p>
<p>Check out our <a href="http://www.jumptree.com/tour/screenshots/dashboard.aspx">Jumptree Project Management Software &raquo;</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.jumptree.com/2007/why-we-chose-aspnet-to-run-our-startup/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>
