title: After Windows 10 update 1803 my program can't open a socket when running from network share
body: <p>I am running some self written Winforms .net 3.5 applications from a shared folder in Windows 10. </p>
  
  <p>Everything worked correctly, but after the last big update (1803) the application doesn't start any more.</p>
  
  <p>It seems that the program is crashing in the moment it is trying to open a socket. The first problem was when accessing the database it got the following exception:</p>
  
  <pre><code>2018-05-03 14:36:32,314 [1] ERROR NHibernate.Transaction.AdoTransaction [(null)] - Begin transaction failed
  MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---&gt; System.Net.Sockets.SocketException: invalid argument
     at System.Net.Sockets.Socket..ctor(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType)
     at MySql.Data.Common.MyNetworkStream.CreateSocketStream(MySqlConnectionStringBuilder settings, IPAddress ip, Boolean unix)
     at MySql.Data.Common.MyNetworkStream.CreateStream(MySqlConnectionStringBuilder settings, Boolean unix)
     at MySql.Data.Common.StreamCreator.GetStream(MySqlConnectionStringBuilder settings)
     at MySql.Data.MySqlClient.NativeDriver.Open()
  </code></pre>
  
  <p>I've tried to work around this issue, but even accessing a SSH server didn't work when the program is started from the network share:</p>
  
  <pre><code>2018-05-03 14:30:30,654 [1] ERROR WinForms.SpringApplication [(null)] - Main Handler
  Tamir.SharpSsh.jsch.JSchException: System.Net.Sockets.SocketException: invalid argument
     at System.Net.Sockets.Socket..ctor(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType)
     at Tamir.SharpSsh.java.net.Socket..ctor(String host, Int32 port)
     at Tamir.SharpSsh.jsch.Util.createSocket(String host, Int32 port, Int32 timeout)
     bei Tamir.SharpSsh.jsch.Session.connect(Int32 connectTimeout)
     bei Tamir.SharpSsh.SshBase.ConnectSession(Int32 tcpPort)
     bei Tamir.SharpSsh.SshBase.Connect(Int32 tcpPort)
     bei Tamir.SharpSsh.SshBase.Connect()
  </code></pre>
  
  <p>When I copy the directory locally the program works fine.</p>
  
  <p>Any ideas why it seems that Windows is blocking access to sockets when I'm starting this program from a network share ?</p>
  
  <p>I know about trusting .net code, so it can be run from a network share, but I've renewed the full trust and it still crashes (and normally it crashes much earlier if I didn't do a full trust).</p>