asp-classic 相关问题

Active Server Pages(ASP),也称为Classic ASP或ASP Classic,是Microsoft第一个用于动态生成的Web页面的服务器端脚本引擎。 ASP.NET的引入导致使用术语Classic ASP作为原始技术。

在经典 ASP 中的 Msxml2.ServerXMLHTTP 请求中使用特定用户/域

我们有一个需要与之通信的客户端,他们的 API 页面仅支持 NTLM 身份验证。 我们的网站运行经典的 ASP (jScript),所以请原谅语法与什么略有不同...

回答 1 投票 0

使用 microsoft.xmlhttp 通过 vbs 调用网页时,Javascript 将不会执行

我有一个流程,我创建了一个轮询函数,该函数通过 vbs 脚本执行 microsoft.xmlhttp 请求。 该请求获取一个 asp 经典页面,该页面检查 MSSQL 表中是否有新插入...

回答 1 投票 0

经典 ASP:从“Content-Disposition:form-data”请求变量

我正在将 Paypal 的 Checkout API 集成到旧版经典 ASP 站点中。 通过这个前端js发送时: var postData = {paypal_order_check: 1, order_id: orderData.id}; 获取('

回答 1 投票 0

Json 未被解析 ConvertAPI

我正在使用经典的asp和JSON将html转换为pdf。我使用以下方式发送请求: ''将输出转换为pdf varURL = "https://" & varServerLive & "/

回答 3 投票 0

ASP Classic / CORS - 设置 CORS 标头时报告无标头

提前道歉,我是 CORS 新手,所以可能缺少一些东西。 我正在尝试在当前的本地主机中设置从一个本地主机端口到另一个本地主机端口的 CORS。我已经确认了...

回答 2 投票 0

ASP Noob 需要 vimeo/youtube 支持

我的任务是更新 ASP 系统以支持 vimeo/youtube 嵌入。 有问题的代码文件已声明: <% @LANGUAGE = VBScript %> 这个脚本包含几个函数...

回答 1 投票 0

编写 XML 时的变量 - 经典 ASP

我有下面的代码,我如何用变量替换下面的“1”? 设置 objorderline1 = objXML.createElement("OrderLine") 设置 objorderline1att = objXML.createAttribute(...

回答 1 投票 0

从传递的变量中读取文本文件

我已经查看了所有类似的问题,除非我错过了什么,否则他们不会回答我的问题;所以这里是: 我想在我的网页上打开一个文本文件;但标题是一个已通过的变量...

回答 1 投票 0

在 CKFinder v3 中将网站成员身份验证为用户

在开始这个问题之前,我应该指出我对 ASP.NET 和 C# 的了解几乎为零。 我正在尝试将 CKFinder v3 的 ASP.NET 版本集成到网站中

回答 2 投票 0

IIS 重写规则中的多个条件未被识别

我正在使用 IIS 重写规则来尝试重定向子域 - 例如 来自:www.example.com 至:example.com 或者 来自:this.example.com 至:example.com 规则: 我正在使用 IIS 重写规则来尝试重定向子域 - 例如 来自:www.example.com 致:example.com 或者 来自:this.example.com 致:example.com 规则: <rule name="RedirectAll" enabled="true" stopProcessing="false"> <match url="(.*)" /> <conditions logicalGrouping="MatchAny" trackAllCaptures="false"> <add input="{HTTP_HOST}" pattern="^(www\.)(.*)$" /> <add input="{HTTP_HOST}" pattern="^(this\.)(.*)$" /> </conditions> <action type="Redirect" url="https://{C:2}{REQUEST_URI}" redirectType="Permanent" /> </rule> www重定向有效,但规则的this部分不会触发,因此,如果我转到this.example.com,我最终会得到以下响应: 您的连接不是私人的 攻击者可能试图窃取您的 来自 this.example.com 的信息(例如密码、消息 或信用卡)。了解更多NET::ERR_CERT_COMMON_NAME_INVALID 我并不是在寻求有关该错误的帮助,因为我意识到该错误是因为我没有链接到子域的证书。 即使我更改规则并删除 www 部分,this 条件也不会触发: <rule name="RedirectAll" enabled="true" stopProcessing="false"> <match url="(.*)" /> <conditions logicalGrouping="MatchAny" trackAllCaptures="false"> <add input="{HTTP_HOST}" pattern="^(this\.)(.*)$" /> </conditions> <action type="Redirect" url="https://{C:2}{REQUEST_URI}" redirectType="Permanent" /> </rule> 如果我在 IIS 中测试上述规则 this 它工作正常: 为什么在网站上使用时只有 www 条件有效,而 this 测试不起作用,即使根据屏幕截图测试这两个规则时,两者都工作正常? 一旦该规则包含在 web.config 中并与现有设置一起包含,IIS 是否会忽略除 wwww 规则之外的任何内容? 下面列出了完整的 web.config。 <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <httpErrors errorMode="Custom" defaultResponseMode="ExecuteURL"> <remove statusCode="500" subStatusCode="100" /> <remove statusCode="500" subStatusCode="-1" /> <remove statusCode="404" subStatusCode="-1" /> <error statusCode="404" path="/error_404.asp" responseMode="ExecuteURL" /> <error statusCode="500" prefixLanguageFilePath="" path="/error_500.asp" responseMode="ExecuteURL" /> <error statusCode="500" subStatusCode="100" path="/error_500.asp" responseMode="ExecuteURL" /> </httpErrors> <rewrite> <!-- https://blog.elmah.io/web-config-redirects-with-rewrite-rules-https-www-and-more/ --> <rules> <rule name="RedirectToHTTPS" enabled="true" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> </conditions> <action type="Redirect" url="https://{SERVER_NAME}/{R:1}" redirectType="Permanent" /> </rule> <rule name="RedirectAll" enabled="true" stopProcessing="false"> <match url="(.*)" /> <conditions logicalGrouping="MatchAny" trackAllCaptures="false"> <add input="{HTTP_HOST}" pattern="^(www\.)(.*)$" /> <add input="{HTTP_HOST}" pattern="^(this\.)(.*)$" /> </conditions> <action type="Redirect" url="https://{C:2}{REQUEST_URI}" redirectType="Permanent" /> </rule> <!-- https://sublimecoding.com/blocking-bots-in-iis/ Added 30th September 2020 --> <rule name="RequestBlockingRule1" enabled="true" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_USER_AGENT}" matchType="Pattern" pattern="^$|EasouSpider|Add Catalog|PaperLiBot|Spiceworks|ZumBot|RU_Bot|Wget|Java/1.7.0_25|Slurp|FunWebProducts|80legs|Aboundex|AcoiRobot|Acoon Robot|AhrefsBot|aihit|AlkalineBOT|AnzwersCrawl|Arachnoidea|ArchitextSpider|archive|Autonomy Spider|Baiduspider|BecomeBot|benderthewebrobot|BlackWidow|Bork-edition|Bot mailto:[email protected]|botje|catchbot|changedetection|Charlotte|ChinaClaw|commoncrawl|ConveraCrawler|Covario|crawler|curl|Custo|data mining development project|DigExt|DISCo|discobot|discoveryengine|DOC|DoCoMo|DotBot|Download Demon|Download Ninja|eCatch|EirGrabber|EmailSiphon|EmailWolf|eurobot|Exabot|Express WebPictures|ExtractorPro|EyeNetIE|Ezooms|Fetch|Fetch API|filterdb|findfiles|findlinks|FlashGet|flightdeckreports|FollowSite Bot|Gaisbot|genieBot|GetRight|GetWeb!|gigablast|Gigabot|Go-Ahead-Got-It|Go!Zilla|GrabNet|Grafula|GT::WWW|hailoo|heritrix|HMView|houxou|HTTP::Lite|HTTrack|ia_archiver|IBM EVV|id-search|IDBot|Image Stripper|Image Sucker|Indy Library|InterGET|Internet Ninja|internetmemory|ISC Systems iRc Search 2.1|JetCar|JOC Web Spider|k2spider|larbin|larbin|LeechFTP|libghttp|libwww|libwww-perl|linko|LinkWalker|lwp-trivial|Mass Downloader|metadatalabs|MFC_Tear_Sample|Microsoft URL Control|MIDown tool|Missigua|Missigua Locator|Mister PiX|MJ12bot|MOREnet|MSIECrawler|msnbot|naver|Navroad|NearSite|Net Vampire|NetAnts|NetSpider|NetZIP|NextGenSearchBot|NPBot|Nutch|Octopus|Offline Explorer|Offline Navigator|omni-explorer|PageGrabber|panscient|panscient.com|Papa Foto|pavuk|pcBrowser|PECL::HTTP|PHP/|PHPCrawl|picsearch|pipl|pmoz|PredictYourBabySearchToolbar|RealDownload|Referrer Karma|ReGet|reverseget|rogerbot|ScoutJet|SearchBot|seexie|seoprofiler|Servage Robot|SeznamBot|shopwiki|sindice|sistrix|SiteSnagger|SiteSnagger|smart.apnoti.com|SmartDownload|Snoopy|Sosospider|spbot|suggybot|SuperBot|SuperHTTP|SuperPagesUrlVerifyBot|Surfbot|SurveyBot|SurveyBot|swebot|Synapse|Tagoobot|tAkeOut|Teleport|Teleport Pro|TeleportPro|TweetmemeBot|TwengaBot|twiceler|UbiCrawler|uptimerobot|URI::Fetch|urllib|User-Agent|VoidEYE|VoilaBot|WBSearchBot|Web Image Collector|Web Sucker|WebAuto|WebCopier|WebCopier|WebFetch|WebGo IS|WebLeacher|WebReaper|WebSauger|Website eXtractor|Website Quester|WebStripper|WebStripper|WebWhacker|WebZIP|WebZIP|Wells Search II|WEP Search|Widow|winHTTP|WWWOFFLE|Xaldon WebSpider|Xenu|yacybot|yandex|YandexBot|YandexImages|yBot|YesupBot|YodaoBot|yolinkBot|youdao|Zao|Zealbot|Zeus|ZyBORG|PetalBot|petalbot|aiohttp|Yahoo Ad monitoring" ignoreCase="true" negate="false" /> </conditions> <action type="CustomResponse" statusCode="403" statusReason="Forbidden: Access is denied." statusDescription="You do not have permission to view this directory or page using the credentials that you supplied." /> </rule> </rules> </rewrite> <httpCompression directory="%SystemDrive%\websites\_compressed" minFileSizeForComp="1024" noCompressionForProxies="false" noCompressionForHttp10="false"> <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" /> <staticTypes> <add mimeType="text/*" enabled="true" /> <add mimeType="message/*" enabled="true" /> <add mimeType="application/javascript" enabled="true" /> <add mimeType="application/json" enabled="true" /> <add mimeType="image/jpeg" enabled="true" /> <add mimeType="image/gif" enabled="true" /> <add mimeType="image/png" enabled="true" /> <add mimeType="application/javascript" enabled="true" /> <add mimeType="text/css" enabled="true" /> <add mimeType="*/*" enabled="false" /> </staticTypes> </httpCompression> <staticContent> <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" /> </staticContent> <tracing> <traceFailedRequests> <remove path="*" /> </traceFailedRequests> </tracing> <security> <requestFiltering> <filteringRules> <remove name="BlockBots" /> </filteringRules> </requestFiltering> </security> </system.webServer> </configuration> 您看到的错误消息“NET::ERR_CERT_COMMON_NAME_INVALID”表示 SSL 证书存在问题,因为它与您尝试访问的域不匹配。这就是您的规则无法按预期工作的原因。 SSL 证书是针对特定域名(通用名称)颁发的,或者可能包含具有通配符证书的多个子域(例如 *.example.com)。如果您对“example.com”使用常规 SSL 证书,而不是覆盖“this.example.com”的通配符证书,则当您尝试访问“this.example.com”时,SSL 握手将会失败。当然,重定向规则不会继续执行。

回答 1 投票 0

使用 ASP 页面从 SQL Server 存储过程返回数据[重复]

我有一个 .asp 页面,我正在向该页面传递数据,需要将信息发送到 SQL Server 存储过程,获取返回值,然后将其传递回主页。我目前有发送数据的页面...

回答 1 投票 0

如何将表单值传递到不同的重定向页面?

我刚刚开发了一个平台,可以在使用如下所示的表格提交ID号后立即打印单个ASP文档: ... 我刚刚开发了一个平台,可以在使用如下所示的表格提交 ID 号后立即打印单个 ASP 文档: <form action="http://localhost/teg/f1.asp" method="POST"> <input type="number" name="number" placeholder="Please Enter ID" /> <button type="submit">Print</button> </form> 在本例中,它打印一个名为 f1.asp 的文档。但是,我也有 f2.asp,因此我决定编写一次表单并包含一个下拉列表,让用户选择要打印的内容,而不是为两个单独的字段编写两次表单,但为此我想我需要另一页我称之为重定向。表格变化如下: <form action="http://localhost/teg/redirect.asp" method="POST" id="new"> <input type="number" name="number" placeholder="Please Enter ID" /> <button type="submit">Print</button> </form> <label> Type </label> <select name="list" form="new"> <option value="1">f1</option> <option value="2">f2</option> </select> 重定向 ASP 页面看起来: <html> <body> <% Dim list list = request.form("list") If list=1 Then response.redirect("f1.asp") Else If list=2 Then response.redirect("f2.asp") End If %> 最后,当使用下拉列表单击“打印”时,它可以完美重定向,但 ID 号字段中的“number”值未达到用户选择的文档类型,因此文档无法正确显示。相反,会出现以下数据库引擎错误:“80040e10”。任何帮助,将不胜感激。 请务必记住,HTTP 是无状态的,只有通过 Cookie 等技术,经典 ASP 才能跨 HTTP 请求将值存储在 Session 对象中。 目前,由于 Response.Redirect(),发送新请求时,Request.Form("number") 的值会丢失。有几种方法可以解决这个问题,我在这里重点介绍三种。 1.通过重定向将值作为查询字符串传递 最简单的方法是传递使重定向的页面正常工作所需的值。 <% 'Assign our form values to local variables. Dim list: list = Request.Form("list") & "" Dim id: id = Request.Form("number") & "" 'Check the value contain data and they are valid numeric values. If Len(list) > 0 And IsNumeric(list) Then list = CLng(list) Else list = 0 If Len(id) > 0 And IsNumeric(id) Then id = CLng(id) Else id = 0 '***** Only process if we have valid values to build the redirect. ***** Dim url If list > 0 And id > 0 Then 'We have valid values build our URL that we will use in 'the redirect call. url = "f" & list & ".asp?id=" & id Else 'Something not right with request go back to the form page. 'Setting this will send the page back to the form page when the 'redirect is called. url = "formpage.asp" End If 'Make the redirect request. Call Response.Redirect(url) %> 然后在重定向页面中使用 id 调用 Request.QueryString("id") 查询字符串值。 2.使用Server.Transfer()方法 在某些情况下你可以使用这种方法来简化代码。简而言之,它不是将其重定向,而是将请求的页面“缝合”到当前请求的底部,从而允许表单参数仍然可以访问,因为从技术上来说,就互联网浏览器而言,它仍然是相同的请求。 <% Dim list: list = Request.Form("list") & "" Dim id: id = Request.Form("number") & "" If Len(list) > 0 And IsNumeric(list) Then list = CLng(list) Else list = 0 If Len(id) > 0 And IsNumeric(id) Then id = CLng(id) Else id = 0 If list > 0 And id > 0 Then Call Server.Transfer("f" & list & ".asp") Else 'Handle invalid request here End If %> 您将能够在传输的页面中使用 Request 对象中的任何值,例如 .Form 和 QueryString,而不会产生错误,因为就服务器而言,它们仍然是同一页面。 3.将值存储在 Session 对象中 如果您在 IIS 中将 Enable Session State 设置为 True,您可以在 Session 对象内跨请求存储值(经典 ASP 使用会话 Cookie 来维护服务器内存中的会话状态)。 <% Dim list: list = Request.Form("list") & "" Dim id: id = Request.Form("number") & "" If Len(list) > 0 And IsNumeric(list) Then list = CLng(list) Else list = 0 If Len(id) > 0 And IsNumeric(id) Then id = CLng(id) Else id = 0 If list > 0 Then 'Store the value we want to persist in the Session. Session("PrintId") = id Call Response.Redirect("f" & list & ".asp") Else 'Handle invalid request here. End If %> 然后要将值返回到重定向页面内,请使用 varname = Session("PrintId")。 虽然已经很晚了,但稍微简单一点。无需进行重定向,只需使用操作 URL 和所有数据填充新表单,然后在验证后使用 JS 提交触发提交。缺点是 JS 可能会被破坏,但随后会做一个 catch,然后,好吧,替代选项。之所以迟回复,是因为我一直在寻找类似的东西,直到我意识到重定向是不必要的。 您的表格关闭得太早了: <form action="http://localhost/teg/redirect.asp" method="POST" id="new"> <input type="number" name="number" placeholder="Please Enter ID" /> <button type="submit">Print</button> </form> <---- THIS <label> Type </label> <select name="list" form="new"> <option value="1">f1</option> <option value="2">f2</option> </select> </form> <---- SHOULD BE HERE 其他答案都可以;然而,这回答了你的问题 为什么“你的”代码不起作用。

回答 3 投票 0

查找DBF数据库中所有表的名称

我正在尝试找出位于硬盘目录中的tables.DBF的名称。 随后,我需要知道它们的列的名称,但甚至连表的名称我也不知道...

回答 2 投票 0

如何对分组列表中的子项目进行编号

我正在使用经典的asp。我必须要桌子。第一个表称为“sorutip”,包含每个组的图块。名为“Questions41”的第二个表有问题。我...

回答 1 投票 0

经典 ASP 将变量值插入 Access DB

如何在经典 ASP/VB 中运行多个插入查询

回答 1 投票 0

IIS 重定向规则重定向所有子域流量

我在我网站的 web.config 文件中定义了这个重写规则: 我在我网站的 web.config 文件中定义了此重写规则: <rule name="RedirectWwwToNonWww" enabled="true" stopProcessing="false"> <match url="(.*)" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input="{HTTP_HOST}" pattern="^(www\.)(.*)$" /> </conditions> <action type="Redirect" url="https://{C:2}{REQUEST_URI}" redirectType="Permanent" /> </rule> 规则将重定向如下: 来自:www.example.com/test 致:example.com/test 该规则工作正常,但是,我想更改规则,以便所有子域重定向到主站点 - 例如 来自:this.example.com/test 致:example.com/test 或者 来自:something.example.com/test 致:example.com/test 我正在努力研究如何更改正则表达式来实现这一目标。 我尝试过这种模式: <add input="{HTTP_HOST}" pattern="^([^.]+)\.(.*)$" /> 其工作原理如下: 来自:something.example.com/test.html 致:example.com/test.html 但是,当没有子域时,它不会执行我的要求,因为我最终得到: 来自:example.com/test.html 致:com/test.html 如何修改规则,以便子域重定向到主站点,但如果没有子域,则规则不会触发? 我提供一个思路,就是可以用多个条件来匹配,然后设置为logicalGrouping="MatchAny",只要满足其中一个条件,就会进行重定向。您可以使用此示例作为参考: <rule name="RedirectWwwToNonWww" enabled="true" stopProcessing="false"> <match url="(.*)" /> <conditions logicalGrouping="MatchAny" trackAllCaptures="false"> <add input="{HTTP_HOST}" pattern="^(www\.)(.*)$" /> <add input="{HTTP_HOST}" pattern="^([^.]+)\.(.*)$" /> </conditions> <action type="Redirect" url="https://{C:2}{REQUEST_URI}" redirectType="Permanent" /> </rule>

回答 1 投票 0

如何解决“vbScript网站中回收IIS应用程序池错误”?

这个应用每天至少需要回收3次,目前这是一个很大的问题。这不是一个大规模的逻辑应用,主要用于上传和下载

回答 1 投票 0

计算数据库中的标签

我在数据库字段中有一个标签列表。有些或大多数出现多次。 我想列出不同的标签名称,并将每个不同标签出现的次数放在括号中。这是我的代码...

回答 1 投票 0

IIS 中使用本地主机 401.3 错误的 ASP 页面没有权限

我刚刚安装了 IIS,这样我就可以在浏览器中查看 asp 文件,但是当我将地址放入浏览器中时:http://localhost/index.asp 我收到错误。 该错误表明: HTTP 错误 401....

回答 7 投票 0

选择带参数的asp classic语句

我正在使用asp classic和sql server,我想更改我的sql语句以防止注入 我的sql语句 这是我的sql语句,运行正常 %>

回答 0 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.