Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / August 2005

Tip: Looking for answers? Try searching our database.

How to call a WebService from VC++?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eric - 01 Aug 2005 14:21 GMT
I need to call a function in a WebService from a VC++ 7.1 project. The
WebService requires NTLM authentication and should be the user of the
calling program. How should this be done?

I have found this article from Microsoft:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet
/handling_authentication.asp

But it looks that it's very low-level. Even if I copy the code generated by
the sproxy.exe program and manually change it; then there still are calls to
CSoapWininetClient::SendRequest (defined in atlsoap.h) which indirectly call
HttpSendRequest, mentioned in the article. Does this mean that I have to
change / write all the code in atlsoap.h by myself too?

And even then; in this article is described how to set the username and
password manually by calling InternetSetOption (although it didn't work for
me). But I don't want the user to enter the data again; he is logged in
already in Windows. I just want to send his credentials to the WebService
like Internet Explorer does this too (when the option User Authentication /
Logon / "Automatic logon only in Intranet zone" or "Automatic logon with
current username and password" is set).

How can I do this?

Eric

P.S. Sorry if I'm in the wrong newsgroup; it's a little difficult for this
subject.
Eric - 04 Aug 2005 18:45 GMT
Problem solved for me.
In either way a call to HttpSendRequest is made. That function automatically
makes requests with the correct authentication (Kerberos) if the calling
process is being impersonated correctly.
My problem was that I thought the calling process was impersonated and the
WebService requires NT Integrated Login. That was wrong. The calling process
is always running anonymous (probably Local System or so) and the setting
for the WebService was wrong and should have been Anonymous Login.
Authentication checks are made somewhere else.

Eric

>I need to call a function in a WebService from a VC++ 7.1 project. The
>WebService requires NTLM authentication and should be the user of the
[quoted text clipped - 22 lines]
> P.S. Sorry if I'm in the wrong newsgroup; it's a little difficult for this
> subject.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.