By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,978 Members | 1,362 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,978 IT Pros & Developers. It's quick & easy.

webReference.SetURL method with https connections

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: 1
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 discussion thread is closed

Replies have been disabled for this discussion.