System.Security.SecurityException: That assembly does not allow partially trusted callers
I was writing a Windows Azure ASP.NET MVC application and when making a call to a page I received the following exception:
System.Security.SecurityException: That assembly does not allow partially trusted callers
In my application I’m using Castle Windsor for dependency injection and when trying to resolve a service using:
IGravatar gravatar = MvcApplication.Container.Resolve<IGravatar>();
I received this message. To solve things I needed to update the WebRole element in the ServiceDefinitions.csdef file so that enableNativeCodeExecution is enabled.
<WebRole name=”TwitterGravatarMVC” enableNativeCodeExecution=”true”>
I found the solution, detailed above, on the Azure Services Platform Developer Centre forum.
Related posts:
-
http://kozmic.pl Krzysztof Ko?mic
About Phil Leggetter
My name is Phil Leggetter and I'm a Developer Evangelist at Pusher, a Real-Time Web Software and Technology Evangelist and Consultant, software engineer, team leader, line manager, micropreneur, product developer, Twitter user and a keen user of social media. For more information see the About Phil Leggetter page.
Social
Tags
.NET Ajax API APIs ASP.NET MVC Bing Blogging C# cloud comet Community DataSift Facebook Google Hardware http streaming ian sanders ideas Internet JavaScript Kwwika Life Mapping Microsoft Mobile Phones pubsubhubbub pusher real-time real-time data real-time push real-time web realtime RSS RTRIA Scotland silverlight Social Media Software Development Superfeedr truly real-time truly real-time web Twitter web 2.0 websockets Whinge









