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

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top