Medium Trust and Cloud Files .NET API


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=, 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.

ASP.Net 2.0 – Membership and Role Providers using MySQL instead of Ms-SQL



I found an article about using ASP.Net 2.0 Membership and Role providers using the MySQL Connector.

I followed these instructions to the tee, making sure that every step I followed was correct. My code works fine locally, but not when uploaded to Mosso. Mosso says that its got something to do with the medium trust level of ASP.Net on their servers.

Does anyone have any idea as to how I can get this working? Or another way that I could get authentication working using MySQL? I am pretty novice when it comes to ASP.Net, and probably cant really write my own authentication system.

Thanks in advance!


The .net connector from mysql should be /bin deployable:

You should be able to add the assembly and whatever version you choose into the web.config like this:
<add assembly=”MySql.Data, Version=x.x.x.xxxxx, Culture=neutral, PublicKeyToken=c5687fc88969c44d” />


Hope that helps.