0 votes
by (120 points)
edited

i am attempting to use Rebex ftp using a shared virtual server, CloudSites from www.rackspace.com. This hosting strictly imposes medium trust restrictions. when I run the app on my development PC which runs IIS locally -no problem. Same code on the host I get the following error message.

Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Is there something I can set or switch off to make it work.

Googling this, i see this is a medium trust

My application is an ASP.NET version 3.5 web based application rather than windows forms

Code which fails

Dim ftp As New Ftp()
ftp.Connect("ftp.ibexis.com", 21)
Applies to: Rebex FTP/SSL

1 Answer

0 votes
by (13.3k points)
edited

Unfortunately, there are some permissions we need that are not available in medium trust. For example, one of them is System.Net.SocketPermission – this allows us to utilize TCP sockets to access FTP server. Without SocketPermission we are unable to connect to network.

Is it possible to ask rackspace to prepare a customized permission set for you and add at least SocketPermission?

Some methods (like using proxy with NLMN or Windows integrated authentication) also require permission to execute unmanaged code but if you do not call them rest of app should execute fine).

by (120 points)
unfortunately Rackspace requires that all applications conform to medium trust condtions. Can you prepare a customised version which does not sue socketpermission? If not I am unable to use this control and would kindly request a refund. Thanks
by (13.3k points)
The SocketPermission means that application is allowed to communicate over network. Creating a functional FTP component without using this permission is impossible to anyone, sorry. Regarding refund - sure, no problem - each order come with a money back guarantee (30 days by default). To request a refund send us your order number to support@rebex.net.
...