I’m trying to play around with the new Amazon Product API code examples and I’m not able to get them to run on the server. I get an error that reads:
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: That assembly does not allow partially trusted callers.
What’s frustrating is that I cannot get any of the new Amazon Product API’s to work. With my latest effort using a slightly different X509 certificate example as a template I get a permission error on the certificate creation attempt:
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.
I was hoping that someone else on Jodohost is using the Amazon API’s and had a sample that they could pass along. The samples Amazon are putting out there don’t seem to work for what I assume is a very typical shared hosting environment. I don’t get it.
I haven’t tried the Amazon APIs but it looks like a file creation problem.
JodoHost seem to be happy to change some of the file system permissions so that DotNetNuke will install and run. I think most of this involves the ability to create and update files below the web root.
I suspect that if you asked them to do whatever they do for DNN then it might work. Perhaps Stephen can comment if there’s any problem with asking for that.
The originUrl is what I needed to allow the call to Amazon in Medium Trust.
I’m not sure that line in the web.config will work on Jodo but it seems to me that calls to the Amazon API are safe enough that it can go into the medium trust machine configuation.
for WCF I may be willing to allow that, will evaluate, but for the loading of certificates in medium trust like the 2nd part, it allows too much else to allow.