Skip to content
Documentation

RangeCannotBeSetAfterResponseHasAlreadyStartedException Class

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.HakomException

Inheritance System.Object 🡒 System.Exception 🡒 HakomException 🡒 RangeCannotBeSetAfterResponseHasAlreadyStartedException

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.

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; }

System.Net.HttpStatusCode

© 2026 Volue.Version v0.6.38017 November 2026