RangeCannotBeSetAfterResponseHasAlreadyStartedException Class
HAKOM.Persistence.Http.Net.Api.Paging.Exceptions
Section titled “HAKOM.Persistence.Http.Net.Api.Paging.Exceptions”Indicates that an attempt was made to modify the response status code or set range related headers after headers (and possibly data) has already been sent to the client.
public sealed class RangeCannotBeSetAfterResponseHasAlreadyStartedException : HAKOM.ErrorHandling.Core.Net.Api.HakomExceptionInheritance System.Object 🡒 System.Exception 🡒 HakomException 🡒 RangeCannotBeSetAfterResponseHasAlreadyStartedException
Remarks
Section titled “Remarks”Make sure to call TrySetRange<TResult>(this HttpResponse, Range<TResult>, Nullable<int>)before any calls to return or [yield return](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/yield return ‘https://docs\.microsoft\.com/en\-us/dotnet/csharp/language\-reference/keywords/yield return’).
This exception is identified by error code HK12037.
Properties
Section titled “Properties”RangeCannotBeSetAfterResponseHasAlreadyStartedException.EquivalentHttpStatusCode Property
Section titled “RangeCannotBeSetAfterResponseHasAlreadyStartedException.EquivalentHttpStatusCode Property”When this exception is thrown while processing an HTTP request, the response should be returned with status code 500 (Internal Server Error). This error is most likely due to an implementation issue and will require code changes to be fixed. Report any occurrence of this error to the developers.
protected override System.Net.HttpStatusCode EquivalentHttpStatusCode { protected get; }