Page 1 of 1

System.UnauthorizedAccessException: Access to the path

Posted: Wed Aug 14, 2013 8:59 am
by bsilence
Hello,

I'm having a problem with an application that generates a report, that is installed in a server.
When the app performs this line in the code:

stiReport.RenderWithWpf(false);

It launches an error:

System.UnauthorizedAccessException: Access to the path 'StimulsoftReportsResources' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj)
at System.IO.Directory.CreateDirectory(String path)
at Stimulsoft.Report.StiReportResourcesHelper..ctor(StiReport report)
at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate, Object standaloneReportType)
at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate)
at Stimulsoft.Report.StiReport.Compile(String path, StiOutputType outputType, Boolean autoCreate)
at Stimulsoft.Report.Engine.StiReportV2Builder.RenderSingleReport(StiReport masterReport, StiRenderState renderState)
at Stimulsoft.Report.StiReport.RenderReport(StiRenderState renderState)
at Stimulsoft.Report.StiReport.Render(StiRenderState renderState, StiGuiMode guiMode)

I can't find where it's is supposed to create a directory, so that i can give the permissions for it.
Can you help me?

Thank you for your time.

Best Regards.

Bruno Fernandes.

Re: System.UnauthorizedAccessException: Access to the path

Posted: Wed Aug 14, 2013 9:51 am
by bsilence
Hello,

I just got thru this error, by setting the property StoreImagesInResources to false.
But, is there a way to set this directory that he tries to create to one of our choice?

thank you for your time.

Best Regards.

Bruno Fernandes

Re: System.UnauthorizedAccessException: Access to the path

Posted: Wed Aug 14, 2013 11:16 am
by Alex K.
Hello,

Please try to use the following code:
report.Compile(pathWhichAccessEnabled);
report.RenderWithWpf();

Thank you.