英文:
How to Fix : 42601: syntax error at or near "value" When Try To Access Hangfire Dashboard
问题
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=***"
},
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"}
英文:
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=***"
},
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"}
Show Error Image in Visual Studio
But When Change Connection String to SQL Server and change Package To Hangfire.SqlServer , It's Correct!
答案1
得分: 1
这是1.9.10版本中的一个错误。以下是一些详细信息:https://github.com/hangfire-postgres/Hangfire.PostgreSql/pull/280/files
英文:
This was a bug at 1.9.10. Here are some details https://github.com/hangfire-postgres/Hangfire.PostgreSql/pull/280/files
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论