/// <summary> /// Start using the middleware with SoapCore, with specific options. /// </summary> /// <typeparam name="EndPoint">The endpoint handling the WebConnector messages.</typeparam> /// <param name="app">AspNetCore ApplicationBuilder.</param> /// <param name="configuration">The configuration.</param> /// <returns></returns> public static IApplicationBuilder UseWebConnector <EndPoint>( this IApplicationBuilder app, Action <WebConnectorOptions> configuration ) { var options = new WebConnectorOptions(); configuration(options); app .UseSoapEndpoint( typeof(EndPoint), options.SoapPath, new SoapEncoderOptions() { ReaderQuotas = XmlDictionaryReaderQuotas.Max, WriteEncoding = Encoding.UTF8, MessageVersion = MessageVersion.Soap11 }, SoapSerializer.XmlSerializer, false, null, new BasicHttpBinding() ); return(app); }
public static IApplicationBuilder UseWebConnector <EndPoint>( this IApplicationBuilder app, Action <WebConnectorOptions> configuration ) { var options = new WebConnectorOptions(); configuration(options); app .UseSoapEndpoint <EndPoint>(options.SoapPath, new BasicHttpBinding(), SoapSerializer.XmlSerializer); return(app); }