SqlConnection Error if EXE is executed from network path

前端 未结 4 1670
春和景丽
春和景丽 2021-02-07 03:58

First of all: everything you will read in this post happens only if Windows 10 April 2018 update is installed. No problem be

相关标签:
4条回答
  • This blog gives a solution to this, which worked for us. Specifically look at the answer from "M.Hermann": Windows 10 1803 won't run ODBC SQL connected application from network

    The below link seems to explain why SMBv1 is disabled: SMBv1 is not installed by default in Windows 10 Fall Creators Update and Windows Server, version 1709 and later versions

    I'm not sure why this only seems to be a problem after 1803 though, since SMBv1 has been disabled since 1709.

    0 讨论(0)
  • 2021-02-07 04:25

    Finally I found the problem: in the server with the shared folder, SMBv2 is disabled (I don't know why) so only SMBv1 is active; the same program executed from the same client in the same network but located on a server with SMBv2 enabled works fine.

    So the problem is about SMBv1 share, deprecated starting from Windows 10 1803

    0 讨论(0)
  • 2021-02-07 04:25

    I have same problem with some application write in "Rad Studio 10.2"

    I find a solution for me, i change my connection string by deleting the parameter "Network Library = dbmssocn"

    I change this :

    Provider=SQLOLEDB.1;Password=MyPassword;Persist Security Info=True;User ID=MyUser;Initial Catalog=MyDb;Data Source=MyServer;Network Library=dbmssocn;
    

    To this :

    Provider=SQLOLEDB.1;Password=MyPassword;Persist Security Info=True;User ID=MyUser;Initial Catalog=MyDb;Data Source=MyServer
    

    Now all work fine !

    0 讨论(0)
  • 2021-02-07 04:27

    You are attempting to execute and untrusted executable (by default for any .exe on a network share). It is therefore restricted in what it can do.

    Try right-clicking the exe and doing a 'run as administrator'.

    You might also try looking into the local security policy.

    0 讨论(0)
提交回复
热议问题