0

Im just finishing off deploying my asp.net mvc 2 website up to RackSpace cloudsites.

Im currently just getting an error saying: System.Security.SecurityException: Request failed. 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.

This is occurring on the following line: <%= Combres.WebExtensions.CombresLink("siteJs")%>

So it is when Combres is trying to access the SiteJs link in the App_Data/Combres.xml file. Im transferring this site over from Discountasp where it was working without issue.

Any ideas on what the problem and fix would be?

Thanks in advance

MattyD
  • 185
  • 1
  • 3
  • 14

1 Answers1

1

If I had to take a shot in the dark based on your environment being Medium Trust, I am going to guess reflection is your issue. Combres uses Fasterflect which is a great reflection library. That being said, Medium Trust applications are not granted the ReflectionPermission so this would throw a SecurityException when attempting to run the code. If you have any details on the SecurityException, could likely confirm if that is indeed the case.

Chris Baxter
  • 16,083
  • 9
  • 51
  • 72
  • Yeah I worked out that Combres needs full trust. Rackspace will not grant Full Trust, only Medium Trust is given. – MattyD Nov 18 '10 at 23:33
  • SquishIt: https://github.com/jetheredge/SquishIt/downloads or Xpedite: http://xpedite.codeplex.com may not require Full Trust. I am fairly certain SquishIt doesn't use reflection etc anywhere so it should work, and I have never tested Xpedite in a partial trust environment, but it does not use reflection etc either. That being said, if you need Combres' less filters etc, you don't have too many options. Also feel free to accept as answer. – Chris Baxter Nov 18 '10 at 23:39