System.UnauthorizedAccessException: Access to the path

Stimulsoft Reports.NET discussion
Post Reply
bsilence
Posts: 34
Joined: Wed Feb 13, 2013 12:15 pm

System.UnauthorizedAccessException: Access to the path

Post 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.
bsilence
Posts: 34
Joined: Wed Feb 13, 2013 12:15 pm

Re: System.UnauthorizedAccessException: Access to the path

Post 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
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: System.UnauthorizedAccessException: Access to the path

Post by Alex K. »

Hello,

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

Thank you.
Post Reply