While starting a new SoapCore service and sending a dummy request with SoapUI, I receive a HTTP500 and the following exception:
No service for type 'SoapCore.Extensibility.IFaultExceptionTransformer' has been registered.
On
In the ConfigureServices method of the Startup add this line
services.TryAddSingleton<IFaultExceptionTransformer, DefaultFaultExceptionTransformer>();
And the DefaultFaultExceptionTransformer is look something like this:
public class DefaultFaultExceptionTransformer : IFaultExceptionTransformer
{
public Message ProvideFault(Exception exception, MessageVersion messageVersion, Message requestMessage, XmlNamespaceManager xmlNamespaceManager)
{
return Message.CreateMessage(messageVersion, "Exception", exception.ToString());
}
}
You can read more on this here.
Add
services.AddSoapCore();to your services configuration