I have this problem in my application. It runs under partial trust.
[SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +59
System.IO.Path.GetTempPath() +54
System.CodeDom.Compiler.TempFileCollection.GetTempFileName(String tempDir) +36
System.CodeDom.Compiler.TempFileCollection.EnsureTempNameCreated() +142
System.CodeDom.Compiler.TempFileCollection.get_BasePath() +24
System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension, Boolean keepFile) +170
System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension) +35
Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources) +637
Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources) +107
System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources) +43
Stimulsoft.Base.StiCompiler.Compile(String textToCompile, String outputAssembly, LanguageType languageType, StiOutputType outputType, String[] referencedAssemblies) +452
Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate) +4587
Stimulsoft.Report.StiReport.Compile(String path, StiOutputType outputType, Boolean autoCreate) +40
Stimulsoft.Report.StiReport.Compile(String path, StiOutputType outputType) +34
Stimulsoft.Report.StiReport.Compile(StiOutputType outputType) +33
Stimulsoft.Report.StiReport.Compile() +25
ProductListReport.Page_Load(Object sender, EventArgs e) in c:\Documents and Settings\Admin\My Documents\Visual Studio 2005\WebSites\Portal\ReportFiles\ProductListReport.aspx.cs:26
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +31
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +68
System.Web.UI.Control.OnLoad(EventArgs e) +88
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5936
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +254
System.Web.UI.Page.ProcessRequest() +112
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +37
System.Web.UI.Page.ProcessRequest(HttpContext context) +135
ASP.reportfiles_productlistreport_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\portal\aaf84d3d\1f41a599\App_Web_e2verrey.0.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +482
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +117
which changes should i do to build a report in partial trust mode.
EnvironmentPermission
EnvironmentPermission
For partial trust mode you need doing following steps:
1. Set the static property StiOptions.Engine.FullTrust to false
2. You must use your report only as C# of VB class.
3. Get the last build of StimulReport
In partial trust mode the print to pdf and saving to pdf is not accessible, because pdf require a full trust mode(export call a much WinAPI functions)
Thank you.
1. Set the static property StiOptions.Engine.FullTrust to false
2. You must use your report only as C# of VB class.
3. Get the last build of StimulReport
In partial trust mode the print to pdf and saving to pdf is not accessible, because pdf require a full trust mode(export call a much WinAPI functions)
Thank you.