MS SQL Permissions issue with VB2005 app when ran from network share, runs fine locally

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

Hello,

I've written a Console application in VB 2005 which parses some files and
stores the results in an MS SQL database. It runs beautifully locally, but
as soon as I stick the compiled EXE on a network share and run it either via
mapped drive or UNC it fails.

Using a Try/Catch looking at Exceptions it shows the issue is SQL
permissions. My question though is why would it matter where I executed the
EXE from... I'm logged into the system and I have full access to the
database. I am using Trusted_Connection=Yes in my connection string so it
uses the locally logged in user's credentials. Why are these not passed
through if the EXE is ran remotely as opposed to locally? The same PC is
processing the EXE.

Thanks ...

Alex
 
Hello,

I've written a Console application in VB 2005 which parses some files
and stores the results in an MS SQL database. It runs beautifully
locally, but as soon as I stick the compiled EXE on a network share
and run it either via mapped drive or UNC it fails.

Using a Try/Catch looking at Exceptions it shows the issue is SQL
permissions. My question though is why would it matter where I
executed the EXE from... I'm logged into the system and I have full
access to the database. I am using Trusted_Connection=Yes in my
connection string so it uses the locally logged in user's credentials.
Why are these not passed through if the EXE is ran remotely as
opposed to locally? The same PC is processing the EXE.


When a .NET app is run from a UNC Path it has different permissions - this
is due to how Code Access Security (CAS) works:

http://www.15seconds.com/issue/040121.htm
 
Back
Top