Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: Request for the permission of type 'System.Net.DnsPermission,

$
0
0
I am trying to connect to an sftp server in a .NET soap webservice. When trying to connect I get the exception:
Request for the permission of type 'System.Net.DnsPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
When running the same code from a console application it works as intented.
I included the Renci.Sshnet binary as reference in my webservice.

The code is very simple, just trying to make a connection. The credentials are replaced below.
using (SftpClient sftp = new SftpClient("<my host>", "<my username>", "<my password>"))
{
    sftp.Connect();
    if (sftp.IsConnected)
    {
    }
}
Any idea how to solve this problem?

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>