I program as the code provided by you. It is no use. But I don't know how to set the domain.name in System.Net.NetworkCredential.
Can you give me mor information , thanks. Following is my code. UserWSService userWs = new UserWSService(); userWs.Url="http://localhost:8080/future2/services/userWs"; userWs.PreAuthenticate=true; userWs.Credentials=new System.Net.NetworkCredential("admin", "admin","localhost"); --- Bill Keicher <[EMAIL PROTECTED]> 的正文: > > Service service=new Service(); > service.url="http://your.url.here"; > service.PreAuthenticate=true; > service.Credentials=new > System.Net.NetworkCredential("uname", "password", > "domain.name.here"); > > -----Original Message----- > From: Paul Callahan [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 07, 2004 10:50 AM > To: [EMAIL PROTECTED] > Subject: Re: how to set the usename and passwork in > C# > > > You should look in the generated proxy for the > service in VS.NET... > There you can override the GetWebRequest method, and > use > request.Headers.Add method in order to add headers > before returning > the request. > > -pc > > > On Thu, 7 Oct 2004 12:52:44 +0800 (CST), > 铮?fffffffffd3铮?fffffffffc2 > 铮?fffffffffcc铮?fffffffffc 6?= > <[EMAIL PROTECTED]> wrote: > > Hi everyone. > > I set the username and password of > > org.apache.axis.client.Stub to auditing a client > > connection of webservice built by Axis. It is work > in > > java. Following is my code: > > IssueWsSoapBindingStub binding = null; > > binding = (IssueWsSoapBindingStub)new > > IssueWSServiceLocator().getissueWs(); > > binding.setUsername("admin"); > > binding.setPassword("admin"); > > > > But I don't know how to send the usename and > password > > from C# client to the Web Services. > > > > How to do it? > > > > > _________________________________________________________ > > Do You Yahoo!? > > 150涓??MP3??????甯??????充?娈垮? > > > http://cn.rd.yahoo.com/mail_cn/tag/yisou/music/*http://music.yisou.com/ > > > 缇?コ???搴??灏芥?锛??????俱�???惧??峰? > > > http://cn.rd.yahoo.com/mail_cn/tag/yisou/image/*http://image.yisou.com > > 1G灏辨?1000???????甸?????╁?锛?> > > http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1 > g/ > > > > This email message and any attachments are > confidential to Endeca. If you > are not the intended recipient, please notify Endeca > immediately -- by > replying to this message or by sending an email to: > [EMAIL PROTECTED] -- and > destroy all copies of this message and any > attachments. Thank you. > _________________________________________________________ Do You Yahoo!? 150万曲MP3疯狂搜,带您闯入音乐殿堂 http://music.yisou.com/ 美女明星应有尽有,搜遍美图、艳图和酷图 http://image.yisou.com 1G就是1000兆,雅虎电邮自助扩容! http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/
