I have the same problem, but the issue is not related to SocketPermission, which Rackspace Cloud grants. The problem is that the Rebex SFTP library demands FileIOPermission, even if I am using Streams and not file names in my API calls. Actually the Connect method fails because it requires FileIOPermission.
Is it possible to have a version which does not require FileIOPermission?
Here's the stack trace: why do you try reading the Assembly location? Is that for licensing purposes? It just does not work.
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.Reflection.Assembly.get_Location() at cfDEPv.blAlGPZ.COzXmRZ() at cfDEPv.blAlGPZ.AiWkiLZ() at Rebex.Net.Sftp.beYqct() at Rebex.Net.Sftp.Connect(String serverName, Int32 serverPort, SshParameters parameters) at Rebex.Net.Sftp.Connect(String serverName) at Antea.ECG.NetworkProtocols.SFTP.Connect()