Click here to Skip to main content
11,416,572 members (62,051 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#4.0
I added java webservices using add web reference in visual studio.
I am calling in the .net client like this. But still service asking to send username password..what might be the problem???
                //Proxy creation
               var proxy = new myservice();
                var credentials = new NetworkCredential();
                credentials.UserName = "username";
                credentials.Password = "password";
                proxy.Credentials = credentials;
               //Service call
                lblResponse.Text = proxy.getServerTime();
            catch (Exception ex)
                lblResponse.Text = ex.Message;
Can anybody help me out.
Posted 4-Oct-12 6:19am
Edited 4-Oct-12 6:22am
(no name)112.3K

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 9,295
1 OriginalGriff 7,592
2 Maciej Los 3,718
3 Abhinav S 3,456
4 Peter Leow 3,084

Advertise | Privacy | Mobile
Web04 | 2.8.150427.4 | Last Updated 4 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100