asp-classic

Problem adding JSON content to WinHttpRequest POST request in classic ASP

扶醉桌前 提交于 2020-04-16 02:49:09
问题 I am trying to retrieve data using an NHS API and the instructions are as follows... Endpoint https://api.nhs.uk/service-search/search?api-version=1 Method POST Headers Content-Type: application/json subscription-key: MYKEYHERE Body { "filter": "OrganisationTypeID eq 'PHA'", "orderby": "OrganisationName", "top": 25, "skip": 0, "count": true } Following the answer here How can I post data using cURL in asp classic? I tried this... <% Dim http: Set http = Server.CreateObject("WinHttp

How to send a HTTP POST from Classic ASP with a parameter to a WEB API?

和自甴很熟 提交于 2020-04-11 04:34:08
问题 I am trying to create a call to a WEB API on the same machine on another port. It works fine and sends back the string and hits the .NET breakpoint but the parameter is never being passed..(it is null) .. Is there something I am missing in the classic ASP code to pass that string ? (DataToSend) My calling code: <% Response.Buffer = True Dim xml ' Set xml = Server.CreateObject("Microsoft.XMLHTTP") Set xml = server.Createobject("MSXML2.XMLHTTP") DataToSend="<?xml version=""1.0"" encoding=""UTF

How to send a HTTP POST from Classic ASP with a parameter to a WEB API?

我们两清 提交于 2020-04-11 04:33:49
问题 I am trying to create a call to a WEB API on the same machine on another port. It works fine and sends back the string and hits the .NET breakpoint but the parameter is never being passed..(it is null) .. Is there something I am missing in the classic ASP code to pass that string ? (DataToSend) My calling code: <% Response.Buffer = True Dim xml ' Set xml = Server.CreateObject("Microsoft.XMLHTTP") Set xml = server.Createobject("MSXML2.XMLHTTP") DataToSend="<?xml version=""1.0"" encoding=""UTF

Need to read width/height from graphics file with VBScript/ASP classic

六眼飞鱼酱① 提交于 2020-03-16 09:16:21
问题 I need to read a graphics file and get the width/height in VBScript (ASP). I found a package called gfxSpex that seems to be what a lot of people use but the GIFs get the width right but not the height. PNGs don't work at all as the routine is looking for the type in 0-3 and that's %PN in the .png files. Function gfxSpex(flnm, width, height, depth, strImageType) Dim strPNG Dim strGIF Dim strBMP Dim strType strType = "" strImageType = "(unknown)" gfxSpex = False strPNG = Chr(137) & Chr(80) &

Creating a AWS v4 Signature for AWIS

我的梦境 提交于 2020-03-16 06:44:16
问题 For years we've been using the AWS v2 signature which is now replaced by v4. I'm slowly working through all the steps but have come unstuck on step 3 where it's asking for HMAC-SHA256 encryptions that output in binary format. https://docs.aws.amazon.com/AlexaWebInfoService/latest/CalculatingSignatures.html https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html I need to do this in Classic ASP , I have scripts that encode SHA256 but nothing I can find that will output in

Convert string to integer .asp classic

早过忘川 提交于 2020-03-14 07:50:07
问题 I have the following code, comments detail what should happen: averageNum = myArray2(0) 'assign variable response.write(TypeName(averageNum)&"<br>") 'check var type: string as expected averageNum = CInt(averageNum) 'convert to integer When I run this is I get Type mismatch: 'CInt' I need to turn the variable into an integer as I need to perform calculations with it 回答1: I would be checking that the value of myArray2(0) is an integer as you're expecting. Simple way to do this is using

Convert string to integer .asp classic

北城余情 提交于 2020-03-14 07:48:34
问题 I have the following code, comments detail what should happen: averageNum = myArray2(0) 'assign variable response.write(TypeName(averageNum)&"<br>") 'check var type: string as expected averageNum = CInt(averageNum) 'convert to integer When I run this is I get Type mismatch: 'CInt' I need to turn the variable into an integer as I need to perform calculations with it 回答1: I would be checking that the value of myArray2(0) is an integer as you're expecting. Simple way to do this is using

Encrypting string gives different results

≡放荡痞女 提交于 2020-03-06 11:06:15
问题 I've been given the task to make two older systems work together. The first is written in ASP Classic and the second in C#. The ASP-C system have generated an encrypted string and stored in the database. Now I need the C# to do the same; providing the str and key should give the same result as the ASP-C. The str: 1234567890 The key: 12$1$doFmp8gD$7Es.78EumklLvtraylRQy034 The ASP-C encryption function: Function EncryptString(str, key) newStr = "" strLen = Len(str) keyLen = Len(key) keyPos = 1

Encrypting string gives different results

天涯浪子 提交于 2020-03-06 10:58:21
问题 I've been given the task to make two older systems work together. The first is written in ASP Classic and the second in C#. The ASP-C system have generated an encrypted string and stored in the database. Now I need the C# to do the same; providing the str and key should give the same result as the ASP-C. The str: 1234567890 The key: 12$1$doFmp8gD$7Es.78EumklLvtraylRQy034 The ASP-C encryption function: Function EncryptString(str, key) newStr = "" strLen = Len(str) keyLen = Len(key) keyPos = 1

batch file execution asp classic

自闭症网瘾萝莉.ら 提交于 2020-03-04 21:24:14
问题 I need help executing a batch file from a client (accessing via HTTP intranet executing using ASP Classic). OS used: Client (Windows XP) - Here is where the user will access the HTML page. Server (Windows server 2003) - Here is where the folder is being created including the batch file. This is also where the ASP pages and HTML pages is stored and run through IIS Scenario: The user will access an HTML page that is linked to an asp page.... HTML code: <html> <body> <form method="GET" action=