Web service request authentication

后端 未结 3 756
一向
一向 2021-01-15 06:19

We\'re being really stuck here so I decided to ask your help.

Yesterday I\'ve been asked to help to consume a web service, got the URL to the WSDL, and the user cred

3条回答
  •  生来不讨喜
    2021-01-15 07:09

    var factory = new ChannelFactory('*');
    factory.Credentials.UserName.UserName = 'bob';
    factory.Credentials.UserName.Password = 'bob';
    var proxy = factory.CreateChannel();
    

    For more information you can explore Authorization In WCF-Based Services*( http ://msdn.microsoft.com/en-us/magazine/cc948343.aspx)*

提交回复
热议问题