<?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 Thinking Lemur &#187; IIS</title>
	<atom:link href="http://thinkinglemur.com/index.php/category/thinking/web-servers/iis/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinkinglemur.com</link>
	<description>from the mind of Donnie Bachan</description>
	<lastBuildDate>Fri, 06 Jan 2012 10:42:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Connection Failure using CFHTTP</title>
		<link>http://thinkinglemur.com/index.php/2009/02/connection-failure-using-cfhttp/</link>
		<comments>http://thinkinglemur.com/index.php/2009/02/connection-failure-using-cfhttp/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 17:00:51 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[cfhttp]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=128</guid>
		<description><![CDATA[Scenario: Attempting to download and parse an XML feed using CFHTTP Get request. The url is not SSL enabled and uses IIS.   Problem: A StatusCode of 200 OK is returned but the FileContents returns Connection Failure.   Analysis: The header response contains the following header: IISExport: This web site was exported using IIS Export [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F02%2Fconnection-failure-using-cfhttp%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F02%2Fconnection-failure-using-cfhttp%2F&amp;source=thinkinglemur&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>Scenario:</strong></p>
<p>Attempting to download and parse an XML feed using CFHTTP Get request. The url is not SSL enabled and uses IIS.</p>
<p> </p>
<p><strong>Problem:</strong></p>
<p>A StatusCode of 200 OK is returned but the FileContents returns Connection Failure.</p>
<p> </p>
<p><strong>Analysis:</strong></p>
<p>The header response contains the following header:</p>
<blockquote><p>IISExport: This web site was exported using IIS Export v4.2</p></blockquote>
<p> </p>
<p><strong>Resolution:</strong></p>
<p>Thanks to an old post by <a href="http://www.talkingtree.com/blog/">Steven Erat</a> which can be found <a href="http://www.talkingtree.com/blog/index.cfm/2004/7/28/20040729">here</a> the solution is quite simple. It seems that ColdFusion cannot, by default, handle HTTP Compression. To get this to work you have to request the file be deflated using the Accept-Encoding and TE headers:</p>
<pre class="cfm">&nbsp;
<span style="color: #333333;"><span style="color: #990000;">&lt;cfhttp</span> url=<span style="color: #009900;">&quot;#variables.feedURL#&quot;</span><span style="color: #990000;">&gt;</span></span>
     <span style="color: #333333;"><span style="color: #990000;">&lt;cfhttpparam</span> <span style="color: #0000FF;">type</span>=<span style="color: #009900;">&quot;Header&quot;</span> <span style="color: #0000FF;">name</span>=<span style="color: #009900;">&quot;Accept-Encoding&quot;</span>
                                            <span style="color: #0000FF;">value</span>=<span style="color: #009900;">&quot;deflate;q=0&quot;</span> /<span style="color: #990000;">&gt;</span></span>
     <span style="color: #333333;"><span style="color: #990000;">&lt;cfhttpparam</span> <span style="color: #0000FF;">type</span>=<span style="color: #009900;">&quot;Header&quot;</span> <span style="color: #0000FF;">name</span>=<span style="color: #009900;">&quot;TE&quot;</span> <span style="color: #0000FF;">value</span>=<span style="color: #009900;">&quot;deflate;q=0&quot;</span> /<span style="color: #990000;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #990000;">&lt;/cfhttp&gt;</span></span>
&nbsp;</pre>
<p>This basically asks the webserver to send an uncompressed response which will solve the problem. From Steven's post, you may have to change the deflate;q=0 to * in the Accept-Encoding header to get it to work on occasion. I've not had this problem though.</p>
<p>It is interesting that Steven's post is almost 5 years old and I'm just coming across this problem for the first time even though I've done quite a bit of work with remote XML feeds.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2009/02/connection-failure-using-cfhttp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>File upload timeouts on IIS 6</title>
		<link>http://thinkinglemur.com/index.php/2009/02/file-upload-timeouts-on-iis-6/</link>
		<comments>http://thinkinglemur.com/index.php/2009/02/file-upload-timeouts-on-iis-6/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 12:59:00 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=106</guid>
		<description><![CDATA[Scenario: Simple file upload application using ColdFusion 8 on IIS 6 and Windows 2003 server. The application allows for large files to be uploaded to the server for backend processing. File sizes range from 10MB - 300 MB.   Problem: File upload fails for files greater than 30MB.   Analysis: Several options were investigated including [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F02%2Ffile-upload-timeouts-on-iis-6%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F02%2Ffile-upload-timeouts-on-iis-6%2F&amp;source=thinkinglemur&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>Scenario:</strong></p>
<p>Simple file upload application using ColdFusion 8 on IIS 6 and Windows 2003 server. The application allows for large files to be uploaded to the server for backend processing. File sizes range from 10MB - 300 MB.</p>
<p> </p>
<p><strong>Problem:</strong></p>
<p>File upload fails for files greater than 30MB.</p>
<p> </p>
<p><strong>Analysis:</strong></p>
<p>Several options were investigated including the following:</p>
<p> </p>
<ul>
<li>Maximum upload file size in ColdFusion (located in the CF administrator)</li>
<li>IIS time out settings </li>
<li>IIS minbytespersec settings in the Metabase.xml file</li>
</ul>
<p> </p>
<p>None of these worked. We also spoke with the ISP regarding throttling on the firewall, which was not the issue.</p>
<p> </p>
<p><strong>Resolution:</strong></p>
<p>The server was locked down as part of our security policy with UrlScan installed to mask certain server information. One of the settings in options in urlscan.ini is MaxAllowedContentLength which is set to 30MB by defualt. Here is an excerpt from the Technet article:</p>
<blockquote>
<div>MaxAllowedContentLength=30000000<br />
The MaxAllowedContentLength enforces a maximum value, in bytes, on the content length. It does not actually prevent the server from reading more data than what this value is set to. For example, if a client makes a chunk transfer encoded POST, this option does not track the size of the entity in the request. The default value is 30000000</div>
</blockquote>
<p>Increasing this value to 300MB allowed the uploads to work correctly. The full article can be found at <a href="http://technet.microsoft.com/en-us/library/cc751376.aspx">http://technet.microsoft.com/en-us/library/cc751376.aspx</a></p>
<p>Thanks goes to Rackspace UK technical support, even thought they didn't identify the exact problem, their input helped tremendously in finding a solution. Rackspace UK is the best dedicated hosting solution ever!</p>
<p>Happy Coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2009/02/file-upload-timeouts-on-iis-6/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Folder permission not inherited by uploaded file in PHP/IIS</title>
		<link>http://thinkinglemur.com/index.php/2009/02/folder-permission-not-inherited-by-uploaded-file-in-phpiis/</link>
		<comments>http://thinkinglemur.com/index.php/2009/02/folder-permission-not-inherited-by-uploaded-file-in-phpiis/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 10:21:43 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[IIS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=102</guid>
		<description><![CDATA[Scenario: The web application has two components, a private upload area and a public download area. To upload a file you must be logged in via HTTP Authentication in IIS (v6 on Windows 2003). The file is uploaded to a non-web accessible uploads folder. Downloads are public and are allowed for anyone who has the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F02%2Ffolder-permission-not-inherited-by-uploaded-file-in-phpiis%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F02%2Ffolder-permission-not-inherited-by-uploaded-file-in-phpiis%2F&amp;source=thinkinglemur&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>Scenario:</strong></p>
<p>The web application has two components, a private upload area and a public download area. To upload a file you must be logged in via HTTP Authentication in IIS (v6 on Windows 2003). The file is uploaded to a non-web accessible uploads folder. Downloads are public and are allowed for anyone who has the unique file key that identifies a specific uploaded file. The IIS web user (the account that PHP uses) has full access to the uploads directory.</p>
<p> </p>
<p><strong>Problem:</strong></p>
<p>Files that are uploaded by authorised users cannot be downloaded in the public area.</p>
<p> </p>
<p><strong>Analysis:</strong></p>
<p>After close examination, it was noticed that the IIS user has no access to the uploaded files even though the user has full access to the uploads directory.</p>
<p> </p>
<p><strong>Resolution:</strong></p>
<p>By default PHP uploads all files to a directory identified by the upload_tmp_dir entry in php.ini, which on Windows systems defaults to C:\Windows\Temp, when the upload is completed the file is then moved to the target directory as specified by the upload script. The problem is actually with the way Windows handles security, the uploaded file gets the permissions of the Temp directory, when copied to the final directory, it keeps the permissions of the Temp directory and not the permissions of the final directory. That is, if the file is uploaded to Temp and the IIS web user does not have permissions on the Temp folder, when the file is copied to the uploads directory the IIS web user will still NOT have permissions on the file. The solution to the problem is actually quite simple, give the IIS web user the required permissions on the directory specified by upload_tmp_dir.</p>
<p> </p>
<p>I cannot take credit for this solution, however, I can't find the post that had this solution again. I will keep looking and post the link to the original post when I find it again.</p>
<p>Happy Coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2009/02/folder-permission-not-inherited-by-uploaded-file-in-phpiis/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

