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 / Languages / Managed C++ / February 2005

Tip: Looking for answers? Try searching our database.

CAtlHttpClient and authentication

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Thy - 23 Feb 2005 11:56 GMT
Bonjour

I use CAtlHttpClient to send parameters to a Linksys router by HTTP protocol
(SNMP not activated by default). HTTP is password protected.
I use Ethereal/WinPCap to trace exchange beetween PC and router.

When I try to get datas (ATL_HTTP_METHOD_GET) , CAtlHttpClient try first to get
datas without password, Router send error 401, so CAtlHttpClient retry with
password.

When I try to post datas (ATL_HTTP_METHOD_POST), CAtlHttpClient try first to
send datas without password. As router doesn't answer error 401, CAtlHttpClient
doesn't retry to send datas with password.
The only solution I've found is to add encrypted password to the header, but
it's not a good solution (the password will change and I don't know the encoding
method).

Is there a solution to force CAtlHttpClient to send password without waiting
errors 401 or 407 as describe in Microsoft documentation ?

TIA.
Rodrigo Corral [MVP] - 24 Feb 2005 15:18 GMT
AFAIK, there isn't way of passing your credentials using CAtlHttpClient if
the server response is different than 401 or 407. Maybe, you can use
WinHttp. WinHttp allows you to explicitly set the user credentials before
sending a request to the server, see WinHttpQueryAuthSchemes and
WinHttpSetCredentials documentation, not only if the server response is 401
or 407 like CAtlHttpClient.

Signature

Un saludo
Rodrigo Corral Gonz?lez [MVP]

FAQ de microsoft.public.es.vc++
http://rcorral.mvps.org


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.