473,508 Members | 2,281 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("GET", URL, False)

' Set credentials for server.
HttpReq.SetCredentials("myuser", "mypassword", HTTPREQUEST_SETCREDENTIALS_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 SetClientCertificate 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_MACHINE, 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 5049
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("GET", URL, False)

' Set credentials for server.
HttpReq.SetCredentials("myuser", "mypassword", HTTPREQUEST_SETCREDENTIALS_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 SetClientCertificate 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_MACHINE, 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
2397
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
2587
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...
0
1408
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...
1
7692
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 -...
0
1221
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,...
15
4564
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...
1
2282
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...
0
4040
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...
3
2565
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...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7123
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7324
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7382
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...
1
7042
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...
1
5052
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...
0
3193
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...
0
1556
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
766
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.