I just updated SoapCore to version 1.1.0.22 and the project to .net 6, and i am getting a warning saying that the property Biding of SoapCoreOptions is obsolete.
The problem is: there is no clue on the property documentation of what i should use instead, and i could not find any documentation.
I need to set the binding becouse i need to change the "MaxReceivedMessageSize" and "ReaderQuotas.MaxStringContentLength", this is a port of an old project that use xml for some relative big data transfer.
What is now the "new" way of setting these values?
My Code:
//builder is IApplicationBuilder
builder.UseEndpoints(endpoints =>
{
endpoints.UseSoapEndpoint<IMyService>(options =>
{
options.Path = "URL.asmx";
options.Binding = AumentarTamanhoString(Lint_TamanhoMaximoRequisicao);
options.CaseInsensitivePath = true;
});
endpoints.UseSoapEndpoint<IMyService2>(options =>
{
options.Path = "URL2.asmx";
options.Binding = AumentarTamanhoString(Lint_TamanhoMaximoRequisicao);
options.CaseInsensitivePath = true;
});
});
static BasicHttpBinding AumentarTamanhoString(int Pint_TamanhoMaximoRequisicao)
{
BasicHttpBinding Lobj_Retorno = new()
{
MaxReceivedMessageSize = (long)Pint_TamanhoMaximoRequisicao,
};
Lobj_Retorno.ReaderQuotas.MaxStringContentLength = Pint_TamanhoMaximoRequisicao;
return Lobj_Retorno;
}
It looks like the Binding, BufferLimit and MaxStringContentLength are buried a bit. Would you mind providing your code? If you are setting up your SoapEndpoint using the IApplicationBuilder in Startup.cs Configure. Something like this