This project is read-only.

System.InvalidOperationException: Dynamic operations can only be performed in homogenous AppDomain

Aug 28, 2014 at 11:41 PM
I am trying to connect to FTP using your binaries and getting below error:
System.InvalidOperationException: Dynamic operations can only be performed in homogenous AppDomain. at Renci.SshNet.Session.WaitOnHandle(WaitHandle waitHandle) at Renci.SshNet.Session.Connect() at Renci.SshNet.BaseClient.Connect()...

My scenario is I am using SharePoint 2013 List event receiver to upload file in SFTP shared location which is working successfully.
I am trying to read the file from same shared location and getting above error. The only thing which is different here is, for reading I am using SharePoint 2013 Timer Job.

Quick response would be appreciated.
Sep 13, 2014 at 9:12 AM
Somewhere in your app.config file you have <legacyCasPolicy enabled="true" />

You can remove this and it will work (if you don't require it).


Problem is I have the same issue but i need the legacyCasPolicy to be enabled. Any ideas of any alternatives please?