This project is read-only.

RazorGenerator Medium trust problems

Jan 18, 2012 at 11:17 AM

I'm using RazorGenerator to precompile the view. It works gerat in Full trust level. However my app runs in Shared hosting and thus requires to run under Medium trust.

I get the following error message:

[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) +31
System.Security.CodeAccessPermission.Demand() +46
System.Reflection.RuntimeAssembly.get_Location() +100
RazorGenerator.Mvc.PrecompiledMvcEngine..ctor(Assembly assembly) +83
RGMvcApp.App_Start.RazorGeneratorMvcStart.Start() +109

It happens when defining/adding the new precompiled mvc view engine at App_Start.

There must be a solution for this.

Thanks in advance.

Jan 18, 2012 at 6:47 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jan 19, 2012 at 2:30 PM

It works great. Thanks a lot.