New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WS Security in .NetCore 2.0 #2605

Giolla opened this Issue Feb 26, 2018 · 4 comments


None yet
4 participants
Copy link

Giolla commented Feb 26, 2018

Hi, i'm trying to implement following in .NetCore

<soapenv:Envelope xmlns:soapenv="" xmlns:cus="">
      <wsse:Security xmlns:wsse=""> 
         <wsse:UsernameToken xmlns:wsu=""> 
         <wsse:Password Type="wsse:PasswordText">XXXXXX</wsse:Password> 

Above Xml works in SoapUI with no problem.

Endpoint address:

if ((endpointConfiguration == EndpointConfiguration.Some_Query))
 return new System.ServiceModel.EndpointAddress("https://..someUrl../?

Calling Client:

private QueryClient GetClient()
 var uri = string.Format("https://..someUrl../?SWEExtCmd=Execute&UserName=
 {0}&Password={1}", userName, password);
 var client = new QueryClient(QueryClient.EndpointConfiguration.Some_Query, uri);

 client.ClientCredentials.UserName.UserName = getUserName;
 client.ClientCredentials.UserName.Password = getPassword;
 return client;

When i imported WSDL with Microsoft WCF Web Service Reference Provider, endpoint configuration was defaulted to :

if ((endpointConfiguration == EndpointConfiguration.Some_Query))
  System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
  result.Security.Transport.ClientCredentialType = 
  result.MaxBufferSize = int.MaxValue;
  result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
  result.MaxReceivedMessageSize = int.MaxValue;
  result.AllowCookies = true;
  result.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.Transport;
  return result;  

Question: Should i be using BasicHttpBinding or BasicHttpsBinding? i tried both but i'm getting an error.

I'm getting

An error occurred while trying to process your request. This error indicates a problem with the configuration of this server and should be reported to the webmaster (along with any errors listed below). We apologize for the inconvenience.

no matter what i try


This comment has been minimized.

Copy link

zhenlan commented Mar 5, 2018

@Giolla WS security is not supported by WCF on .NET Core.

@zhenlan zhenlan added the Community label Mar 5, 2018

@zhenlan zhenlan added this to the S132 milestone Mar 5, 2018


This comment has been minimized.

Copy link

Lxiamail commented Mar 16, 2018

Please let us know if you have any additional idea.

@Lxiamail Lxiamail closed this Mar 16, 2018


This comment has been minimized.

Copy link

seamys commented Jul 1, 2018

@zhenlan @Lxiamail
Is there has other solution?


This comment has been minimized.

Copy link

zhenlan commented Jul 2, 2018

@seamys Sorry for lacking of details. The issue was closed as it's mostly part of issue #31, which does not have a solution at this point. You can find more details in the discussion of #31.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment