<?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>Code Iteratively &#187; .net</title>
	<atom:link href="http://iterat.ive.ly/index.php/tag/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://iterat.ive.ly</link>
	<description>code. cycling. music.</description>
	<lastBuildDate>Wed, 08 Sep 2010 19:50:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Why Ruby on Rails vs&#160;C#?</title>
		<link>http://iterat.ive.ly/index.php/2010/08/20/why-ruby-on-rails-vs-c/</link>
		<comments>http://iterat.ive.ly/index.php/2010/08/20/why-ruby-on-rails-vs-c/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 06:58:22 +0000</pubDate>
		<dc:creator>Christopher Gooley</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://iterat.ive.ly/?p=246</guid>
		<description><![CDATA[I&#8217;ve been spending a fair amount of time lately trying out a variety of development technologies and one of those is Ruby on Rails. I haven&#8217;t yet figured out exactly why people are so excited about it. Perhaps it&#8217;s because the convention-over-configuration methodology hides quite a bit of complexity from the developer. But my issue [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been spending a fair amount of time lately trying out a variety of development technologies and one of those is Ruby on Rails. I haven&#8217;t yet figured out exactly why people are so excited about it. Perhaps it&#8217;s because the convention-over-configuration methodology hides quite a bit of complexity from the developer.  But my issue with it is simple &#8211; I like to be in control of my software and I like more explicit design.</p>
<p><span id="more-246"></span></p>
<p>In reflection though, I can see why many people say that Rails is much easier than my preferred server-side language (C#) because you do have to write a lot more code starting from scratch in .NET to achieve the same result as you can with Rails. But the thing is, I&#8217;ve developed my own MVC-inspired framework that enables me (and my team) to develop apps very rapidly.  I&#8217;ve been building and upgrading this framework, called simply Core, for so many years and I&#8217;ve been using nice urls with controllers and url routing based on regular expressions with a custom-built ORM data layer since before Rails even existed.</p>
<p>This is not supposed to be a &#8220;get off my lawn!&#8221; post, it just sort of finally dawned on me why some people are so vehement when they condemn the Microsoft .NET platform. It&#8217;s not even a cost issue anymore because hosting in the Cloud is the same price whether you&#8217;re using Windows Server or Ubuntu&#8230; So it&#8217;s just the fact that now, C# is perceived as a &#8220;bad&#8221; way to develop web apps by the open-source crowd. But I&#8217;d be willing to argue with anybody out there that .NET in general, and C# specifically, are two of the best things on the web&#8230; if used properly.</p>
<p>And don&#8217;t even get me started about how vastly superior Visual Studio is to anything else out there&#8230;</p>
<p><strong>EDIT:</strong> I&#8217;ve started a <a href="/index.php/tag/learning-ror/">series about learning Ruby on Rails</a> (quick jump to: <a href="/index.php/2010/08/23/learning-rails-day-i/">Day One</a>, <a href="/index.php/2010/08/28/learning-rails-day-ii/">Day Two</a>) while building a web app. It&#8217;s not instructional, but rather is reflective of the process of learning the language and my thoughts about the language and framework as I attempt to use it for the first time for a real project I intend to release to the public soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://iterat.ive.ly/index.php/2010/08/20/why-ruby-on-rails-vs-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Export IIS7 Configuration to Another&#160;Webserver</title>
		<link>http://iterat.ive.ly/index.php/2009/06/10/howto-export-iis7-configuration-to-another-webserver/</link>
		<comments>http://iterat.ive.ly/index.php/2009/06/10/howto-export-iis7-configuration-to-another-webserver/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 21:15:15 +0000</pubDate>
		<dc:creator>Christopher Gooley</dc:creator>
				<category><![CDATA[dot.net]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[iis7]]></category>
		<category><![CDATA[infrastructure]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://iterat.ive.ly/?p=140</guid>
		<description><![CDATA[IIS7 has this great new feature called Shared Configuration.  Except that it has a tendency to do horrible things which usually result in all the websites and application pools being removed from your server and your production website starting to serve 503 Service Unavailable errors. For an innexplicable reason, Microsoft decided to kill the Export [...]]]></description>
			<content:encoded><![CDATA[<p>IIS7 has this great new feature called Shared Configuration.  Except that it has a tendency to do horrible things which usually result in all the websites and application pools being removed from your server and your production website starting to serve 503 Service Unavailable errors.</p>
<p>For an innexplicable reason, Microsoft decided to kill the Export function from IIS7 in favor of this new feature.  But for those of us who don&#8217;t trust technology, we like to do things manually and to get a repeatable result that doesn&#8217;t update automatically when we least expect it.  Yes, I am the sort of person who wonders why the default Windows Update on servers is to Install and Reboot Automatically at 2am&#8230;</p>
<p>In any case, in a simple 3 step process you too can export and import your Internet Information Server 7 websites and app pools.<span id="more-140"></span></p>
<p>I will call the target server TWEB (this is the server where you want a duplicate configuration) and the source server SWEB (this is where the current configuration exists).</p>
<p>First, on TWEB make a backup copy of the files in C:\Windows\System32\inetsrv\config.  I just created a subfolder called &#8220;bak&#8221; and copied them.  <strong>This is very important.  If you forget or skip this step because backups are for sissies, you will be re-installing IIS7 in step 4.</strong></p>
<p>Second, copy the AppliationHost.config from SWEB into the C:\Windows\System32\inetsrv\config folder on TWEB.  Also copy any application files like your c:\websites folder or whatever over to TWEB in the appropriate location if you haven&#8217;t already.</p>
<p><img class="alignright" src="http://f.ive.ly/Aen.jpg" alt="" width="198" height="110" />Third, on TWEB open both the new ApplicationHost.config and the backup ApplicationHost.config from step 1 and locate the &lt;configProtectedData&gt; node in the backup.  Copy that node and replace it into the new config file.</p>
<p>Fourth, if you didn&#8217;t backup the existing config file, remove the IIS role and add it back, then start at step 1.</p>
<p><strong>Note:</strong> if you have custom accounts under which you&#8217;re running app pools (cuz you&#8217;re not using LocalSystem, right?) then you just need to go into the IIS Management Console and re-configure the passwords for those accounts.  They were encrypted with the other server&#8217;s AES keys so they won&#8217;t be valid on this server and the pools won&#8217;t start.</p>
<p>That&#8217;s it.  Hope that helps.  It should work the same for C# .NET applications (which is what I&#8217;m using) or just static websites or whatever.  But of course, you shouldn&#8217;t trust me.  Test it yourself first.</p>
<p>My new good-karma policy is that if I spend more than an hour tracking down a general bug or wacky configuration thing, I promise to blog the solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://iterat.ive.ly/index.php/2009/06/10/howto-export-iis7-configuration-to-another-webserver/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PDFLib .NET Deploy Tip (specified module could not be&#160;found)</title>
		<link>http://iterat.ive.ly/index.php/2008/12/16/pdflib-deploy-tip-specified-module-could-not-be-found/</link>
		<comments>http://iterat.ive.ly/index.php/2008/12/16/pdflib-deploy-tip-specified-module-could-not-be-found/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 20:24:01 +0000</pubDate>
		<dc:creator>Christopher Gooley</dc:creator>
				<category><![CDATA[dot.net]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://iterat.ive.ly/index.php/2008/12/16/pdflib-deploy-tip-specified-module-could-not-be-found/</guid>
		<description><![CDATA[We&#8217;re using the ASP.NET C# version of PDFLib at work to generate loads of reports and cool pdf files. Everything was peachy on our development systems until we deployed to staging servers and started getting a strange error. All of the sudden we started getting the following exception on the site: The specified module could [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re using the ASP.NET C# version of PDFLib at work to generate loads of reports and cool pdf files.  Everything was peachy on our development systems until we deployed to staging servers and started getting a strange error.</p>
<p>All of the sudden we started getting the following exception on the site:<br />
<code><br />
The specified module could not be found.<br />
(Exception from HRESULT: 0x8007007E)<br />
</code><br />
Not one of Microsoft&#8217;s more useful error messages, to be true and googling for that error returns so many diverse topics that they were completely useless.</p>
<p>So after a bit of troubleshooting, we came to the following solution tips.  These should work for both C# and VB and any other .NET language.  Tested on Windows 2003 and Windows Server 2008.<span id="more-40"></span></p>
<h4>Make sure your webserver is 32-bit</h4>
<p>PDFLib for .NET does not support 64-bit servers.  In theory you could run your IIS worker processes in 32-bit on a 64-bit OS, but I leave that as an exercise to the reader.</p>
<h4>Make sure you have .NET 1.1 installed</h4>
<p>Because pdflib_dotnet.dll is built on 1.1 and you will have this installed on your development box, you will never think about this for your prod/staging servers. If you already have IIS installed before you run the 1.1 installer, don&#8217;t forget to register it with IIS:<br />
<code><br />
C:\Windows\Microsoft.NET\Framework\v1.1.xxxxx\aspnet_regiis.exe -ir<br />
</code></p>
<h4>Put the MSVCR71.DLL into your web bin directory</h4>
<p>On your development machine (or wherever you have PDFLib actually installed) the msvcr71.dll will be in C:\Program Files\PDFlib\PDFlib 32-bit 7.0.3\dotNET\bin or thereabouts.  Drop that into your website bin directory on the server.</p>
<p><em>UPDATE: You may also need to place this dll into the C:\Windows\System32 folder on a dedicated server.</em></p>
<h4>Reboot, then check it out.</h4>
<p>Taste the sweet goodness of success.</p>
<p>PDFLib produces a great end product (and it should for that much caaaassssshh).  But it has many weird cases.  Probably because it seems that the .NET version is just a simple crappy wrapper on the C library.  Oh well. It&#8217;s still the best thing on the market to separate your developers from your designers.</p>
]]></content:encoded>
			<wfw:commentRss>http://iterat.ive.ly/index.php/2008/12/16/pdflib-deploy-tip-specified-module-could-not-be-found/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Build your own modded&#160;System.Web.Extensions.dll</title>
		<link>http://iterat.ive.ly/index.php/2007/01/31/build-your-own-modded-systemwebextensionsdll/</link>
		<comments>http://iterat.ive.ly/index.php/2007/01/31/build-your-own-modded-systemwebextensionsdll/#comments</comments>
		<pubDate>Wed, 31 Jan 2007 09:01:01 +0000</pubDate>
		<dc:creator>Christopher Gooley</dc:creator>
				<category><![CDATA[dot.net]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://iterat.ive.ly/index.php/2007/01/31/build-your-own-modded-systemwebextensionsdll/</guid>
		<description><![CDATA[Earlier today Microsoft released the source code to the AJAX 1.0 release System.Web.Extensions library. I was in the apparently unique position of needing to modify parts of the code for a special case application, so I downloaded the source right away ready to modify, compile and deploy. I guess I was pretty naive to think [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier today Microsoft released the source code to the <a href="http://ajax.asp.net/about/default.aspx?tabid=47">AJAX</a> 1.0 release System.Web.Extensions library.  I was in the <em>apparently</em> unique position of needing to modify parts of the code for a special case application, so I downloaded the source right away ready to modify, compile and deploy.</p>
<p>I guess I was pretty naive to think that it would be that easy.  The distribution doesn&#8217;t include some pretty important parts.  A .csproj file for one.  The entire Resources class for another.</p>
<p>So I had to work my way through the process of getting a compile-able version of the library ready to replace the official System.Web.Extensions binary in my project.  The server code Reference License prevents me from simply providing the project to you, but here are the high points if you need to do the same.<br />
<span id="more-28"></span></p>
<p class="alert">Be aware:<br />
This is neither easy nor straightforward and I probably forgot a few steps when I was writing this.  You&#8217;re gonna have to be diligent to get it to work, even with this howto.</p>
<p><strong>Getting Started</strong><br />
1) <a href="http://go.microsoft.com/fwlink/?LinkID=82291">Download</a> and install the source<br />
2) Create a new C# project in Visual Studio.  You can call it whatever you want but I would suggest you avoid using the same namespace because the System.Web namespace is strongly named and exists in several assemblies.  I called mine Dave.Web.Ajax<br />
3) Copy all the files and folders from the source installed directory <code>(C:Program Files (x86)Microsoft ASP.NETASP.NET 2.0 AJAX Extensionsv1.0.61025SourceSystem.Web.Extensions on my computer)</code> into your new project directory and include them in the project.<br />
4) Make sure your Default Namespace on the project is something good &#8211; again Dave.Web.Ajax in my case.</p>
<p><strong>Get the Missing Files</strong><br />
1) Start the <a href="http://www.aisto.com/roeder/dotnet/">.Net Reflector</a> (if you&#8217;re a serious .Net developer, you should have downloaded this to your computer long ago, btw)<br />
2) Open the official System.Web.Extensions.dll file<br />
3) Save all the Resources into a new Resources folder in your project. When you save them, drop the &#8220;System.Web.Resources&#8221; part of the filename if it&#8217;s there.<br />
4) You should now have a file called AtlasWeb.resources in your folder<br />
5) Open a VS Command Prompt and in your resources folder run<br />
<code>resgen AtlasWeb.resources AtlasWeb.resx</code>.  This will generate the resx file that you need in visual studio to dynamically generate the class.</p>
<p><strong>Setup your Embedded Resources</strong><br />
1) In VS, include all the files in the Resources in your project (except the *.resources files) if you haven&#8217;t already.<br />
2) Select them all and set the Build Action to Embedded Resource<br />
3) Click on the AtlasWeb.resx file and set the Custom Tool property to &#8220;ResXFileCodeGenerator&#8221;.  This will generate the AtlasWeb.Designer.cs file which gives you a real class with properties for each item in the resource file.<br />
NOTE) You might need to repeat this process (and the resgen.exe process) for the other *.resources files, but I haven&#8217;t done it and havn&#8217;t had any issues yet.</p>
<p><strong>Rename the Namespace and cleanup</strong><br />
If you are going to stick with using the System.Web.* namespace, then you can skip this step.<br />
1) Basically, I handled this in an iterative fashion.  I did a project Find-and-Replace for &#8220;System.Web.&#8221; and replaced with &#8220;Dave.Web.Ajax.&#8221;  Of course this process will break stuff because now objects that are really in the System.Web namespace (and not in the System.Web.Extensions assembly) will dissappear.<br />
2) Get your iteration on: compile, add &#8220;using System.Web.something;&#8221; to a file with the error, compile, repeat.</p>
<p><strong>Fix the Embedded Resource references</strong><br />
At this point, your project should compile and if you reference it in a web project in place of the System.Web.Extensions.dll file (or the GAC reference) the web project should compile too.  But as soon as you load up a page with AJAX controls on it, you will get a runtime error saying the Resource File could not be found.</p>
<p>Update the reference names of your embedded .js files to be fully qualified.  Your new fully qualified resource name will be &#8220;DefaultNamespace.Resources.Filename.js&#8221;  Mine is &#8220;Dave.Web.Ajax.Resources.MicrosoftAjax.js&#8221; for example.</p>
<p>There are references in these files<br />
UIScriptManager.cs:931,935<br />
UIWebResourceUtil.cs:64+<br />
UITimer.cs:147</p>
<p>Update those references to use the fully qualified names.  After that, in WebResourceUtil.cs there is an optimization in the SystemWebExtensionsContainsWebResource(string) function that you have to modify.  It does a switch statement on the length of the input string before comparing to the resource name string. Update each case conditional to be the length of the string in that case statement.  <strong>If you forget this step you will be very confused why it says it can&#8217;t find a resource that you <em>know</em> is there&#8230;</strong></p>
<p>Now, all embedded resources need an assembly reference so that they can be detected using reflection (which is how the AJAX library looks for a valid embedded resource).  I just created a dummy class called Scripts.cs inside the Resources file so I could include the assembly attributes:</p>
<p><code>[assembly: System.Web.UI.WebResource("Dave.Web.Ajax.Resources.MicrosoftAjax.debug.js", "text/javascript")]<br />
[assembly: System.Web.UI.WebResource("Dave.Web.Ajax.Resources.MicrosoftAjax.js", "text/javascript")]<br />
[assembly: System.Web.UI.WebResource("Dave.Web.Ajax.Resources.MicrosoftAjaxTimer.debug.js", "text/javascript")]<br />
[assembly: System.Web.UI.WebResource("Dave.Web.Ajax.Resources.MicrosoftAjaxTimer.js", "text/javascript")]<br />
[assembly: System.Web.UI.WebResource("Dave.Web.Ajax.Resources.MicrosoftAjaxWebForms.debug.js", "text/javascript")]<br />
[assembly: System.Web.UI.WebResource("Dave.Web.Ajax.Resources.MicrosoftAjaxWebForms.js", "text/javascript")]<br />
namespace Dave.Web.Ajax.Resources<br />
{<br />
    class Scripts<br />
    {<br />
    }<br />
}</code></p>
<p>Just make sure you have a WebResource attribute for each of the javascript files in the project.</p>
<p><strong>That&#8217;s it</strong><br />
Assuming you&#8217;ve gotten this far, you must be dedicated or desperate.  Now you can go in and make your mods to any of the AJAX files and you&#8217;re good to go.  Hopefully this was helpful and I wish I could just post the project, but rules is rules.</p>
<p>Its been about 6 hours since I finished my conversion, so its pretty fresh in my head, but I may have forgotten a step somewhere.  I&#8217;ll try to answer questions in the comments but I&#8217;m pretty busy these days and I just blew half my day because the release of AJAX doesn&#8217;t play well inside iframes (which is the whole reason I had to do this mod).</p>
<p>Good luck to you.</p>
]]></content:encoded>
			<wfw:commentRss>http://iterat.ive.ly/index.php/2007/01/31/build-your-own-modded-systemwebextensionsdll/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
