I've published an MVC 3 web application using Cassette on a Windows 2008 server with medium-trust security level (the hosting company doesn't allow me to change the security level).
According to this link, Cassette runs on medium-trust level, but when I run the application, the following exception is thrown:
Security Exception: 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.
[SecurityException: Request failed.]
Cassette.CassetteApplicationContainer`1.CreateNewApplicationWhenFileSystemChanges(String rootDirectoryToWatch) +0
Cassette.CassetteApplicationContainerFactoryBase`1.CreateContainerFromConfiguration() +232
Cassette.Web.CassetteApplicationContainerFactory.CreateContainer() +21
Cassette.Web.StartUp.InitializeApplicationContainer() +22
Cassette.Web.StartUp.PostApplicationStart() +436
Does anyone know how to solve this or what am I doing wrong?
Thanks
Problem solved. I was running the application in Debug mode. Just needed to change to Release mode.