YSOD in Identity Server:
ID2082: Lifetime must be greater than or equal to TimeSpan.Zero.
ID0016: The value must specify a time span greater than TimeSpan.Zero.
Parameter name: value
This is another one of those “I want to kick myself” sort of errors.
First of all: this is probably no big deal if you always adhere to the solemn oath: “I will always make a backup of my Identity Server database, before I make any configuration changes. So help me God.”
However, if you forgot to do this, there is still hope. Open SSMS. Connect to your Identity Server database. Run this query:
select * from dbo.GlobalConfiguration
Look at “DefaultTokenLifetime”, “MaximumTokenLifeTime” and “SsoCookieLifetime”. You need to fix those.
Before you do any more damage, make a backup. Remember: if you have too many backups, you can always delete the extra ones, but if you don’t have enough backups, you might be doomed. Don’t be doomed.
Done making a backup? Okay. Next step: update those columns. You should never trust SQL queries that you find on the internet, (especially an UPDATE or DELETE query) but here is one anyway:
UPDATE dbo.GlobalConfiguration SET SsoCookieLifetime=1 WHERE SsoCookieLifetime=0; UPDATE dbo.GlobalConfiguration SET MaximumTokenLifetime=1 WHERE MaximumTokenLifetime=0;