{"id":236,"date":"2008-12-05T09:57:56","date_gmt":"2008-12-05T01:57:56","guid":{"rendered":""},"modified":"2014-02-27T23:00:57","modified_gmt":"2014-02-27T15:00:57","slug":"%e6%b5%85%e8%b0%88-asp-%e7%a8%8b%e5%ba%8f%e7%9a%84%e7%bc%96%e7%a8%8b%e4%b8%8e%e4%bc%98%e5%8c%96","status":"publish","type":"post","link":"http:\/\/www.xiaoyebailong.com\/index.php\/2008\/12\/05\/236.htm","title":{"rendered":"\u6d45\u8c08 ASP \u7a0b\u5e8f\u7684\u7f16\u7a0b\u4e0e\u4f18\u5316"},"content":{"rendered":"<p>ASP(Active&nbsp;Server&nbsp;Page)\u662f Microsoft \u516c\u53f8\u63a8\u51fa\u7684\u57fa\u4e8e PWS (Personal&nbsp;Web&nbsp;Server)&amp; IIS (InternetInformation&nbsp;Server)\u5e73\u53f0\u7684\u3001\u57fa\u4e8e ISAPI (InternetServiceAPI) \u539f\u7406\u7684\u52a8\u6001\u7f51\u9875\u5f00\u53d1\u6280\u672f\uff0c\u76ee\u524d\u65e5\u8d8b\u6210\u719f\u5b8c\u5584\u3002\u5728\u8fd9\u91cc\u4ec5\u5c31\u4ee3\u7801\u4f18\u5316\u8fdb\u884c\u4e00\u4e9b\u7b80\u5355\u8ba8\u8bba\u3002 <br \/>\n&nbsp;<\/p>\n<p>1\u3001\u58f0\u660eVBScript\u53d8\u91cf<\/p>\n<p>\u5728ASP\u4e2d\uff0c\u5bf9vbscript\u63d0\u4f9b\u4e86\u5f3a\u52b2\u7684\u652f\u6301\uff0c\u80fd\u591f\u65e0\u7f1d\u96c6\u6210vbscript\u7684\u51fd\u6570\u3001\u65b9\u6cd5\uff0c\u8fd9\u6837\u7ed9\u6269\u5c55ASP\u7684\u73b0\u6709\u529f\u80fd\u63d0\u4f9b\u4e86\u5f88\u5927\u4fbf\u5229\u3002\u7531\u4e8eASP\u4e2d\u5df2\u7ecf\u6a21\u7cca\u4e86\u53d8\u91cf\u7c7b\u578b\u7684\u6982\u5ff5\uff0c\u6240\u4ee5\uff0c\u5728\u8fdb\u884cASP\u4e0evbscript\u4ea4\u4e92\u7684\u8fc7\u7a0b\u4e2d\uff0c\u5f88\u591a\u7a0b\u5e8f\u5458\u4e5f\u60ef\u4e8e\u4e0d\u58f0\u660evbscript\u7684\u53d8\u91cf\uff0c\u8fd9\u6837\u52a0\u91cd\u4e86\u670d\u52a1\u5668\u7684\u89e3\u6790\u8d1f\u62c5\uff0c\u8fdb\u800c\u5f71\u54cd\u670d\u52a1\u5668\u7684\u54cd\u5e94\u8bf7\u6c42\u901f\u5ea6\u3002<br \/>\n\u9274\u4e8e\u6b64\uff0c\u6211\u4eec\u53ef\u4ee5\u8c61\u5728VB\u4e2d\u5f3a\u5236\u7528\u6237\u8fdb\u884c\u53d8\u91cf\u58f0\u660e\u4e00\u6837\u5728vbscript\u4e2d\u5f3a\u5236\u7528\u6237\u8fdb\u884c\u53d8\u91cf\u58f0\u660e\u3002\u5b9e\u73b0\u65b9\u6cd5\u662f\u5728ASP\u7a0b\u5e8f\u884c\u9996\u653e\u7f6e&lt;%&nbsp;optionexplicit%&gt;\u3002<\/p>\n<p>2\u3001\u5bf9URL\u5730\u5740\u8fdb\u884c\u7f16\u7801<\/p>\n<p>\u5728\u6211\u4eec\u4f7f\u7528asp\u52a8\u6001\u751f\u6210\u4e00\u4e2a\u5e26\u53c2\u6570URL\u5730\u5740\u5e76\u8fdb\u884c\u8df3\u8f6c\u65f6\uff0c\u5728IE\u4e2d\u89e3\u6790\u5f88\u6b63\u5e38\uff0c\u4f46\u5728NetScrape\u6d4f\u89c8\u65f6\u5374\u6709\u9519\u8bef\u5982\u4e0b\uff1a<br \/>\nHTTP&nbsp;Error&nbsp;400<br \/>\n400&nbsp;Bad&nbsp;Request<br \/>\nDue&nbsp;to&nbsp;malformed&nbsp;syntax,&nbsp;<br \/>\nthe&nbsp;request&nbsp;could&nbsp;not&nbsp;be&nbsp;understood&nbsp;by&nbsp;the&nbsp;server.<br \/>\nThe&nbsp;client&nbsp;should&nbsp;not&nbsp;repeat&nbsp;the&nbsp;request&nbsp;without&nbsp;modifications.<br \/>\n\u89e3\u51b3\u65b9\u6cd5\u662f\u5bf9\u751f\u6210\u7684URL\u53c2\u6570\u4f7f\u7528ASP\u5185\u7f6eserver\u5bf9\u8c61\u7684URLencode\u65b9\u6cd5\u8fdb\u884cURL\u7f16\u7801\uff0c\u4f8b\u5b50\u5982\u4e0b\uff1a<br \/>\n&lt;%<br \/>\nURL=&quot;xur.asp&quot;<br \/>\nvar1=&quot;username=&quot;&nbsp;&amp;&nbsp;server.URLencode(&quot;xur&quot;)<br \/>\nvar2=&quot;&amp;company=&quot;&nbsp;&amp;&nbsp;server.URLencode(&quot;xurstudio&quot;)<br \/>\nvar3=&quot;&amp;phone=&quot;&nbsp;&amp;&nbsp;server.URLencode(&quot;021-53854336-186&quot;)<br \/>\nresponse.redirect&nbsp;URL&nbsp;&amp;&nbsp;&quot;?&quot;&nbsp;&amp;&nbsp;var1&nbsp;&amp;&nbsp;var2&nbsp;&amp;&nbsp;var3<br \/>\n%&gt;<\/p>\n<p>3\u3001\u6e05\u7a7a\u5bf9\u8c61<\/p>\n<p>\u5f53\u4f7f\u7528\u5b8c\u5bf9\u8c61\u540e\uff0c\u9996\u5148\u4f7f\u7528Close\u65b9\u6cd5\u6765\u91ca\u653e\u5bf9\u8c61\u6240\u5360\u7528\u7684\u7cfb\u7edf\u8d44\u6e90\uff1b\u7136\u540e\u8bbe\u7f6e\u5bf9\u8c61\u503c\u4e3a&ldquo;nothing&rdquo;\u91ca\u653e\u5bf9\u8c61\u5360\u7528\u5185\u5b58\u3002\u5f53\u5e74\uff0c\u6211\u5c31\u662f\u5728\u4e00\u5f20\u9875\u9762\u4e0a\u521b\u5efa\u4e86\u767e\u4f59\u4e2a\u6ca1\u6709\u6e05\u7a7a\u5bf9\u8c61\u7684\u8bb0\u5f55\u96c6\u800c\u5d29\u6e83\u4e86\u6211\u7684IIS\u3002\u4e0b\u9762\u7684\u4ee3\u7801\u4f7f\u7528\u6570\u636e\u5e93\u5185\u5bb9\u5efa\u7acb\u4e00\u4e2a\u4e0b\u62c9\u5217\u8868\u3002\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a<br \/>\n&lt;%&nbsp;myDSN=&quot;DSN=xur;uid=xur;pwd=xur&quot;<br \/>\nmySQL=&quot;select&nbsp;*&nbsp;from&nbsp;authors&nbsp;where&nbsp;AU_ID&lt;100&quot;<br \/>\nset&nbsp;conntemp=server.createobject(&quot;adodb.connection&quot;)<br \/>\nconntemp.open&nbsp;myDSN<br \/>\nset&nbsp;rstemp=conntemp.execute(mySQL)<br \/>\nif&nbsp;rstemp.eof&nbsp;then<br \/>\nresponse.write&nbsp;&quot;\u6570\u636e\u5e93\u4e3a\u7a7a&quot;<br \/>\nresponse.write&nbsp;mySQL<br \/>\nconntemp.close<br \/>\nset&nbsp;conntemp=nothing<br \/>\nresponse.end<br \/>\n\u3000end&nbsp;if%&gt;<br \/>\n&lt;%do&nbsp;until&nbsp;rstemp.eof&nbsp;%&gt;<br \/>\n&lt;%<br \/>\nrstemp.movenext<br \/>\nloop<br \/>\nrstemp.close<br \/>\nset&nbsp;rstemp=nothing<br \/>\nconntemp.close<br \/>\nset&nbsp;conntemp=nothing<br \/>\n%&gt;<\/p>\n<p>4\u3001\u4f7f\u7528\u5b57\u7b26\u4e32\u5efa\u7acbSQL\u67e5\u8be2<\/p>\n<p>\u4f7f\u7528\u5b57\u7b26\u4e32\u6765\u5efa\u7acb\u67e5\u8be2\u5e76\u4e0d\u80fd\u52a0\u5feb\u670d\u52a1\u5668\u7684\u89e3\u6790\u901f\u5ea6\uff0c\u76f8\u53cd\uff0c\u5b83\u8fd8\u4f1a\u589e\u52a0\u670d\u52a1\u5668\u7684\u89e3\u6790\u65f6\u95f4\u3002\u4f46\u5728\u8fd9\u91cc\u4ecd\u7136\u63a8\u8350\u4f7f\u7528\u5b57\u7b26\u4e32\u4ee3\u66ff\u7b80\u5355\u7684\u67e5\u8be2\u8bed\u53e5\u6765\u8fdb\u884c\u67e5\u8be2\u3002\u8fd9\u6837\u505a\u7684\u597d\u5904\u662f\uff0c\u53ef\u4ee5\u8fc5\u901f\u53d1\u73b0\u7a0b\u5e8f\u95ee\u9898\u6240\u5728\uff0c\u4ece\u800c\u4fbf\u5229\u9ad8\u6548\u5730\u751f\u6210\u7a0b\u5e8f\u3002\u793a\u4f8b\u5982\u4e0b\uff1a<br \/>\n&lt;%mySQL=&nbsp;&quot;&quot;select&nbsp;*&nbsp;&quot;<br \/>\nmySQL=&nbsp;mySQL&nbsp;&amp;&nbsp;&quot;from&nbsp;publishers&quot;<br \/>\nmySQL=&nbsp;mySQL&nbsp;&amp;&nbsp;&quot;where&nbsp;state=&#8217;NY&#8217;&quot;<br \/>\nresponse.write&nbsp;mySQL<br \/>\nset&nbsp;rstemp=conntemp.execute(mySQL)<br \/>\nrstemp.close<br \/>\nset&nbsp;rstemp=nothing<br \/>\n%&gt;<\/p>\n<p>5\u3001\u4f7f\u7528case\u8fdb\u884c\u6761\u4ef6\u9009\u62e9<\/p>\n<p>\u5728\u8fdb\u884c\u6761\u4ef6\u9009\u62e9\u7684\u65f6\u5019\uff0c\u5c3d\u91cf\u4f7f\u7528case\u8bed\u53e5\uff0c\u907f\u514d\u4f7f\u7528if\u8bed\u53e5\u3002\u4f7f\u7528case\u8bed\u53e5\uff0c\u53ef\u4ee5\u4f7f\u7a0b\u5e8f\u6d41\u7a0b\u5316\uff0c\u6267\u884c\u8d77\u6765\u4e5f\u6bd4if\u8bed\u53e5\u6765\u7684\u5feb\u3002\u793a\u4f8b\u5982\u4e0b\uff1a<br \/>\n&lt;%<br \/>\n\u3000\u3000FOR&nbsp;i&nbsp;=&nbsp;1&nbsp;TO&nbsp;1000<br \/>\n\u3000\u3000&nbsp;n&nbsp;=&nbsp;i<br \/>\n\u3000\u3000&nbsp;Response.Write&nbsp;AddSuffix(n)&nbsp;&amp;&nbsp;&quot;&lt;br&gt;&quot;<br \/>\n\u3000\u3000NEXT<br \/>\n\u3000\u3000%&gt;<br \/>\n\u3000\u3000&lt;%<br \/>\n\u3000\u3000Function&nbsp;AddSuffix(num)<br \/>\nnumpart&nbsp;=&nbsp;RIGHT(num,1)<br \/>\nSELECT&nbsp;CASE&nbsp;numpart<br \/>\nCASE&nbsp;&quot;1&quot;<br \/>\nIF&nbsp;InStr(num,&quot;11&quot;)&nbsp;THEN<br \/>\nnum&nbsp;=&nbsp;num&nbsp;&amp;&nbsp;&quot;th&quot;<br \/>\nELSE<br \/>\nnum&nbsp;=&nbsp;num&nbsp;&amp;&nbsp;&quot;st&quot;<br \/>\nEND&nbsp;IF<br \/>\nCASE&nbsp;&quot;2&quot;<br \/>\nIF&nbsp;InStr(num,&quot;12&quot;)&nbsp;THEN<br \/>\nnum&nbsp;=&nbsp;num&nbsp;&amp;&nbsp;&quot;th&quot;<br \/>\nELSE<br \/>\nnum&nbsp;=&nbsp;num&nbsp;&amp;&nbsp;&quot;nd&quot;<br \/>\nEND&nbsp;IF<br \/>\nCASE&nbsp;&quot;3&quot;<br \/>\nIF&nbsp;InStr(num,&quot;13&quot;)&nbsp;THEN<br \/>\nnum&nbsp;=&nbsp;num&nbsp;&amp;&nbsp;&quot;th&quot;<br \/>\nELSE<br \/>\nnum&nbsp;=&nbsp;num&nbsp;&amp;&nbsp;&quot;rd&quot;<br \/>\nEND&nbsp;IF<br \/>\nCASE&nbsp;&quot;4&quot;<br \/>\nnum&nbsp;=&nbsp;num&nbsp;&amp;&nbsp;&quot;th&quot;<br \/>\nCASE&nbsp;ELSE<br \/>\nnum&nbsp;=&nbsp;num&nbsp;&amp;&nbsp;&quot;th&quot;<br \/>\nEND&nbsp;SELECT<br \/>\nAddSuffix&nbsp;=&nbsp;num<br \/>\n\u3000\u3000END&nbsp;FUNCTION<br \/>\n%&gt;<\/p>\n<p>6\u3001\u4f7f\u7528adovbs.inc\u6587\u4ef6\u4e2d\u5b9a\u4e49\u7684\u5e38\u91cf\u6253\u5f00\u8bb0\u5f55\u96c6<\/p>\n<p>\u6253\u5f00\u8bb0\u5f55\u96c6\u65f6\uff0c\u53ef\u4ee5\u5b9a\u4e49\u8bb0\u5f55\u96c6\u6253\u5f00\u7684\u6e38\u6807\u7c7b\u578b\u548c\u9501\u5b9a\u7c7b\u578b\u3002\u5728 adovbs.inc \u6587\u4ef6\u4e2d\u5b9a\u4e49\u4e86\u4e00\u4e9b\u5e38\u91cf\u6765\u5b9a\u4e49\u8fd9\u4e9b\u7c7b\u578b\u3002adovbs.inc \u6587\u4ef6\u4fdd\u5b58\u5728 \\inetpub\\iissamples\\IISamples \u76ee\u5f55\u4e0b\u9762\u3002\u4e0b\u9762\u5217\u4e3e\u51e0\u4e2a\u5e38\u7528\u7684\u6e38\u6807\u7c7b\u578b\u548c\u9501\u5b9a\u7c7b\u578b\u3002<br \/>\n\u6e38\u6807\u7c7b\u578b\uff1aadOpenFowardOnly\u6e38\u6807\u53ea\u80fd\u5411\u524d\uff1badOpenKeyset \u6e38\u6807\u53ef\u5411\u524d\u6216\u8005\u5411\u540e\uff0c\u5982\u4e00\u7528\u6237\u6dfb\u52a0\u8bb0\u5f55\uff0c\u65b0\u8bb0\u5f55\u4e0d\u4f1a\u51fa\u73b0\u5728\u8bb0\u5f55\u96c6\u4e2d\uff1badOpenDynamic \u6e38\u6807\u52a8\u6001\u968f\u610f\uff1badOpenStatic\u8bb0\u5f55\u96c6\u4e0d\u5bf9\u5176\u4ed6\u7528\u6237\u9020\u6210\u7684\u8bb0\u5f55\u4fee\u6539\u6709\u6240\u53cd\u6620\u3002<br \/>\n\u9501\u5b9a\u7c7b\u578b\uff1aadLockReadOney\u4e0d\u80fd\u4fee\u6539\u8bb0\u5f55\u96c6\u4e2d\u7684\u8bb0\u5f55\uff1badLockPessimistic \u5728\u7f16\u8f91\u4e00\u6761\u8bb0\u5f55\u65f6\u9501\u5b9a\u5b83\uff1badLockOptimstic \u8c03\u7528\u8bb0\u5f55\u96c6Update\u65b9\u6cd5\u65f6\u624d\u9501\u5b9a\u8bb0\u5f55\uff1badLockBatchOpeimstic\u8bb0\u5f55\u53ea\u80fd\u6210\u6279\u66f4\u65b0\u3002<br \/>\n&lt;!&#8211;#INCLUDE&nbsp;VIRTUAL=&quot;\/ADOVBS.INC&quot;&nbsp;&#8211;&gt;<br \/>\n&lt;%<br \/>\nconnectme=&quot;DSN=xur;uid=xur;pwd=xur&quot;<br \/>\nsqltemp=&quot;select&nbsp;*&nbsp;from&nbsp;publishers&nbsp;where&nbsp;name=&#8217;xur&#8217;&quot;<br \/>\nset&nbsp;rstemp=Server.CreateObject(&quot;adodb.Recordset&quot;)<br \/>\nrstemp.open&nbsp;sqltemp,&nbsp;connectme,&nbsp;adOpenStatic\uff0cadLockOptimstic<br \/>\nresponse.write&nbsp;rstemp.recordcount&nbsp;&amp;&nbsp;&quot;&nbsp;records&nbsp;in&lt;br&gt;&quot;&nbsp;&amp;&nbsp;sqltemp<br \/>\nrstemp.close<br \/>\nset&nbsp;rstemp=nothing<br \/>\n%&gt;<\/p>\n<p>7\u3001\u907f\u514d\u5728\u4f7f\u7528global.asa\u6587\u4ef6\u4e2d\u8fdb\u884c\u5bf9\u8c61\u5b9a\u4e49<\/p>\n<p>\u7531\u4e8eglobal.asa\u6587\u4ef6\u4e2d\u7684\u5185\u5bb9\u53ef\u4ee5\u4e3a\u7ad9\u70b9\u5185\u6240\u6709\u6587\u4ef6\u5f15\u7528\uff0c\u65e0\u7591\uff0c\u5728global.asa\u6587\u4ef6\u4e2d\u8fdb\u884c\u5bf9\u8c61\u5b9a\u4e49\u53ef\u4ee5\u7701\u53bb\u5f88\u591a\u91cd\u590d\u5de5\u4f5c\u3002\u6bd4\u5982\u5728global.asa\u4e2d\u7684application_onstart\u51fd\u6570\u4e2d\u8fdb\u884c\u5982\u4e0b\u5b9a\u4e49\uff1a<br \/>\n&lt;%SUB&nbsp;application_onstart<br \/>\nset&nbsp;application(&quot;theCONN&quot;)=server.createobject(&quot;adodb.connection&quot;)<br \/>\nEND&nbsp;SUB&nbsp;%&gt;;<br \/>\n\u8fd9\u6837\u5c31\u53ef\u4ee5\u5728\u7ad9\u70b9\u4efb\u4f55\u4ee3\u7801\u4e2d\u505a\u7c7b\u4f3c\u5f15\u7528\uff1a<br \/>\n&lt;%<br \/>\nmySQL=&quot;select&nbsp;*&nbsp;from&nbsp;publishers&nbsp;where&nbsp;state=&#8217;xur&#8217;<br \/>\nset&nbsp;rstemp=application(&quot;theconn&quot;).execute(mySQL)<br \/>\n%&gt;<br \/>\n\u540c\u6837\u5730\uff0c\u53ef\u4ee5\u5728session_onstart\u51fd\u6570\u4e2d\u521b\u5efa\u8bb0\u5f55\u96c6\u5bf9\u8c61<br \/>\n&lt;%SUB&nbsp;session_onstart<br \/>\nset&nbsp;session(&quot;rstemp&quot;)=server.createobject(&quot;adodb.recordset&quot;)<br \/>\nEND&nbsp;SUB&nbsp;%&gt;<br \/>\n\u7136\u540e\u5728\u7ad9\u70b9\u4e5f\u9762\u4e2d\u8fdb\u884c\u5982\u4e0b\u5f15\u7528\uff1a<br \/>\n&lt;%<br \/>\nmySQL=&quot;select&nbsp;*&nbsp;from&nbsp;publishers&nbsp;where&nbsp;state=&#8217;xur&#8217;<br \/>\nset&nbsp;session(&quot;rstemp&quot;)=conntemp.execute(mySQL)<br \/>\n%&gt;<br \/>\n\u4f46\u8fd9\u6837\u505a\u7684\u540c\u65f6\u4e5f\u6709\u5f88\u5927\u7684\u8d1f\u9762\u5f71\u54cd\uff0c\u7531\u4e8eApplication\u548csession\u53d8\u91cf\u90fd\u53ea\u6709\u5728\u5173\u95ed\u7f51\u7ad9\u7684\u65f6\u5019\u624d\u91ca\u653e\u5360\u7528\u7684\u8d44\u6e90\uff0c\u6240\u4ee5session\u53c2\u6570\u4f1a\u6d6a\u8d39\u5927\u91cf\u4e0d\u5fc5\u8981\u5185\u5b58\uff0c\u800c\u4e14\u6b64\u65f6application\u53d8\u91cf\u6210\u4e3a\u670d\u52a1\u5668\u6027\u80fd\u7684\u74f6\u9888\u3002<br \/>\n\u89e3\u51b3\u65b9\u6cd5\uff1a\u5efa\u7acb\u5b9a\u4e49\u5bf9\u8c61asp\u9875\u9762\uff0c\u5728\u9700\u8981\u8fdb\u884c\u8c03\u7528\u8fd9\u4e9b\u5bf9\u8c61\u7684\u9875\u9762\u4e0a\uff0c\u5f15\u5165\u8fd9\u5f20 asp\u9875\u9762\u3002\u5047\u8bbe\u5b9a\u4e49\u5bf9\u8c61\u7684asp\u9875\u9762\u540d\u79f0\u4e3adefine.asp\uff0c\u5219\u53ea\u8981\u5728\u5bf9\u5e94asp\u9875\u9762\u4e2d\u52a0\u5165\u4ee5\u4e0b\u8bed\u53e5\u5c31\u80fd\u5f15\u5165\u8be5\u9875\u9762\u3002<br \/>\n&lt;!&#8211;#INCLUDE&nbsp;VIRTUAL=&quot;\/define.asp&quot;&nbsp;&#8211;&gt;<br \/>\n\u5728\u8fdb\u884c\u9875\u9762\u5f15\u8fdb\u65f6\uff0c\u6700\u597d\u5728\u5f85\u5f15\u8fdb\u7684asp\u6587\u4ef6\u4e2d\u4e0d\u8981\u5305\u542b &lt;%@LANGUAGE=&quot;VBSCRIPT&quot;%&gt;\u8bed\u53e5\u3002\u56e0\u4e3a\u5728asp\u6587\u4ef6\u4e2d\uff0c\u53ea\u80fd\u6709\u4e00\u53e5\u7531@\u6765\u5b9a\u4e49\u7684\u811a\u672c\u89e3\u6790\u8bed\u8a00\u3002<br \/>\n8\u3001\u5b89\u5168\u9632\u62a4<\/p>\n<p>asp\u63d0\u4f9b\u4e86\u5f88\u597d\u7684\u4ee3\u7801\u4fdd\u62a4\u673a\u5236\uff0c\u6240\u6709\u7684asp\u4ee3\u7801\u90fd\u5728\u670d\u52a1\u5668\u7aef\u6267\u884c\u800c\u53ea\u8fd4\u56de\u7ed9\u5ba2\u6237\u7aef\u4ee3\u7801\u6267\u884c\u7ed3\u679c\u3002\u5373\u4fbf\u8fd9\u6837\uff0c\u5728\u8001\u7248\u672c\u7684IIS\u4e2d\u8fd8\u53ef\u4ee5\u5728\u6587\u4ef6\u540d\u540e\u9762\u5bb6::$DATA\u6765\u67e5\u770basp\u7684\u6e90\u4ee3\u7801\uff0c\u8fd9\u5df2\u7ecf\u5c5e\u4e8eWebServer\u5b89\u5168\u8303\u7574\u4e0d\u5728\u672c\u6587\u8ba8\u8bba\u8303\u56f4\u5185\u3002\u4e0b\u9762\u63d0\u51fa\u4e24\u70b9\u7b80\u5355\u7684\u5b89\u5168\u6ce8\u610f\u4e8b\u9879\u3002<br \/>\n\u3000\u3000\u867d\u7136\u5728asp\u4e2d\u5efa\u8bae\u5f15\u5165\u6587\u4ef6\u4ee5inc\u4f5c\u4e3a\u6269\u5c55\u540d\uff0c\u5728\u8fd9\u91cc\u4ecd\u5efa\u8bae\u4ee5 asp \u4f5c\u4e3a\u5f15\u6587\u4ef6\u7684\u6269\u5c55\u540d\u3002\u5f53\u8fd9\u4e9b\u4ee3\u7801\u5728\u5b89\u5168\u673a\u5236\u4e0d\u597d\u7684 WebServer \u4e0a\u8fd0\u884c\u65f6\uff0c\u53ea\u9700\u5728\u5730\u5740\u680f\u4e0a\u8f93\u5165\u5f15\u5165\u6587\u4ef6\u7684\u5730\u5740(inc\u4e3a\u6269\u5c55\u540d)\uff0c\u5c31\u53ef\u4ee5\u6d4f\u89c8\u8be5\u5f15\u5165\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u8fd9\u662f\u7531\u4e8e\u5728WebServer \u4e0a\uff0c\u5982\u679c\u6ca1\u6709\u5b9a\u4e49\u597d\u89e3\u6790\u67d0\u7c7b\u578b\uff08\u6bd4\u5982inc\uff09\u7684\u52a8\u6001\u8fde\u63a5\u5e93\u65f6\uff0c\u8be5\u6587\u4ef6\u4ee5\u6e90\u7801\u65b9\u5f0f\u663e\u793a\u3002<br \/>\n\u3000\u3000\u4e0d\u8981\u628a\u6570\u636e\u5e93\u6587\u4ef6\u653e\u5728\u7f51\u7ad9\u7ed3\u6784\u5185\u90e8\uff0c\u8fd9\u6837\uff0c\u5f53\u6076\u610f\u4eba\u58eb\u83b7\u53d6\u6570\u636e\u5e93\u8def\u5f84\u540e\uff0c\u5c31\u53ef\u4ee5\u8f7b\u6613\u83b7\u53d6\u8be5\u6570\u636e\u5e93\uff0c\u8fdb\u800c\u8086\u610f\u66f4\u6539\u6570\u636e\u5e93\u5185\u5bb9\u3002\u6bd4\u8f83\u597d\u7684\u505a\u6cd5\u662f\uff0c\u4e3a\u6570\u636e\u5e93\u5efa\u7acb DSN\uff08DateSource&nbsp;Name\uff09\uff0c\u800c\u5728\u8fdb\u884c\u6570\u636e\u5e93\u8bbf\u95ee\u65f6\u76f4\u63a5\u8bbf\u95ee\u8be5DSN<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ASP(Active&nbsp;Server&nbsp;Page)\u662f Microsoft \u516c\u53f8\u63a8\u51fa\u7684\u57fa\u4e8e PWS (Personal&nbsp;Web&nbsp;Server)&amp; IIS (InternetInformation&#038;n&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-236","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/comments?post=236"}],"version-history":[{"count":1,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/236\/revisions"}],"predecessor-version":[{"id":66107,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/236\/revisions\/66107"}],"wp:attachment":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media?parent=236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/categories?post=236"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/tags?post=236"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/topic?post=236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}