473,373 Members | 1,407 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,373 software developers and data experts.

SSL, Web Services, "C"

I'm consuming a web service built in VB.NET with a C++ compiled dll
that extern "C" declarations. Everything works fine on both the local
machine and production machine until I make SSL required in IIS. No
response or exception is thrown, it just runs right over the function
call like nothing is happening. Any ideas? tia...
Nov 16 '05 #1
3 2637
Oh, boy. I had to go through the same hassle, when I needed to write a C++
DLL, which would act as a client of a Web Service. I wrote it using
Microsoft recommendations and it worked fine until I used SSL. I did some
digging and found some explaining how to implement SSL in C++ Web Service
client, which - to my surprise - did not come by default. There is an MSDN
sample which does this. The problem with this sample is that it does not
work with authentication (i.e. when a Web Service requires Basic or
Integrated Windows authentication). It is amazing: there is one class you
can use as a parent of a Web service client proxy which solves the
authentication problem, and there is another, which solves the SSL problem,
but they cannot be combined (if I remember it correctly one is HTTP-based,
while the other is TCP-based). At lease I did not have time to combine them,
so I could not think of a better (easier and faster) option than writing a
C# class responsible for invoking Web Service methods, which my C++ DLL
called via COM interop. In C#, SSL does not require any programming, and
authentication can be implemented in just few lines of code. If you do not
care about authentication, you can try Microsoft's sample (don't have it at
hand, but if you need it, let me know, and I will try to find it).
Otherwise, I recommend, my approach. In fact, a friend of mine who works in
another team had to do the same at a different time, and - as I found out
later - he chose the same path. So I assume that this is not an unreasonable
approach. What bothers me, though, is that nowhere does MSDN mention that
C++ Web Service clients cannot support SSL and authentication at the same
time. I would write it in huge bold letters.

Alek

"Wade Redmond" <wj***@hotmail.com> wrote in message
news:b4*************************@posting.google.co m...
I'm consuming a web service built in VB.NET with a C++ compiled dll
that extern "C" declarations. Everything works fine on both the local
machine and production machine until I make SSL required in IIS. No
response or exception is thrown, it just runs right over the function
call like nothing is happening. Any ideas? tia...

Nov 16 '05 #2
Thanks for posting that information. It's saved me a lot of time.
I'm not able to find the information in the knowledge base article you
described below though. If you happen to know where it's at, please
let me know.

I actually started out as you described below by creating a .net
interop component to connect with the web service. However, I'd
really really like to get rid of that piece. I'm not using
authentication the way you described though so if I can just get the
communication with https everything should be ok. Thank you!

"Alek Davis" <alekDOTdavisATintelDOTcom> wrote in message news:<Oc**************@TK2MSFTNGP10.phx.gbl>...
Oh, boy. I had to go through the same hassle, when I needed to write a C++
DLL, which would act as a client of a Web Service. I wrote it using
Microsoft recommendations and it worked fine until I used SSL. I did some
digging and found some explaining how to implement SSL in C++ Web Service
client, which - to my surprise - did not come by default. There is an MSDN
sample which does this. The problem with this sample is that it does not
work with authentication (i.e. when a Web Service requires Basic or
Integrated Windows authentication). It is amazing: there is one class you
can use as a parent of a Web service client proxy which solves the
authentication problem, and there is another, which solves the SSL problem,
but they cannot be combined (if I remember it correctly one is HTTP-based,
while the other is TCP-based). At lease I did not have time to combine them,
so I could not think of a better (easier and faster) option than writing a
C# class responsible for invoking Web Service methods, which my C++ DLL
called via COM interop. In C#, SSL does not require any programming, and
authentication can be implemented in just few lines of code. If you do not
care about authentication, you can try Microsoft's sample (don't have it at
hand, but if you need it, let me know, and I will try to find it).
Otherwise, I recommend, my approach. In fact, a friend of mine who works in
another team had to do the same at a different time, and - as I found out
later - he chose the same path. So I assume that this is not an unreasonable
approach. What bothers me, though, is that nowhere does MSDN mention that
C++ Web Service clients cannot support SSL and authentication at the same
time. I would write it in huge bold letters.

Alek

"Wade Redmond" <wj***@hotmail.com> wrote in message
news:b4*************************@posting.google.co m...
I'm consuming a web service built in VB.NET with a C++ compiled dll
that extern "C" declarations. Everything works fine on both the local
machine and production machine until I make SSL required in IIS. No
response or exception is thrown, it just runs right over the function
call like nothing is happening. Any ideas? tia...

Nov 16 '05 #3
Wade,

I think this is it:
<http://msdn.microsoft.com/library/de...-us/vcsample/h
tml/vcsamSecureSOAPSample.asp> (SecureSOAP Sample: Implements a Secure SOAP
Communication (HTTPS)). I did not test it, though, so I cannot guarantee
that it will work.

Alek

"Wade Redmond" <wj***@hotmail.com> wrote in message
news:b4**************************@posting.google.c om...
Thanks for posting that information. It's saved me a lot of time.
I'm not able to find the information in the knowledge base article you
described below though. If you happen to know where it's at, please
let me know.

I actually started out as you described below by creating a .net
interop component to connect with the web service. However, I'd
really really like to get rid of that piece. I'm not using
authentication the way you described though so if I can just get the
communication with https everything should be ok. Thank you!

"Alek Davis" <alekDOTdavisATintelDOTcom> wrote in message

news:<Oc**************@TK2MSFTNGP10.phx.gbl>...
Oh, boy. I had to go through the same hassle, when I needed to write a C++ DLL, which would act as a client of a Web Service. I wrote it using
Microsoft recommendations and it worked fine until I used SSL. I did some digging and found some explaining how to implement SSL in C++ Web Service client, which - to my surprise - did not come by default. There is an MSDN sample which does this. The problem with this sample is that it does not
work with authentication (i.e. when a Web Service requires Basic or
Integrated Windows authentication). It is amazing: there is one class you can use as a parent of a Web service client proxy which solves the
authentication problem, and there is another, which solves the SSL problem, but they cannot be combined (if I remember it correctly one is HTTP-based, while the other is TCP-based). At lease I did not have time to combine them, so I could not think of a better (easier and faster) option than writing a C# class responsible for invoking Web Service methods, which my C++ DLL
called via COM interop. In C#, SSL does not require any programming, and
authentication can be implemented in just few lines of code. If you do not care about authentication, you can try Microsoft's sample (don't have it at hand, but if you need it, let me know, and I will try to find it).
Otherwise, I recommend, my approach. In fact, a friend of mine who works in another team had to do the same at a different time, and - as I found out later - he chose the same path. So I assume that this is not an unreasonable approach. What bothers me, though, is that nowhere does MSDN mention that C++ Web Service clients cannot support SSL and authentication at the same time. I would write it in huge bold letters.

Alek

"Wade Redmond" <wj***@hotmail.com> wrote in message
news:b4*************************@posting.google.co m...
I'm consuming a web service built in VB.NET with a C++ compiled dll
that extern "C" declarations. Everything works fine on both the local
machine and production machine until I make SSL required in IIS. No
response or exception is thrown, it just runs right over the function
call like nothing is happening. Any ideas? tia...

Nov 16 '05 #4

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

Similar topics

0
by: asj | last post by:
from the borg lady: http://www.freeroller.net/page/Sayaka/20030819#walmart_deadline_shows_java_cashing ------------------------------------------------- I/We read with interest Walmart's new...
0
by: trint | last post by:
How can I call a report created from reporting services in my c#.net (visual studio .net 2003) project? Thanks, Trint
3
by: Michael Rodriguez | last post by:
I've installed WSE, both 1.0 and 2.0. The namespace Microsoft.Web.Services is visible from my VB.NET projects, but not in C#. In C#, it tells me there is no "Web" under "Microsoft". Any ideas?...
0
by: adolf garlic | last post by:
Currently we have an app (asp.net 1.1) that has a dynamic content client scripted treeview which will allow the display of reporting services reports in the right hand part of the screen. My...
1
by: paul | last post by:
I have a Windows vb.net app that creates an Object from a .net dll that I wrote. If the dll fails to achieve its task I get it the re-throw an exception. the windows app encapulates the object...
0
by: paul | last post by:
Thanks for your reply. I've added that to the code but still does it. Note that my dll does call a vb5 component (but I didn't think that was an issue). Also I've other programs that call the...
3
by: gregory_may | last post by:
According to this article, I cant change "CanStop" on the fly!!! ...
1
by: aaa | last post by:
I am using a third party provider for Travel related web services. These services are not very well documented and I am having to wing my way thru nearly every one. Some I can pull data from...
5
by: Curious | last post by:
I installed a service program. It contained executables in the form of .exe and .dll files. And the service was started automatically after the install. Then, I UN-installed the program, but the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.