Avatar of Keith McElroy
Keith McElroy
 asked on

The following code now fails likely due to this backend server changed to https. What other adjustments need to be made so this works?

Classic ASP page fails due to https

Error:

HTTP Error 403.4 - Forbidden

The page you are trying to access is secured with Secure Sockets Layer (SSL).

The requesting page and the url destination are in the same directory.
Server.MapPath yields the same error 


<%
dim data
Set httpRequest = Server.CreateObject("MSXML2.ServerXMLHTTP")
httpRequest.Open "POST", "https://servername/filename.asp", False
httpRequest.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

data = "runner=runstring"

httpRequest.send(data)
postResponse = httpRequest.responseText

response.write postResponse
%>

Open in new window


ASP* httpserver

Avatar of undefined
Last Comment
Keith McElroy

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Scott Fell

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Dave Baldwin

What OS and IIS server version are you running on?
Keith McElroy

ASKER
Thank you for the help.  As always, EE makes me re-think the issue a better way.
Discovered that the following line of code solved the issue
httpRequest.SetOption 2, httpRequest.GetOption(2)
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck