diff --git a/dotnet/src/dotnetframework/GxClasses/Helpers/HttpHelper.cs b/dotnet/src/dotnetframework/GxClasses/Helpers/HttpHelper.cs index dbeabfce2..decf22f43 100644 --- a/dotnet/src/dotnetframework/GxClasses/Helpers/HttpHelper.cs +++ b/dotnet/src/dotnetframework/GxClasses/Helpers/HttpHelper.cs @@ -258,7 +258,7 @@ static void CorsValuesToHeaders(OutgoingWebResponseContext httpResponse, string[ if (!string.IsNullOrEmpty(origin)) httpResponse.Headers[HeaderNames.AccessControlAllowOrigin] = origin; } - httpResponse.Headers[HeaderNames.AccessControlAllowCredentials] = true.ToString(); + httpResponse.Headers[HeaderNames.AccessControlAllowCredentials] = bool.TrueString; if (!string.IsNullOrEmpty(requestHeaders)) httpResponse.Headers[HeaderNames.AccessControlAllowHeaders] = StringUtil.Sanitize(requestHeaders, StringUtil.HttpHeaderWhiteList); @@ -276,7 +276,7 @@ static void CorsValuesToHeaders(HttpResponseMessageProperty httpResponse, string if (!string.IsNullOrEmpty(origin)) httpResponse.Headers[HeaderNames.AccessControlAllowOrigin] = origin; } - httpResponse.Headers[HeaderNames.AccessControlAllowCredentials] = true.ToString(); + httpResponse.Headers[HeaderNames.AccessControlAllowCredentials] = bool.TrueString; if (!string.IsNullOrEmpty(requestHeaders)) httpResponse.Headers[HeaderNames.AccessControlAllowHeaders] = StringUtil.Sanitize(requestHeaders, StringUtil.HttpHeaderWhiteList); @@ -296,7 +296,7 @@ static void CorsValuesToHeaders(HttpResponse httpResponse, string[] origins, str if (!string.IsNullOrEmpty(origin)) httpResponse.AppendHeader(HeaderNames.AccessControlAllowOrigin, origin); } - httpResponse.AppendHeader(HeaderNames.AccessControlAllowCredentials, true.ToString()); + httpResponse.AppendHeader(HeaderNames.AccessControlAllowCredentials, bool.TrueString); if (!string.IsNullOrEmpty(requestHeaders)) httpResponse.AppendHeader(HeaderNames.AccessControlAllowHeaders, StringUtil.Sanitize(requestHeaders, StringUtil.HttpHeaderWhiteList)); @@ -880,18 +880,18 @@ public static void NewSessionCheck(this HttpContext context) string value = websession.Get(NEWSESSION); if (string.IsNullOrEmpty(value)) { - websession.Set(NEWSESSION, true.ToString()); + websession.Set(NEWSESSION, bool.TrueString); } else { - websession.Set(NEWSESSION, false.ToString()); + websession.Set(NEWSESSION, bool.FalseString); } } public static bool IsNewSession(this HttpContext context) { GxWebSession websession = new GxWebSession(new HttpSessionState(context.Session)); string value=websession.Get(NEWSESSION); - return string.IsNullOrEmpty(value) || value == true.ToString(); + return string.IsNullOrEmpty(value) || value == bool.TrueString; } #else public static bool IsNewSession(this HttpContext context) diff --git a/dotnet/src/dotnetframework/GxClasses/Model/gxproc.cs b/dotnet/src/dotnetframework/GxClasses/Model/gxproc.cs index 19a408dc7..5b544e006 100644 --- a/dotnet/src/dotnetframework/GxClasses/Model/gxproc.cs +++ b/dotnet/src/dotnetframework/GxClasses/Model/gxproc.cs @@ -387,7 +387,7 @@ private void SetRecordCountSupportedHeader() if (!RecordCountSupported()) { GXLogging.Debug(log, $"Adding '{RECORD_COUNT_SUPPORTED}' header"); - context.SetHeader(RECORD_COUNT_SUPPORTED, false.ToString()); + context.SetHeader(RECORD_COUNT_SUPPORTED, bool.FalseString); } }