<?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>My Distributed Life &#187; .NET</title>
	<atom:link href="http://mydistributedlife.com/category/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://mydistributedlife.com</link>
	<description>Musings of a Geek/Husband/Father</description>
	<lastBuildDate>Thu, 30 Apr 2015 05:11:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>Why Aren&#8217;t More Startups Using .NET?</title>
		<link>http://mydistributedlife.com/2010/03/why-arent-more-startups-using-net/</link>
		<comments>http://mydistributedlife.com/2010/03/why-arent-more-startups-using-net/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 03:50:18 +0000</pubDate>
		<dc:creator><![CDATA[Garett]]></dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Entrepreneur]]></category>

		<guid isPermaLink="false">http://mydistributedlife.com/?p=16</guid>
		<description><![CDATA[I&#8217;ve been reading the High Scalability blog quite a bit lately. After reading several articles over the past couple of weeks, I&#8217;m wondering where are all the web startups that are using the Microsoft stack? I believe .NET is a very productive platform on which a successful web-based product can be built, and I really ... <span class="more"><a class="more-link" href="http://mydistributedlife.com/2010/03/why-arent-more-startups-using-net/">[Read more...]</a></span>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been reading the <a href="http://highscalability.com/">High Scalability</a> blog quite a bit lately. After reading several articles over the past couple of weeks, I&#8217;m wondering where are all the web startups that are using the Microsoft stack? I believe .NET is a very productive platform on which a successful web-based product can be built, and I really like the C# programming language. I don&#8217;t consider&nbsp; myself a Microsoft fan boy, and in the past I&#8217;ve recommend and used open source technologies for a few startups that I&#8217;ve worked with. So, why aren&#8217;t more startups using .NET? Maybe they are out there, but not heavily advertised. A few notable exceptions include:</p>
<ul>
<li><a href="http://www.myspace.com/">MySpace</a> </li>
<li><a href="http://www.stackoverflow.com/">Stack Overflow</a> </li>
<li><a href="http://www.plentyoffish.com/">Plenty Of Fish</a> </li>
<li><a href="http://www.theport.com/">ThePort</a> </li>
</ul>
<p>One issue that seems to always be raised is the cost of Microsoft&#8217;s SQL Server, especially as one begins to scale out. If your strategy is to scale up by purchasing bigger hardware, then the cost may be fine, but as you begin to scale out, the costs can go significantly higher. So, for a start-up, who more than likely has very little money, this is not going to be a viable option. </p>
<p>Microsoft has attempted to address this issue by creating the <a href="http://www.microsoft.com/BizSpark/">BizSpark</a> program, where a startup can use their software virtually free of charge for up to three years. At the end of the program you would pay a small fee, and purchase the production licenses for software that you will continue to use. The assumption that seems to be made here is that after the three year period a company will be generating enough revenue to afford the licenses. This is a step in the right direction, but after the three year period you still have to potentially fork out a large sum of money.&nbsp; </p>
<p>Given theses choices I can understand why most startups shy away from using the Microsoft stack. However, I&#8217;ve been looking at it more seriously, and I&#8217;m wondering if you could replace the more costly pieces of the stack with another suitable option, then would it become more attractive. Specifically, what if you could replaced SQL Server with another open source database, like MySQL or PostgreSQL? It seems that these products have mature .NET support, so I can&#8217;t see why they wouldn&#8217;t be great choices to replace SQL Server. <a href="http://www.theport.com/">ThePort</a> indicates a similar strategy as they begin to look at scaling their application.</p>
</p>
<blockquote><p>However robust the cluster is, we&#8217;ve concluded that we will eventually have to move to a sharded architecture with MySQL. MS SQL licensing fees makes both continuing to enhance the cluster and scaling out to multiple machines prohibitive. </p></blockquote>
<p>Additionally, you have the <a href="http://www.microsoft.com/exPress/">express</a> versions of Visual Studio, which are more than capable. When combined with other open source tools like <a href="http://nant.sourceforge.net/">NAnt</a>, <a href="http://subversion.tigris.org/">Subversion</a>, <a href="http://www.nunit.org/">NUnit</a>, and <a href="http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET">CruiseControl.net</a>, I think you a have viable development platform for almost any application.</p>
<p>Obviously, I&#8217;m coming from a position that lacks the experience implementing such a solution, but as I begin to review potential options for new projects, this is one that I would have to seriously consider. </p>
<p>Here are a few resources for further reading on the subject: </p>
<ul>
<li><a href="http://highscalability.com/blog/2009/2/12/myspace-architecture.html">MySpace Architecture</a> </li>
<li><a href="http://highscalability.com/blog/2009/8/5/stack-overflow-architecture.html">Stack Overflow Architecture</a> </li>
<li><a href="http://highscalability.com/plentyoffish-architecture">Plenty Of Fish Architecture</a> </li>
<li><a href="http://highscalability.com/blog/2009/8/16/theport-network-architecture.html">ThePort Architecture</a> </li>
<li><a href="http://www.codinghorror.com/blog/2009/06/scaling-up-vs-scaling-out-hidden-costs.html">Scaling Up vs. Scaling Out: Hidden Costs</a> </li>
<li><a href="http://www.emadibrahim.com/2009/08/05/startup-asp-net-mvc-cloud-scale-deployment/">MVC, Cloud Scale &amp; Deployment</a> </li>
<li><a href="http://codebetter.com/blogs/karlseguin/archive/2009/10/22/migrating-to-postgresql-with-my-friend-nhibernate.aspx">Migrating to Postgresql with my friend NHibernate</a> </li>
<li><a href="http://weblogs.asp.net/astopford/archive/2007/09/05/is-asp-net-good-enough-for-startup-s.aspx">Is ASP.NET good enough for startup&#8217;s</a> </li>
<li><a href="http://dimebrain.com/2008/04/five-recommenda.html">Six recommendations for starting a startup with ASP.NET</a> </li>
<li><a href="http://blog.jumptree.com/2007/why-we-chose-aspnet-to-run-our-startup/">Why we chose ASP.NET to run our startup</a> </li>
<li><a href="http://www.xconomy.com/seattle/2009/05/11/how-microsoft-bizspark-is-doing-with-startups-and-how-it-can-do-better/">How Microsoft BizSpark Is Doing With Startups</a> </li>
<li><a href="http://www.microsoftstartupzone.com/">Microsoft Startup Zone</a> </li>
</ul>
<p>I would love to hear opinions on this. </p>
<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/d51bee23-1076-41d0-9da8-6d9c66a76562/" title="Reblog this post [with Zemanta]"><img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=d51bee23-1076-41d0-9da8-6d9c66a76562" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://mydistributedlife.com/2010/03/why-arent-more-startups-using-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retrieve the BizTalk Installation Path From the Registry</title>
		<link>http://mydistributedlife.com/2010/02/retrieve-the-biztalk-installation-path-from-the-registry/</link>
		<comments>http://mydistributedlife.com/2010/02/retrieve-the-biztalk-installation-path-from-the-registry/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 14:44:54 +0000</pubDate>
		<dc:creator><![CDATA[Garett]]></dc:creator>
				<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://mydistributedlife.com/?p=13</guid>
		<description><![CDATA[Recently, I wrote a utility to extract dehydrated messages from a BizTalk 2006 environment. As part of the process, I needed to figure out what folder the BizTalk software was installed in. Below is a function I quickly wrote to retrieve the BizTalk installation path from the Windows registry. I thought it might be something ... <span class="more"><a class="more-link" href="http://mydistributedlife.com/2010/02/retrieve-the-biztalk-installation-path-from-the-registry/">[Read more...]</a></span>]]></description>
				<content:encoded><![CDATA[<p>Recently, I wrote a utility to extract dehydrated messages from a BizTalk 2006 environment. As part of the process, I needed to figure out what folder the BizTalk software was installed in. Below is a function I quickly wrote to retrieve the BizTalk installation path from the Windows registry. I thought it might be something useful to share.</p>
<pre class="brush: csharp; auto-links: false;">public string GetBizTalkInstallationFolder()
{
    string biztalkFolder = String.Empty;

    using (RegistryKey biztalkKey = Registry.LocalMachine.OpenSubKey(&quot;SOFTWARE\\Microsoft\\BizTalk Server\\3.0&quot;))
    {
        biztalkFolder = biztalkKey.GetValue(&quot;InstallPath&quot;, String.Empty).ToString();
    }

    return biztalkFolder;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://mydistributedlife.com/2010/02/retrieve-the-biztalk-installation-path-from-the-registry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retrieving a Windows Service&#8217;s Key Name Using It&#8217;s Process ID</title>
		<link>http://mydistributedlife.com/2009/05/retrieving-a-windows-services-key-name-using-its-process-id/</link>
		<comments>http://mydistributedlife.com/2009/05/retrieving-a-windows-services-key-name-using-its-process-id/#comments</comments>
		<pubDate>Sat, 09 May 2009 05:40:23 +0000</pubDate>
		<dc:creator><![CDATA[Garett]]></dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://mydistributedlife.com/?p=6</guid>
		<description><![CDATA[I was recently asked by a friend how to retrieve the name of a running windows service from the Service Control Manager (SCM) database. He wanted to do this from .NET, using the process id of the service. I started to think of different ways that this could be accomplished and came up with a ... <span class="more"><a class="more-link" href="http://mydistributedlife.com/2009/05/retrieving-a-windows-services-key-name-using-its-process-id/">[Read more...]</a></span>]]></description>
				<content:encoded><![CDATA[<p>I was recently asked by a friend how to retrieve the name of a running windows service from the Service Control Manager (SCM) database. He wanted to do this from .NET, using the process id of the service. I started to think of different ways that this could be accomplished and came up with a couple, utilizing <a href="http://msdn.microsoft.com/en-us/library/ms257340%28VS.80%29.aspx">WMI.NET</a>. Both approaches are similar, with a slight variation in the second.</p>
<h3><strong>First Solution</strong></h3>
<p>This function gets the service&#8217;s name by retrieving all services registered with the SCM, and comparing their process ids to the one supplied. </p>
<pre class="brush: csharp; auto-links: false;">public static string GetServiceNameByProcessId(uint processId)
{
    string serviceName = String.Empty;

    ManagementClass mc = new ManagementClass("Win32_Service");

    foreach (ManagementObject service in mc.GetInstances())
    {
        if ((uint)service["ProcessId"] == processId)
        {
            serviceName = (string)service["Name"];
            break;
        }
    }

    return serviceName;
}</pre>
<p>&nbsp;&nbsp; </p>
<h3><strong>Second Solution</strong></h3>
<p>This function uses <a href="http://msdn.microsoft.com/en-us/library/aa394606%28VS.85%29.aspx">WQL</a> to query for&nbsp; the specific service instance, using the process id in the WHERE clause. This avoids having to iterate over all the services within the SCM.</p>
<pre class="brush: csharp; auto-links: false;">public static string GetServiceNameByProcessId(uint processId)
{
    string serviceName = String.Empty;

    SelectQuery query = new SelectQuery("Win32_Service", String.Format("ProcessId={0}", processId));
    ManagementObjectSearcher searcher = new ManagementObjectSearcher(query);

    foreach (ManagementObject service in searcher.Get())
    {
        if ((uint)service["ProcessId"] == processId)
        {
            serviceName = (string)service["Name"];
            break;
        }
    }
   
    return serviceName;
}&nbsp; </pre>
<p>So, there you have it. These are the approaches that I came up with. In the future, I may present another that uses the Windows API, in particular the <a href="http://msdn.microsoft.com/en-us/library/ms682640%28VS.85%29.aspx">EnumServicesStatusEx</a> function, to accomplish the same task. Can anyone think of other approaches or suggest changes to the ones I&#8217;ve presented?</p>
]]></content:encoded>
			<wfw:commentRss>http://mydistributedlife.com/2009/05/retrieving-a-windows-services-key-name-using-its-process-id/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
