When I run an application from a file share and it tries to connect to the specified SQL database, I get an error 26 (error locating server/instance). If I run the application from a local drive it works. Other people can run the application (and it works correctly) from the same file share while remoted into the same server, so there is obviously some kind of permission issue going on -- but I can't figure out what. Why would a .Net application be denied access to SQL server when started from a file share, but not when started from a local disk drive? And what security privilege is necessary in order to allow it to run from the shared drive?
Asked
Active
Viewed 48 times
1 Answers
0
Prior to .NET 4 Code Access Security caused an application that was run from a share in way that caused it to be not fully trusted. On of the permissions that would be denied (by default ) is being an SQL Server client.
My guess is you are running into this issue.
This article give a nice introduction and historical overview on how CAS changed

Emond
- 50,210
- 11
- 84
- 115
-
You can still switch on CAS or not have a full trust app – Emond May 15 '13 at 17:39
-
I'm really interested in why someone else would be able to run it from the same file share (remote to both of us). Why would it be trusted by one user but not another? – jmoreno Dec 31 '14 at 06:35
-
CAS is configured per user and/or computer and/or domain. So it is very well possible for one user to have it configured differently from another user and ending up with a different set of permissions for the application. It might even be dependent on the Windows roles of the users or installed certificates on their machines. – Emond Dec 31 '14 at 07:39