Hello,
What is the correct way to return HTTP status code 401 (Unauthorized) from OnHeartbeatInit event handler.
I’m currently throwing HttpError.Unauthorized (see code below) but that results in status code 500.
var session = request.GetSession();
if (session.IsAuthenticated)
{
. . .
}
else
{
throw HttpError.Unauthorized("Session is not authenticated.");
}
Thank you,
Serge