I Use Hangfire With Postgresql Storage in .net-6.0 and install this package : Hangfire.PostgreSql version 1.9.10
This is My Code In Program.cs :
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddHangfire(config => config.UsePostgreSqlStorage(builder.Configuration.GetConnectionString("HangfireConnection")));
builder.Services.AddHangfireServer();
var app = builder.Build();
app.UseHangfireDashboard();
This is My Connection string in webconfig :
"ConnectionStrings": {
"HangfireConnection": "Host=db1.motorazmasamin.com;Port=***;Database=Hangfire;Username=***;Password=***"
},
Build Database Correctly!, But When Type Dashboard URL(http://localhost/hangfire) , Return This Error:
{“data”:null,“status”:-1,“message”:“42601: syntax error at or near “value”\r\n\r\nPOSITION: 59”,“statusCode”:“500”}
But When Change Connection String to SQL Server and change Package To Hangfire.SqlServer , It’s Correct!