Comments
15 comments
-
Corrupted pdfs is one problem, but you won't be able to schedule reports unless you've enabled application initialisation within IIS. See https://documentation.red-gate.com/sm9/reports/scheduling-emailed-reports. Get that working first then look at the pdfs.
-
I have checked, and we have Application initialisation installed and configured.
- I can schedule reports (have been able to do that the whole time - sorry if that wasn't clear), but I can't open the pdf I receive, because it is damaged/corrupted -
I have checked, and we have Application initialisation installed and configured.
- I can schedule reports (have been able to do that the whole time - sorry if that wasn't clear), but I can't open the pdf I receive, because it is damaged/corrupted -
Having the same issue here. Reports are emailed OK on a schedule but the attached PDF is actually just a web page when opened in a text editor :
<div><!DOCTYPE html><br><html class="csstransforms3d csstransforms csstransitions background-color--grey--1"><br><br><head runat="server"><br> <title><br> Log in<br></title></div>....
-
Can you attach or send in the file as generated please?
-
attached is a PDF that doen't work
-
Don't know if it's related but I am seeing the following in the logs around the same time the report is generated:
<div><br></div><div>2019-04-09 13:16:18,760 [ 83] WARN RedGate.SqlMonitor.Common.Utilities.UserAccountHelper - Error asking Active Directory for current user's principal name<br>System.InvalidCastException: Unable to cast object of type 'System.DirectoryServices.AccountManagement.GroupPrincipal' to type 'System.DirectoryServices.AccountManagement.UserPrincipal'.<br> at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, IdentityType identityType, String identityValue)<br> at System.DirectoryServices.AccountManagement.UserPrincipal.get_Current()<br> at RedGate.SqlMonitor.Common.Utilities.UserAccountHelper.GetUsernameFromAd()System.InvalidCastException: Unable to cast object of type 'System.DirectoryServices.AccountManagement.GroupPrincipal' to type 'System.DirectoryServices.AccountManagement.UserPrincipal'.<br> at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, IdentityType identityType, String identityValue)<br> at System.DirectoryServices.AccountManagement.UserPrincipal.get_Current()<br> at RedGate.SqlMonitor.Common.Utilities.UserAccountHelper.GetUsernameFromAd()</div>
-
I don't think that is related; but you see this every time you generate a report?
-
I see it around the time a report is generated by the schedule - I don't recall seeing it when manually generating a report. I will test that later today.Yes i see it even if generating via the "Save as PDF" menu
2019-04-09 13:54:30,083 [ 60] WARN RedGate.SqlMonitor.UI.Website.Areas.Reports.Controllers.ReportController - Phantom JS info: New URL: http://localhost:19600/Reports/Report/PrintReport?Report=AG%20Performance%20v1&EndDate=1554818058970&Period=86400000<br>2019-04-09 13:54:30,520 [ 118] WARN RedGate.SqlMonitor.UI.Website.Areas.Reports.Controllers.ReportController - Phantom JS info: CONSOLE: JQMIGRATE: Migrate is installed, version 1.4.1 (from line # in "")<br>2019-04-09 13:54:32,422 [ 118] WARN RedGate.SqlMonitor.UI.Website.Areas.Reports.Controllers.ReportController - Phantom JS info: New URL: about:blank<br>2019-04-09 13:54:40,016 [ 60] WARN RedGate.SqlMonitor.Common.Utilities.UserAccountHelper - Error asking Active Directory for current user's principal name<br>System.InvalidCastException: Unable to cast object of type 'System.DirectoryServices.AccountManagement.GroupPrincipal' to type 'System.DirectoryServices.AccountManagement.UserPrincipal'.<br> at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, IdentityType identityType, String identityValue)<br> at System.DirectoryServices.AccountManagement.UserPrincipal.get_Current()<br> at RedGate.SqlMonitor.Common.Utilities.UserAccountHelper.GetUsernameFromAd()System.InvalidCastException: Unable to cast object of type 'System.DirectoryServices.AccountManagement.GroupPrincipal' to type 'System.DirectoryServices.AccountManagement.UserPrincipal'.<br> at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, IdentityType identityType, String identityValue)<br> at System.DirectoryServices.AccountManagement.UserPrincipal.get_Current()<br> at RedGate.SqlMonitor.Common.Utilities.UserAccountHelper.GetUsernameFromAd()
-
I haven't forgotten about this; it's taking time and I'll be honest we don't yet know whats causing it.
-
Anything we can do to help debug this?
-
Any update on this? It's still happening on 9.0.14 will install 9.0.18 today and see if it's any better.
-
Are you using an SSL?
-
No this is internal only and is running over HTTP. I can setup SSL if you think it might fix things?
-
No if you're not using SSL then I don't think we'll have fixed things for you. We were getting corrupted reports (or failed entirely) when using SSL and we fixed that behaviour; we've had no luck reproducing this for non-SSL cases unfortunately. Can you get in touch via support?
Add comment
Please sign in to leave a comment.
I have an issue with scheduled PDF-reports sent by email.
When I receive the email, the PDF files are "damaged".
I can log in to SQL monitor, and generate the report manually with no problems. But I just can't schedule the reports.
(SQL Monitor is running on an IIS server)
How can I find out what's going wrong?
thanks,