ASP.net - An error has occurred when trying to initialize jsreport
-
When i'm adding the jsReport.exe as a trusted file the code works great, seems like some issue on jsReport.exe thing.
-
Is there any way to put this whole observation into some mspaint file or somewhere so that everybody will get the idea.
-
Adding to above issue, observation made while running the project with admin mode, and trying to give jsReport.exe the admin permission i'm getting Windows defender smartscreen alert saying Windows Defender
Windows protected your PC
Windows Defender SmartScreen prevented an unrecognized app from starting. Running this app might put your PC at risk.App:
jsreport.exe
Publisher:
Unknown publisherAnd i'm not able to give the jsreport.exe admin permission.
-
Is there any way to put this whole observation into some mspaint file or somewhere so that everybody will get the idea.
click the "Reply" button, and then drag and drop an image in the box that has the "compose" text
-
After adding the path of jsreport.exe in the exclusion category inside Avast antivirus console, and removing below two codes i'm able to generate the reports.
var rs = new LocalReporting()
//.RunInDirectory(runExePath)
.KillRunningJsReportProcesses()
//.Configure(cfg => cfg.AllowLocalFilesAccess().FileSystemStore().BaseUrlAsWorkingDirectory())
.UseBinary(JsReportBinary.GetBinary()).AsUtility().Create();Still i want to know why avast and windows defender behaves like this?
-
That's a great question. My guess is that avast and windows defender don't like seeing random executables being started seemingly out of the blue, and not many users with them have added them as exclusions to the database. It's probably just a growing pain of sort for JSreports.
Keep in mind, that's my guess as a user, not a developer or anything.
-
Observations
Running the project in admin mode.
Code shot:-
Avast Antivirus:-
Conclusion:-
I'm able to download the Pdf file generated from the HTML contents.
Removing Exclusion from Avast antivirus:-
Running the Application and the observation :-
Above are all my observations.
-
as @tyler-shuhnicki has said i think all of this is just the result of antivirus being defensive by default (the same for windows defender), of course jsreport.exe is not a malware or something dangerous but antivirus says that because it doesn't know what it is so the best default for the antivirus is to block the executable and ask you (the user) to allow the executable explicitly. there should be a way to allow the executable in windows defender too.
btw i think all of this is caused by having
Publisher: Unknown publisher
maybe we can find a way to fill this "publisher" information so maybe it can help the executable to not be detected as something dangerous, in the mean time just allow the executable explicitly in your antivirus and windows defender rules.
-
and just for the record, every software in the world at some point has to deal with incorrect antivirus reports so i think the easy workaround for now is to configure them to always allow the jsreport.exe 😄
-
Great response, keep the good work up.These were just some bunch of random observations while doing the POC. Thank you all again.
-
@explorer855 thanks for sharing your case, it is good to know new kind of problems that users can face.