"Couldn't set user (Parameter 'user') " - Postgres Error

The error message "Couldn't set user (Parameter 'user')" indicates an error with your connection string while setting up PostgreSQL. This error often occurs when trying to set the user for a PostgreSQL connection or operation, and the user parameter is either missing or incorrectly specified.

Here was my mistake (can you identify it?):

"ConnectionStrings": {
   "DefaultConnection": "Server=localhost:5432;User=postgres;Password=12345;Database=AuctionDb;Pooling=true;Maximum Pool Size=1024;"
 }

The fix:

Ensure that your connection string contains the correct user parameter. The connection string typically looks like this:

The User must go with additional parameter of Id. That is; User Id=postgres;

//Postgres connection
 "ConnectionStrings": {
   "DefaultConnection": "Server=localhost:5432;User Id=postgres;Password=12345;Database=AuctionDb;"
 }

Errors may also arise when the Id is set to username of the postgres database, you you have to ensure that.