I’m using Cloud Files for about a month now and I’m working on application which store files in Cloud Files.
I used .NET API for Cloud files to get Stream for File in Cloud and return content of file via ASP.NET HTTP Handler.
It works fine on my Development Server but as soon as I transfer it into Cloud Sites I get this while connecting to Cloud Files:
Request for the permission of type ‘System.Security.Permissions.SecurityPermission, mscorlib, Version=126.96.36.199, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.
The command which I get this error is:
Connection CloudConnection = new Connection(new UserCredentials(ServerUsername, ServerPassword));
Is there anything which I need to done to be able to run application on Cloud Sites?
On my development Server I set Trust Level to Medium and I got same error!!! So I think it’s about Medium Trust, but I don’t have any idea if it’s possible to make it work on RackSpace Cloud Sites?
I really appreciate any help.
Make sure you have the latest version of the Cloudfiles API. I was getting this with the older API. Authentication is different in the new API and it works in Medium Trust.
I’m having this exact same problem, using a recent version of the API.
Does the Cloud Files .NET API definitely work in medium trust?
Definitely works. i use it every day.