Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- System.Net.NetworkCredential creds = GetNetWorkCredentials();
- BasicHttpBinding binding = new BasicHttpBinding();
- binding.Security.Mode = BasicHttpSecurityMode.Transport;
- binding.Security.Transport.ClientCredentialType = creds.httpClientCredentialType;
- ChannelFactory<Portal.WebServices.Internal.IPort> factory = new ChannelFactory<Portal.WebServices.Internal.IPort>(binding);
- factory.Credentials.Windows.ClientCredential = creds;
- factory.Credentials.UserName.UserName = creds.UserName;
- factory.Credentials.UserName.Password = creds.Password;
- Portal.WebServices.Internal.IPort proxy = factory.CreateChannel(new EndpointAddress(siteURL + "/_vti_bin/portal/Port.svc"));
- Portal.WebServices.Internal.FewObject[] invoices = proxy.GetInvoices(IDs);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement