Hello:

I have a web service deployed on Axis 1.4 running on Tomcat.

I have set up an AuthenticationHandler in the request flow to perform user
name and password checking.  It extends SimpleAuthenticationHandler and
pulls the username and password from the MessageContext object.

If I use a Java client with this code:

   // Locate the service
   FileUpload_PortType fileUpload = new
FileUploadServiceLocator().getFileUpload();
   ((FileUploadSoapBindingStub)fileUpload).setUsername(USER);
   ((FileUploadSoapBindingStub)fileUpload).setPassword(PASS);

Everything works fine.  I get the user name and password and the service
continues.

But, using this C# code:

    NetworkCredential credential = new NetworkCredential(USER, PASS);
    FileUploadService service = new FileUploadService();
    service.Credentials = credential;
    service.PreAuthenticate = true;

When I invoke the service, the AuthenticationHandler on the server gets null
for the user name and password.

Is this the correct C# code to use?  

Any ideas?

Thanks,
        Neil


--
Neil Aggarwal, JAMM Consulting, (214)986-3533, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to