Last post May 24, 2019 02:43 AM by Nan Yu
May 23, 2019 09:46 PM|Rena Liang|LINK
we have a feature in our application that let the user export to excel data from a page(most of our grid pages have this functionality). We are using SpreadSheetDocument class from DocumentFormat. OpenXML to create the file. This worked fine until recently
when customers reported that the feature started failing for a server. We have a machine where this repros, but we can not repro it on a devbox.
The error is:
[bucketHash:92F53DB1] , Exception: System.TypeInitializationException: The type initializer for 'MS.Utility.EventTrace' threw an exception. ---> System.Security.SecurityException: Requested registry access is not allowed. at System.ThrowHelper.ThrowSecurityException(ExceptionResource
resource) at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) at Microsoft.Win32.Registry.GetValue(String keyName, String valueName, Object defaultValue) at MS.Utility.EventTrace.IsClassicETWRegistryEnabled() at MS.Utility.EventTrace..cctor()
- -- End of inner exception stack trace --- at MS.Utility.EventTrace.EasyTraceEvent(Keyword keywords, Event eventID) at System.IO.Packaging.Package.Open(Stream stream, FileMode packageMode, FileAccess packageAccess, Boolean streaming) at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.CreateCore(Stream
stream) at DocumentFormat.OpenXml.Packaging.SpreadsheetDocument.Create(Stream stream, SpreadsheetDocumentType type, Boolean autoSave) at Microsoft.Office.Project.PWA.ApplicationPages.ExportGridExcelPage.Render(HtmlTextWriter writer)
Anyone knows how we should further troubleshoot this? Thanks!
May 24, 2019 02:43 AM|Nan Yu|LINK
Hi Rena ,
What Identity is your Application Pool for the Web application running as:
Try to promote and check whether that helps.