{"id":68170,"date":"2018-07-15T19:25:13","date_gmt":"2018-07-15T11:25:13","guid":{"rendered":"http:\/\/www.xiaoyebailong.com\/?p=68170"},"modified":"2018-07-24T07:25:24","modified_gmt":"2018-07-23T23:25:24","slug":"asp%e4%b9%8b%e5%be%ae%e4%bf%a1%e6%94%af%e4%bb%98%ef%bc%88%e4%b8%8d%e5%80%9f%e5%8a%a9%e5%85%b6%e4%bb%96%e8%af%ad%e8%a8%80%ef%bc%89","status":"publish","type":"post","link":"http:\/\/www.xiaoyebailong.com\/index.php\/2018\/07\/15\/68170.htm","title":{"rendered":"ASP\u4e4b\u5fae\u4fe1\u652f\u4ed8\uff08\u4e0d\u501f\u52a9\u5176\u4ed6\u8bed\u8a00\uff09"},"content":{"rendered":"<p>\u8fdb\u5165\u5fae\u4fe1\u5546\u6237\u540e\u53f0\u8bbe\u7f6e\u5bc6\u5319\u8ddf\u4e0b\u8f7d\u5fae\u4fe1\u652f\u4ed8\u8bc1\u4e66<\/p>\n<p>\u5bfc\u5165\u8bc1\u4e66\uff1a<\/p>\n<p>\u5c06\u5fae\u4fe1\u652f\u4ed8\u8bc1\u4e66\u4f20\u5230\u7f51\u7ad9\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u4e00\u4e2a\u76ee\u5f55\uff0c\u5e76\u89e3\u538b\uff0c\u89e3\u538b\u51fa\u6765\u540e\u6709\u5fae\u4fe1\u652f\u4ed8API\u8bc1\u4e66\u5171\u56db\u4efd\uff08\u8bc1\u4e66pkcs12\u683c\u5f0f\u3001\u8bc1\u4e66pem\u683c\u5f0f\u3001\u8bc1\u4e66\u5bc6\u94a5pem\u683c\u5f0f\u3001CA\u8bc1\u4e66\uff09\uff0c\u5728\u670d\u52a1\u5668\u4e0a\u64cd\u4f5c\uff1a<\/p>\n<p>\u4e00\u3001\u5728CMD\u91cc\u8f93\u5165mmc\u56de\u8f66\u6253\u5f00\u201c\u63a7\u5236\u53f0\u201d\uff0c<\/p>\n<p>\u5728\u201c\u6587\u4ef6\u201d\u2192\u201c\u6dfb\u52a0\/\u5220\u9664\u7ba1\u7406\u5355\u5143\u201d\uff0c\u6dfb\u52a0\u201c\u8bc1\u4e66\u201d\u2192\u201c\u6211\u7684\u7528\u6237\u5e10\u6237\u201d\uff0c\u518d\u6dfb\u52a0\u201c\u8bc1\u4e66\u201d\u2192\u201c\u8ba1\u7b97\u673a\u5e10\u6237\u201d\u7136\u540e<\/p>\n<p>[A]\u5728\u201c\u63a7\u5236\u53f0\u6839\u8282\u70b9\u201d\u2192 \u201c\u8bc1\u4e66 &#8211; \u5f53\u524d\u7528\u6237\u201d\u2192\u201c\u4e2a\u4eba\u201d\u2192\u201c\u8bc1\u4e66\u201d\u4e0a\u53f3\u952e\u70b9\u51fb\u9009\u62e9\u201c\u5bfc\u5165\u201d\u8bc1\u4e66\uff0c\u7136\u540e\u6839\u636e\u63d0\u793a\u5bfc\u5165\u5230\u4e4b\u524d\u4ece\u5fae\u4fe1\u5546\u6237\u5e73\u53f0\u4e0a\u4e0b\u8f7d\u7684\u8bc1\u4e66\u6587\u4ef6apiclient_cert.p12\u3002<br \/>\n[B]\u5728\u201c\u63a7\u5236\u53f0\u6839\u8282\u70b9\u201d\u2192\u201c\u8bc1\u4e66 &#8211; \u5f53\u524d\u7528\u6237\u201d\u2192\u201c\u4e2d\u95f4\u8bc1\u4e66\u9881\u53d1\u673a\u6784\u201d\u2192\u201c\u8bc1\u4e66\u201d\u4e0a\u53f3\u952e\u70b9\u51fb\u9009\u62e9\u201c\u5bfc\u5165\u201d\u8bc1\u4e66\uff0c\u7136\u540e\u6839\u636e\u63d0\u793a\u5bfc\u5165\u5230\u4e4b\u524d\u4ece\u5fae\u4fe1\u5546\u6237\u5e73\u53f0\u4e0a\u4e0b\u8f7d\u7684\u8bc1\u4e66\u6587\u4ef6apiclient_cert.p12\u3002<br \/>\n[C]\u5728\u201c\u63a7\u5236\u53f0\u6839\u8282\u70b9\u201d\u2192\u201c\u8bc1\u4e66\uff08\u672c\u5730\u8ba1\u7b97\u673a\uff09\u201d\u2192\u201c\u4e2a\u4eba\u201d\u2192\u201c\u8bc1\u4e66\u201d\u4e0a\u53f3\u952e\u70b9\u51fb\u9009\u62e9\u201c\u5bfc\u5165\u201d\u8bc1\u4e66\uff0c\u7136\u540e\u6839\u636e\u63d0\u793a\u5bfc\u5165\u5230\u4e4b\u524d\u4ece\u5fae\u4fe1\u5546\u6237\u5e73\u53f0\u4e0a\u4e0b\u8f7d\u7684\u8bc1\u4e66\u6587\u4ef6apiclient_cert.p12\u3002<br \/>\n[D]\u5728\u201c\u63a7\u5236\u53f0\u6839\u8282\u70b9\u201d\u2192\u201c\u8bc1\u4e66\uff08\u672c\u5730\u8ba1\u7b97\u673a\uff09\u201d\u2192\u201c\u4e2d\u7ea7\u8bc1\u4e66\u9881\u53d1\u673a\u6784\u201d\u2192\u201c\u8bc1\u4e66\u201d\u4e0a\u53f3\u952e\u70b9\u51fb\u9009\u62e9\u201c\u5bfc\u5165\u201d\u8bc1\u4e66\uff0c\u7136\u540e\u6839\u636e\u63d0\u793a\u5bfc\u5165\u5230\u4e4b\u524d\u4ece\u5fae\u4fe1\u5546\u6237\u5e73\u53f0\u4e0a\u4e0b\u8f7d\u7684\u8bc1\u4e66\u6587\u4ef6apiclient_cert.p12\u3002<\/p>\n<p><a>\u4e8c\u3001\u5230\u5fae\u8f6f\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5\u00a0winhttpcertcfg.exe \u6587\u4ef6\uff0c\u4e0b\u8f7d\u94fe\u63a5\uff1a<\/a><\/p>\n<p>http:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=19801<\/p>\n<p>\u4e09\u3001\u5b89\u88c5 winhttpcertcfg.exe \u540e\uff0c\u8fdb\u5165\u5b89\u88c5\u76ee\u5f55\uff08\u4e00\u822c\u662f\uff1aC:\\Program Files (x86)\\Windows Resource Kits\\Tools \uff09\uff0c\u628a\u91cc\u9762\u7684 winhttpcertcfg.exe \u590d\u5236\u4e00\u4efd\u5230\u8bc1\u4e66\u6587\u4ef6\u6240\u5728\u7684\u6587\u4ef6\u5939\u4e2d\uff1b<\/p>\n<p>\u56db\u3001\u5728CMD\u91cc\u8f6c\u5230\u8bc1\u4e66\u6240\u5728\u7684\u76ee\u5f55\uff0c\u7136\u540e\u9010\u884c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4<\/p>\n<p>\uff08\u6ce8\u610f\uff1a\u4ee5\u4e0b\u547d\u4ee4\u4e2d\u7684\u00a0password\u00a0\u4e3a\u4f60\u7684\u8bc1\u4e66\u5bc6\u7801\uff0c\u5bc6\u7801\u4e00\u822c\u662f\u5546\u6237\u53f7\uff09\uff1a<\/p>\n<p>winhttpcertcfg -g -i &#8220;apiclient_cert.p12&#8221; -c LOCAL_MACHINE\\My -a &#8220;Network Service&#8221; -p\u00a0password<\/p>\n<p>winhttpcertcfg -g -c LOCAL_MACHINE\\My -s &#8220;MMPay&#8221; -a &#8220;Network Service&#8221;<\/p>\n<p>winhttpcertcfg -g -c LOCAL_MACHINE\\My -s &#8220;MMPay&#8221; -a &#8220;EveryOne&#8221;<\/p>\n<p>&nbsp;<\/p>\n<p>\u5173\u4e8exmlhttp\u8c03\u7528https<\/p>\n<p>Function Postwxpay(HttpUrl,PostData)<br \/>\nDim Http<br \/>\nSet Http=server.createobject(&#8220;Msxml2.ServerXMLHTTP.3.0&#8221;)<br \/>\nHttp.setOption(3) = &#8220;LOCAL_MACHINE\\My\\MMPay&#8221;<br \/>\nHttp.SetTimeouts 65000, 65000, 65000, 65000<br \/>\nHttp.open &#8220;POST&#8221;,HttpUrl,False<br \/>\nHttp.setRequestHeader &#8220;Content-Length&#8221;,Len(PostData)<br \/>\nHttp.setRequestHeader &#8220;Content-Type&#8221;, &#8220;application\/x-www-form-urlencoded&#8221;<br \/>\nHttp.Send PostData<br \/>\nPostwxpay=bytesToBSTR(Http.responseBody,&#8221;utf-8&#8243;)<br \/>\nSet Http=Nothing<br \/>\nEnd Function<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fdb\u5165\u5fae\u4fe1\u5546\u6237\u540e\u53f0\u8bbe\u7f6e\u5bc6\u5319\u8ddf\u4e0b\u8f7d\u5fae\u4fe1\u652f\u4ed8\u8bc1\u4e66 \u5bfc\u5165\u8bc1\u4e66\uff1a \u5c06\u5fae\u4fe1\u652f\u4ed8\u8bc1\u4e66\u4f20\u5230\u7f51\u7ad9\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u4e00\u4e2a\u76ee\u5f55\uff0c\u5e76\u89e3\u538b\uff0c\u89e3\u538b\u51fa\u6765\u540e\u6709\u5fae\u4fe1\u652f\u4ed8API\u8bc1\u4e66\u5171\u56db\u4efd\uff08\u8bc1\u4e66pkcs12\u683c\u5f0f\u3001\u8bc1\u4e66pem\u683c\u5f0f\u3001\u8bc1\u4e66\u5bc6\u94a5pem\u683c\u5f0f\u3001CA\u8bc1\u4e66\uff09\uff0c\u5728\u670d\u52a1\u5668\u4e0a\u64cd\u4f5c\uff1a \u4e00\u3001\u5728&#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":[102,383],"topic":[],"class_list":["post-68170","post","type-post","status-publish","format-standard","hentry","category-technology","tag-102","tag-383"],"_links":{"self":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/68170","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=68170"}],"version-history":[{"count":1,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/68170\/revisions"}],"predecessor-version":[{"id":68171,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/68170\/revisions\/68171"}],"wp:attachment":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media?parent=68170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/categories?post=68170"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/tags?post=68170"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/topic?post=68170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}