Page 1 of 1

Security Exception

Posted: Mon Jun 25, 2007 4:11 am
by Chan Kuan Leang
I am using a web hosting company. I have this problem.

Code: Select all

Server Error in '/OpticalPOS' Application.
--------------------------------------------------------------------------------

Security Exception 
Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. 

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 


[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, 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.Reflection.Assembly.VerifyCodeBaseDiscovery(String codeBase) +118
   System.Reflection.Assembly.GetName(Boolean copiedName) +59
   System.Reflection.Assembly.GetName() +6
   Stimulsoft.Controls.StiImageUtils.GetImage(String assemblyName, String imageName, Boolean makeTransparent) +50
   Stimulsoft.Controls.StiImageUtils.GetImage(String assemblyName, String imageName) +7
   Stimulsoft.Report.Components.QuickButtons.StiTextQuickButton..cctor() +27

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210 
I have check with my web hosting company, they say that their server are all set to Medium trust.
I do not really understand as they mentioned about DDL, if my DDL is using full trust level. If this is the situation then please configure your DDL for the medium trust level.


Is that anything to do with StimulReports?

Thanks

Security Exception

Posted: Mon Jun 25, 2007 10:46 am
by Chan Kuan Leang
Can StimulReport works in Shared Hosting?

I have try to talk to the web hosting company to change the trust level to medium but they do not allow.
:cry:

Is there someone with the same problem but already solve it?

Thanks.

Security Exception

Posted: Tue Jun 26, 2007 6:49 am
by Edward
Tomorrow we will prepare a sample solution for this case.

Thank you.

Security Exception

Posted: Wed Jun 27, 2007 9:48 am
by Edward
Please download the build from June, 27.

When you build a report in Partial Trust mode please keep following rules:
1) The reports may be stored only as C# or Vb.Net files. In Partial trust read/write operations not allowed.
2) StiOptions.Engine.FullTrust should be assigned to false
3) Print in Pdf is not accessible.
4) Saving in Pdf is not accessible.
5) Export in Pdf is not accessible because pdf export uses winapi functions which are necessary for correct building of the Pdf file. Without using of these functions pdf export couldn't be builded.

Thank you.