Re: how to add "Authorization: Basic" for a web service call



I'm using the
webservice.proxy=proxycredential for our local proxy, in order to send
the request.
How can I add a second proxy for the remoteAuthentication?
Thank you
Ottavio


Joe Kaplan ha scritto:

You shouldn't have to do this manually. Just create an appropriate
NetworkCredential object with the plaintext credentials in it and add it to
the Credentials property of your web service proxy. It should then
negotiate basic authentication all by itself if the server requests it.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Ottavio" <OttavioAtUsenetGroups@xxxxxxxxx> wrote in message
news:1163157440.365846.108220@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,
I'm having some problems with the authentication during a web service
call
I know I have to add the "Authorization: Basic xxxxxxxx" in the http
header (not soap header) but I can't find a way to add it.
I've tryed to use ethereal to watch what I'm sending and I can see all
the header
(Accept-Language,Accept-Encoding,User-Agent,Host,Connection,..) and the

SOAP xml message but there is no "Authorization: Basic ......" at all.
Could someone help me?
This is the [partial] code I'm using:

namespace WCM
{
public partial class Form1 : Form
{
public Form1(){InitializeComponent();}
private void button1_Click(object sender, EventArgs e)
{
//WSDL web reference: WebRef
//WebService: Service
WebRef.ServiceTTService = new WCM.WebRef.Service();
NetworkCredential remoteCredentials = new NetworkCredential("a",
"b");
TTService.Credentials = remoteCredentials;
WebRef.TTRequestType TTRequest = new WCM.WebRef.TTRequestType();
TTRequest.param="param";
WebRef.TTRespType TTResponse = new WCM.WebRef.TTRespType();
TTResponse = TTService.TTRequestMethod(TTRequest);
//ERROR ON THE PREVIOUS LINE:
//"The request failed with HTTP status 403: Service Error."
MessageBox.Show("DONE!");
}
}
}
Thank you in advance!
Ottavio


.



Relevant Pages

  • Re: how to add "Authorization: Basic" for a web service call
    ... can you browse to the service with the browser - supplying the same credentials in the basic auth dialog box?? ... Joe Kaplan ha scritto: ... proxy server that requires it, but I think that should work too. ... TTService.Credentials = remoteCredentials; ...
    (microsoft.public.dotnet.security)
  • Re: how to add "Authorization: Basic" for a web service call
    ... Joe Kaplan ha scritto: ... proxy server that requires it, but I think that should work too. ... Co-author of "The .NET Developer's Guide to Directory Services ... TTService.Credentials = remoteCredentials; ...
    (microsoft.public.dotnet.security)
  • Re: how to add "Authorization: Basic" for a web service call
    ... I omitted the part concerning the local proxy because I can access ... Joe Kaplan ha scritto: ... NetworkCredential remoteCredentials = new NetworkCredential("a", ...
    (microsoft.public.dotnet.security)
  • Re: ActiveDirectoryMembershipProvider & ChangePassword control
    ... a LDAP call is made to create the account in AD. ... If the ActiveDirectoryMembershipProvider does not support this attribute is ... "Joe Kaplan" wrote: ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: AD Schema Extension Question
    ... Might just stick with the modification of the AD schema. ... "Joe Kaplan" wrote: ... The ADAM instances could be ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.windows.server.active_directory)