473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

webReference.SetURL method with https connections

Basically we have a web method with a dynamic URL. The client is developed
in C++ and I've been using the webReference.SetUrl(
"http://test.example.com..." ) method successfully with various web method
URLs.

However, when we switched to using a secure connection, the call to
webReference.SetUrl( "https://test.example.com..." ) no longer functions.
The SetUrl() method is actually successful, but any following calls in to the
web reference fail.

I created a test app in C# and used the webRefence.URL property to
successfully set the url to both non-secure and secure URLs. Both work fine.
So the problem resides specifically with using https:// in the C++ client.
It's either a bug or I'm missing a step.

Any ideas?

Thank you very much,
Jason
Nov 23 '05 #1
4 6454
Hi Jason,

Welcome to webservice newsgroup.
From your description, you've creating webservice proxy in C++ application
to consume a certain webservice. It works well when through normal http
protocol. However, when the service switch to use https , the client side
will fail, yes?

As for the C++ application, is it a managed c++ application or pure
unmanaged c++ app? Based on my local test, the autogenerated unmanaged
proxy class seems hasn't provide the SetUrl function. Or maybe there has
something different from my setting?

In addition, have you tried cosuming some other webservice protected
through SSL? Just to confirm whether it is a service specific issue. Also,
we can try hard coding the https url in the proxy and compiled it and test
again.

Please feel free to let me know if there're anything else I missed.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
Thread-Topic: webReference.SetURL method with https connections
thread-index: AcXfJxcxIqIdX3GRRruJi930mi7alA==
X-WBNR-Posting-Host: 66.237.208.195
From: "=?Utf-8?B?SmFzb24gUA==?=" <lu******@online.nospam>
Subject: webReference.SetURL method with https connections
Date: Tue, 1 Nov 2005 12:59:03 -0800
Lines: 19
Message-ID: <32**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
microsoft.public.dotnet.framework.webservices:8441
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Basically we have a web method with a dynamic URL. The client is developed
in C++ and I've been using the webReference.SetUrl(
"http://test.example.com..." ) method successfully with various web method
URLs.

However, when we switched to using a secure connection, the call to
webReference.SetUrl( "https://test.example.com..." ) no longer functions.
The SetUrl() method is actually successful, but any following calls in to
the
web reference fail.

I created a test app in C# and used the webRefence.URL property to
successfully set the url to both non-secure and secure URLs. Both work
fine.
So the problem resides specifically with using https:// in the C++ client.

It's either a bug or I'm missing a step.

Any ideas?

Thank you very much,
Jason

Nov 23 '05 #2
Hi Steven,

We were able to debug further into the problem and ended up at line 2142 of
atlhttp.inl which says:

if ( currScheme != ATL_URL_SCHEME_HTTP &&
!TSocketClass:SupportsScheme(currScheme) )
return false; // only support HTTP

On MSDN I found the following reference, which answers the question directly:

http://msdn.microsoft.com/library/de...ttpclientt.asp

"For this release, ATL Server does not support the HTTPS protocol either, but
the SecureSoap Sample demonstrates how CAtlHttpClientT can be used with
a class that provides HTTPS support."

Thanks,
Jason
"Steven Cheng[MSFT]" wrote:
Hi Jason,

Welcome to webservice newsgroup.
From your description, you've creating webservice proxy in C++ application
to consume a certain webservice. It works well when through normal http
protocol. However, when the service switch to use https , the client side
will fail, yes?

As for the C++ application, is it a managed c++ application or pure
unmanaged c++ app? Based on my local test, the autogenerated unmanaged
proxy class seems hasn't provide the SetUrl function. Or maybe there has
something different from my setting?

In addition, have you tried cosuming some other webservice protected
through SSL? Just to confirm whether it is a service specific issue. Also,
we can try hard coding the https url in the proxy and compiled it and test
again.

Please feel free to let me know if there're anything else I missed.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
Thread-Topic: webReference.SetURL method with https connections
thread-index: AcXfJxcxIqIdX3GRRruJi930mi7alA==
X-WBNR-Posting-Host: 66.237.208.195
From: "=?Utf-8?B?SmFzb24gUA==?=" <lu******@online.nospam>
Subject: webReference.SetURL method with https connections
Date: Tue, 1 Nov 2005 12:59:03 -0800
Lines: 19
Message-ID: <32**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:8441
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Basically we have a web method with a dynamic URL. The client is developed
in C++ and I've been using the webReference.SetUrl(
"http://test.example.com..." ) method successfully with various web method
URLs.

However, when we switched to using a secure connection, the call to
webReference.SetUrl( "https://test.example.com..." ) no longer functions.
The SetUrl() method is actually successful, but any following calls in to
the
web reference fail.

I created a test app in C# and used the webRefence.URL property to
successfully set the url to both non-secure and secure URLs. Both work
fine.
So the problem resides specifically with using https:// in the C++ client.

It's either a bug or I'm missing a step.

Any ideas?

Thank you very much,
Jason

Nov 23 '05 #3
Thank you for your followup.

Glad that you've figured out the problem. If there're any further things we
can help, please feel free to post here.
Good Luck!

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
Thread-Topic: webReference.SetURL method with https connections
thread-index: AcXfv8fE9I5reAZORsalS/nQcZtgWw==
X-WBNR-Posting-Host: 66.237.208.195
From: "=?Utf-8?B?SmFzb24gUA==?=" <lu******@online.nospam>
References: <32**********************************@microsoft.co m>
<Yw**************@TK2MSFTNGXA01.phx.gbl>
Subject: RE: webReference.SetURL method with https connections
Date: Wed, 2 Nov 2005 07:12:03 -0800
Lines: 104
Message-ID: <4E**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
microsoft.public.dotnet.framework.webservices:8451
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hi Steven,

We were able to debug further into the problem and ended up at line 2142 of
atlhttp.inl which says:

if ( currScheme != ATL_URL_SCHEME_HTTP &&
!TSocketClass:SupportsScheme(currScheme) )
return false; // only support HTTP

On MSDN I found the following reference, which answers the question
directly:

http://msdn.microsoft.com/library/de...us/vclib/html/
vclrfcatlhttpclientt.asp

"For this release, ATL Server does not support the HTTPS protocol either,
but
the SecureSoap Sample demonstrates how CAtlHttpClientT can be used with
a class that provides HTTPS support."

Thanks,
Jason
"Steven Cheng[MSFT]" wrote:
Hi Jason,

Welcome to webservice newsgroup.
From your description, you've creating webservice proxy in C++ application to consume a certain webservice. It works well when through normal http
protocol. However, when the service switch to use https , the client side
will fail, yes?

As for the C++ application, is it a managed c++ application or pure
unmanaged c++ app? Based on my local test, the autogenerated unmanaged
proxy class seems hasn't provide the SetUrl function. Or maybe there has
something different from my setting?

In addition, have you tried cosuming some other webservice protected
through SSL? Just to confirm whether it is a service specific issue. Also, we can try hard coding the https url in the proxy and compiled it and test again.

Please feel free to let me know if there're anything else I missed.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
Thread-Topic: webReference.SetURL method with https connections
thread-index: AcXfJxcxIqIdX3GRRruJi930mi7alA==
X-WBNR-Posting-Host: 66.237.208.195
From: "=?Utf-8?B?SmFzb24gUA==?=" <lu******@online.nospam>
Subject: webReference.SetURL method with https connections
Date: Tue, 1 Nov 2005 12:59:03 -0800
Lines: 19
Message-ID: <32**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:8441
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Basically we have a web method with a dynamic URL. The client is developed in C++ and I've been using the webReference.SetUrl(
"http://test.example.com..." ) method successfully with various web method URLs.

However, when we switched to using a secure connection, the call to
webReference.SetUrl( "https://test.example.com..." ) no longer functions. The SetUrl() method is actually successful, but any following calls in to
the
web reference fail.

I created a test app in C# and used the webRefence.URL property to
successfully set the url to both non-secure and secure URLs. Both work
fine.
So the problem resides specifically with using https:// in the C++ client.
It's either a bug or I'm missing a step.

Any ideas?

Thank you very much,
Jason


Nov 23 '05 #4
Thank you for your followup.

Glad that you've figured out the problem. If there're any further things we
can help, please feel free to post here.
Good Luck!

Steven Cheng
Hello, I have the same problem. And it might be that Jason found the problem, but the solution is not so obvious. Not at all.

That sample is using some server-side DLL that is both the webservice handler, an ISAPI filter and whatnot. I need a simple way of calling a webservice, from C++, that will work over HTTPS.

Trying to use the service like this:

CServiceT<CSecureSoapSocketClient> ws1;
CServiceT<CSoapMSXMLInetClient> ws2;
CServiceT<CSoapWininetClient> ws3;

None of these approaches work. The webservice can be accessed OK from C# in a test project, but I need it done in C++. Anyone could give me a pointer in the right direction?

Thanks,
Levente
Jun 22 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Grant Edwards | last post by:
In the program shown below, all of the connections to the servers are using port 443 and https (TLS protocol) -- both the initial connection to login.postini.com and subsequent connections to...
16
by: Paul Sweeney | last post by:
Does anyone know of a working (python) https proxy which allows viewing of unencrypted data being sent from my browser to an https site? I've worked my way through most on the list at...
6
by: Todd Peterson | last post by:
I'm encountering some wierd behavior with a <link> tag over an HTTPS connection, vs. an HTTP connection... In an ASP/HTML page on my website, I've add a <link rel="shortcut icon"...> in order to...
5
by: Søren Reinke | last post by:
Hi there I have 1 solution (visual studio 2005) within this solution i have many projects, they should all be able to have the same webreference to a webservice. But as far as i can figure...
7
by: Masahiro Ito | last post by:
I need to be login to several websites and download files that are https connections. I just tried IPWorks demo, but it does not seem to offer https. Does anyone know an https capable product,...
3
by: ghassett | last post by:
Hello, When I have a Quicktime object embedded in my web page, and I use Javascript to set its URL, the clip always starts playing immediately, even if I have the player's autoplay property set...
5
by: Kimba | last post by:
Hi. Using VStudio I have developed a WebService which I placed onto several servers. However my application can only access one on server. During runtime, I tried to change the URL of the...
4
by: bkasmai | last post by:
My asp.net application (developed using vs2003) runs fine on a windows 2000 server using iis 5.0. Our network manager wants to do away with any http connections and only use https for services that...
0
by: taylorjonl | last post by:
I am having a problem generating some soap proxies dynamically using almost the exact same code as in the MSDN sample. ...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...

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.