Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
65
Always get error "Cannot use a leading .. to exit above the top directory"
posted

Hey guys,

I tried using  UltraWebGridDocumentExporter control to export content from a webgrid control (Please see below code snip). But, I got an error message "Cannot use a leading .. to exit above the top directory"  Any suggestions will be appreciated.

UltraWebGridDocumentExporter1.DownloadName =
"aaabbb.pdf";

UltraWebGridDocumentExporter1.Format = Infragistics.Documents.Report.FileFormat.PDF;

UltraWebGridDocumentExporter1.TargetPaperOrientation = Infragistics.Documents.Report.PageOrientation.Landscape;

UltraWebGridDocumentExporter1.ExportMode = ExportMode.Custom;

UltraWebGridDocumentExporter1.Export(gridEvent);

Parents
No Data
Reply Children
  • 110
    posted in reply to Tao

    Hi, I look the examples with grid export in Infragistics Samples

    I copied the code into my project and I try to export in pdf like it shown in the sample.

    And what do you thing happens: it throws exception: 

    Cannot use a leading .. to exit above the top directory.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.HttpException: Cannot use a leading .. to exit above the top directory.

    Source Error:
    Line 46: 
    Line 47: // trigger export
    Line 48: UltraWebGridDocumentExporter1.Export(UltraWebGrid1);
    Line 49: }
    Line 50:
     

    So, gays try to find different way to export in pdf, the DocumentExporter just doesn't work, even with the Infragistics example source.

    My current version of Infragistics is 35, but I test this with previous versions too, and it doesn't work either. 

    Regards, Iva