473,652 Members | 3,123 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need help with winhttp request to an httpS server

6 New Member
Hi

This is a question for people who know and use the winhttp DLL from MS.

I need to be able to simulate the entry by users of data into a web-based application. So I started with using winhttp to "dialogue" with web servers from a VB.Net app. It works fine as long as the server is a straightforward http server. I am able to retrieve pages from such a server and to send "answers" to the server to get the next page, and so on. No problems.

I now tried to do the same with an httpS (secure) server URL (because the real app I have to feed with data resides on such a secure server), and I just can't connect to it.

I have tried accessing one page like this:

' This page exists and I can connect interactively to it over IE
URL ="https://myroot/mypage/script.do"

' Open an HTTP connection
HttpReq.Open("G ET", URL, False)

' Set credentials for server.
HttpReq.SetCred entials("myuser ", "mypassword ", HTTPREQUEST_SET CREDENTIALS_FOR _SERVER)

' Send the HTTP Request.
HttpReq.Send()

That does not work at all, I get no response whatsoever from the server.

I don't know if I should set any proxy settings (and where do I find the values then?), which is one the HttpReq methods available.

I have looked at the SetClientCertif icate method, but I have no idea where certificates would be on my machine. The certificate examples from MS are hinting at the registry and HKEY_LOCAL_MACH INE, but I can't see anthing there in my registry that relates to certificates.

I am working as an external contractor in a large company, and I don't know what is preventing me from accessing the https-based page mentioned above, as I can access it interactively from the Internet Explorer (on the Intranet) without any problems. However, accessing it programatically just doesn't work, whereas it's a breeze with http servers.

Can somebody point me in the right direction ? What shall I look for ? What could be in the way of me accessing a secure http server on the Intranet of the company ?

Thanks for any help you can provide.

Balex
Jan 9 '07 #1
1 5063
Balex
6 New Member
Hi

I have solved my problem. I needed to define the proxy settings, now it works, but I have a new problem... that will be a new post...:-)

Balex

Hi

This is a question for people who know and use the winhttp DLL from MS.

I need to be able to simulate the entry by users of data into a web-based application. So I started with using winhttp to "dialogue" with web servers from a VB.Net app. It works fine as long as the server is a straightforward http server. I am able to retrieve pages from such a server and to send "answers" to the server to get the next page, and so on. No problems.

I now tried to do the same with an httpS (secure) server URL (because the real app I have to feed with data resides on such a secure server), and I just can't connect to it.

I have tried accessing one page like this:

' This page exists and I can connect interactively to it over IE
URL ="https://myroot/mypage/script.do"

' Open an HTTP connection
HttpReq.Open("G ET", URL, False)

' Set credentials for server.
HttpReq.SetCred entials("myuser ", "mypassword ", HTTPREQUEST_SET CREDENTIALS_FOR _SERVER)

' Send the HTTP Request.
HttpReq.Send()

That does not work at all, I get no response whatsoever from the server.

I don't know if I should set any proxy settings (and where do I find the values then?), which is one the HttpReq methods available.

I have looked at the SetClientCertif icate method, but I have no idea where certificates would be on my machine. The certificate examples from MS are hinting at the registry and HKEY_LOCAL_MACH INE, but I can't see anthing there in my registry that relates to certificates.

I am working as an external contractor in a large company, and I don't know what is preventing me from accessing the https-based page mentioned above, as I can access it interactively from the Internet Explorer (on the Intranet) without any problems. However, accessing it programatically just doesn't work, whereas it's a breeze with http servers.

Can somebody point me in the right direction ? What shall I look for ? What could be in the way of me accessing a secure http server on the Intranet of the company ?

Thanks for any help you can provide.

Balex
Jan 9 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2412
by: yukeshean | last post by:
how to use winhttp with asp to talk to Telemoney payment gateway server? how to use winhttp to make few communication link with telemoney and the links involve more than 1 asp page?
0
2599
by: thueirby | last post by:
h when i try to get data from site with clients sertificates with winHttp, I have a problem with result encoding (ru). Its OK with any sites without client sertificates, and its OK when i try to do it manualy with IE any help would be really great script looks like that Set oHttp = CreateObject("WinHttp.WinHttpRequest.5") oHttp.Option(2) = "Windows-1251" ' WinHttpRequestOption_URLCodePage = 2
0
1416
by: theintrepidfox | last post by:
Dear Group I came accross a very annoying behaviour of Visual Studio, giving me six hours of headache till I found the solution. This post is mainly for fellow developers for reference as it took me ages reading through tons of posts till I found an answer. However, I'm also interested why Visual Studio behaves that way. If anyone has a theorie on it please let me know.
1
7716
by: Dees | last post by:
Hi, I am facing a weird problem with HTTPS and Request.Url.AbsoluteUri in my ASP.NET application. Here is the scenario - 1. I have a menu page (Default.aspx), which has the following anchor - <a href="ApplicationHost.aspx">Open Application</a> 2. The ApplicationHost.aspx has the following code in its Load event handler - 'ASSUMPTION -
0
1232
by: Vijay | last post by:
Hi, I am trying to use Winhttp for making a SOAP request from a client to a Server, windows 2003. I have 2 issues: 1. I am making a Winhttp, HTTP request and I keep getting this error, Authentication failed, http code 401. I am passing the credentials as Base64 conversion. I do not know why I am getting this error. 2. If SSL is enabled on my server, then there is a procedure to go through,
15
4596
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to communicate with a MySQL database table on a web server, from inside of my company's Access-VBA application. I know VBA pretty well but have never before needed to do this HTTP/XML/MySQL type functions.
1
2285
by: Gaetan | last post by:
I'm doing a prrof of concept to develop an application to run under WinPE. The application will use WinHTTP to send requests to an ASPX file running IIS 6.0 My problem is that I do not know how to prevent IIS from returning the HTTP code of the ASPX page. The client side use something like this to initiate the request: set obj1 = createobject("WinHttp.WinHttpRequest.5.1") obj1.SetProxy HTTPREQUEST_PROXYSETTING_DIRECT obj1.Open "GET",...
0
4078
by: shlim | last post by:
Currently I'm using VB.Net to perform a http/https multipart form post to a servlet. I'm able to perform the post using HttpWebrequest via GetRequestStream(). However, the servlet returned me with "The remote server returned an error: (500) Internal Server Error". Obviously, this means that I have not posted all the parameters as the servlet requested. But I just can't seem to find out what went wrong with my code. Hope someone can enlighten me,...
3
2581
by: =?Utf-8?B?U3ViYQ==?= | last post by:
Hi I having a similar issue. my website url has https://blahblahblah but when i do Response.Write(Request.Url); it writes the url with http..........its really strange........i dont have a clue why the url in my browser has https and request.url has http........... using the request object i am not able to get the scheme whether its http or
0
8703
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8467
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8589
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7302
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5619
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4145
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4291
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1914
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.