Skip to content

Commit 8e475da

Browse files
Remove condition !_HttpContext.Response.HasStarted when setting session values. (#642)
It does not seem to be necessary.
1 parent 8810021 commit 8e475da

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,10 +1712,7 @@ public bool WriteSessionKey<T>(string key, T value) where T : class
17121712
#if !NETCORE
17131713
HttpContext.Session[key] = value;
17141714
#else
1715-
if (!_HttpContext.Response.HasStarted)
1716-
{
1717-
HttpContext.Session.SetString(key, (value != null ? JSONHelper.Serialize(value) : string.Empty));
1718-
}
1715+
HttpContext.Session.SetString(key, (value != null ? JSONHelper.Serialize(value) : string.Empty));
17191716
#endif
17201717
return true;
17211718
}

0 commit comments

Comments
 (0)