Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Create the binding.
- var myBinding = new WSHttpBinding
- {
- MaxReceivedMessageSize = 1000000000,
- ReaderQuotas =
- {
- MaxStringContentLength = 5242880,
- MaxArrayLength = 1000000000
- },
- Security =
- {
- Mode = SecurityMode.TransportWithMessageCredential,
- Transport =
- {
- ClientCredentialType = HttpClientCredentialType.Certificate
- }
- }
- };
- var ea = new EndpointAddress("https://preprod.procesinfrastructuur.nl/wus/2.0/ophaalservice/1.2");
- using (var cc = new AanleverService_V1_2Client(myBinding, ea))
- {
- // The client must specify a certificate trusted by the server.
- cc.ClientCredentials.ClientCertificate.SetCertificate(
- StoreLocation.CurrentUser,
- StoreName.My,
- X509FindType.FindBySubjectName,
- "cert.skillsource.nl");
- return Content(cc.aanleveren(new aanleverRequest()).statuscode);
- }
Advertisement
Add Comment
Please, Sign In to add comment