Adding AdminUserConfiguration breaks JsReport
KhalilMohammad opened this issue · 2 comments
services.AddJsReport(new LocalReporting()
.Configure(cfg =>
{
cfg.Authentication = new AuthenticationConfiguration
{
Admin = new AdminUserConfiguration
{
Password = "KKK",
Username = "KKK"
}
};
return cfg;
})
.UseBinary(JsReportBinary.GetBinary())
.AsUtility()
.Create());
An unhandled exception occurred while processing the request.
JsReportBinaryException: Error rendering report: Error: An error occurred while trying to execute the command: at onCriticalError ([eval]:29603:25) at [eval]:29558:13 at tryCatcher ([eval]:36038:23) at Promise._settlePromiseFromHandler ([eval]:34061:31) at Promise._settlePromise ([eval]:34118:18) at Promise._settlePromise0 ([eval]:34163:10) at Promise._settlePromises ([eval]:34238:18) at Async._drainQueue ([eval]:31008:16) at Async._drainQueues ([eval]:31018:10) at Immediate.Async.drainQueues [as _onImmediate] ([eval]:30892:14) at processImmediate [as _immediateCallback] (timers.js:396:17) {"originalError":{}}(Original) Error: An error occurred while trying to start daemonized process: An error has occurred when trying to initialize jsreport.. at null. ([eval]:30773:13) at listener ([eval]:8172:10) at EventEmitter.emit ([eval]:8260:22) at onData ([eval]:85844:8) at Lazy. ([eval]:51354:13) at Lazy. ([eval]:51336:19) at emitTwo (events.js:87:13) at Lazy.emit (events.js:172:7) at Lazy. ([eval]:51337:22) at emitOne (events.js:77:13) at Lazy.emit (events.js:169:7) at yieldTo ([eval]:51444:18) at Function. ([eval]:51482:27) at Lazy. ([eval]:51450:21) at emitOne (events.js:77:13) at Lazy.emit (events.js:169:7) at Socket. ([eval]:51313:22) at emitNone (events.js:67:13) at Socket.emit (events.js:166:7) at emitReadable (_stream_readable.js:419:10) at emitReadable (_stream_readable.js:413:7) at readableAddChunk (_stream_readable.js:164:13) {}
You need to set also CookieSession
cfg.Authentication = new AuthenticationConfiguration()
{
CookieSession = new AuthenticationCookieSession
{
Secret = "dasd321as56d1sd5s61vdv32"
},
Admin = new AdminUserConfiguration()
{
Username = "admin",
Password = "password"
}
};