System.IO.__Error.WinIOError

Stimulsoft Reports.WEB discussion
Post Reply
mastertech
Posts: 6
Joined: Fri Jun 28, 2013 8:18 pm

System.IO.__Error.WinIOError

Post by mastertech »

I have an application used by over 100 users . Stimulsoft net that has the functions normally but after 15 to 20 days is no longer possible to print to the report showing a message . I'm using version 2013.2.1617.0.

Following message

System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) em System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) em System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) em System.IO.File.InternalReadAllBytes(String path, Boolean checkHost) em Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames) em Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources) em Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources) em Stimulsoft.Base.StiCompiler.Compile(String textToCompile, String outputAssembly, LanguageType languageType, StiOutputType outputType, String[] referencedAssemblies, List`1 resources) em Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate, Object standaloneReportType) na d:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.cs:linha 7075 em Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate) na d:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.cs:linha 6881 em Stimulsoft.Report.StiReport.Compile(String path, StiOutputType outputType, Boolean autoCreate) na d:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.cs:linha 6466 em Stimulsoft.Report.Engine.StiReportV2Builder.RenderSingleReport(StiReport masterReport, StiRenderState renderState) na d:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\Engine\EngineV2\Builders\StiReportV2Builder.cs:linha 140 em Stimulsoft.Report.StiReport.RenderReport(StiRenderState renderState) na d:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.cs:linha 4681 em Stimulsoft.Report.StiReport.Render(StiRenderState renderState, StiGuiMode guiMode) na d:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\StiReport.cs:linha 4541 em Stimulsoft.Report.Web.StiWebViewer.ProcessReport() na d:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report.Web\StiWebViewer.cs:linha 2421 em Stimulsoft.Report.Web.StiWebViewer.set_Report(StiReport value) na d:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report.Web\StiWebViewer.cs:linha 3590 em DBUP.WebForm1.Page_Load(Object sender, EventArgs e) na c:\StarTeam\Web\DBUP\DBUP - MATRIX\DBUP\RelPacientesRelatorio2.aspx.cs:linha 47
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: System.IO.__Error.WinIOError

Post by HighAley »

Hello.

Please, read the Something You Should Know When Working with Compiled Report article on our blog.
You will get there all necessary information.
Let us know if you need any additional help.

Thank you.
mastertech
Posts: 6
Joined: Fri Jun 28, 2013 8:18 pm

Re: System.IO.__Error.WinIOError

Post by mastertech »

Aleksey Andreyanov wrote:Hello.

Please, read the Something You Should Know When Working with Compiled Report article on our blog.
You will get there all necessary information.
Let us know if you need any additional help.

Thank you.

I do not work that way. I call the file directly .mrt

Never had to perform this procedure to save the report with extension .dll.

How will this solve my problem?
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: System.IO.__Error.WinIOError

Post by HighAley »

Hello.

Each time you load report template from .mrt file it should be compiled before rendering. Each time an assembly is created on the disk and is loaded into the memory. .Net Framwork unloads assemblies with AppDomain only, so after compiling too many reports you get a error. How to solve this problem you could read in the article above.

Sorry, but we don't see error message in your first post. There is error stack only.

Thank you.
lamthanha
Posts: 9
Joined: Thu Dec 20, 2018 8:34 am

Re: System.IO.__Error.WinIOError

Post by lamthanha »

Hi,

I'm getting this error too. But it only happens occasionally, then when I try to generate the report again, it works fine.
The blog above is no longer available, please check.

Thank you.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: System.IO.__Error.WinIOError

Post by HighAley »

Hello.

You could get necessary information in the Using report assemblies article.

Thank you.
lamthanha
Posts: 9
Joined: Thu Dec 20, 2018 8:34 am

Re: System.IO.__Error.WinIOError

Post by lamthanha »

Hi,

Thank you for your response.

Do we really need to call report.Compile()? What happens if we don't?

I tried removing it in my code, yet the report still generate fine.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: System.IO.__Error.WinIOError

Post by HighAley »

Hello.

The Compile() method will be run automatically if the Calculation Mode is Compilation.
Please, read the article carefully and let us know if you have any question.

Thank you.
Post Reply