VB .NET executable on a network share

G

Guest

Can you run a VB.NET executable from a network share on a server. My company does this with VB 6.0.

Example
..Net executable on network file server called Toky
client computer has a shortcut on desktop pointing to the executable: \\Tokyo\VBNET\myapp.ex

Note executable uses SqlDataClient object

Form comes up fine on client but when you try and run an update sql stored procedure application bombs with the error

'System.Security.SecurityException: Request for the permission of type System.Data.SqlClient.SqlClientPermission...'
 
R

Rob Windsor [MVP]

You're getting that error because applications that are loaded from a
network drive are denied permissions to access certain resources like
databases or the local file system.

The two technologies involved here are Code Access Security and No-Touch
Deployment (aka Smart Client Deployment, Zero Deployment or HREF EXE
Deployment)

Follow the link below for Powerpoint slides, sample code and links to
webcasts and articles that cover this topic.

http://www.tvbug.com/diary/20030923.htm

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada



klkuenzel said:
Can you run a VB.NET executable from a network share on a server. My company does this with VB 6.0.

Example:
.Net executable on network file server called Tokyo
client computer has a shortcut on desktop pointing to the executable: \\Tokyo\VBNET\myapp.exe

Note executable uses SqlDataClient objects

Form comes up fine on client but when you try and run an update sql stored
procedure application bombs with the error:
'System.Security.SecurityException: Request for the permission of type
System.Data.SqlClient.SqlClientPermission...'
 
G

Guest

Thanks Rob

I actually found what I was looking for on another thread in this group
By setting the security policy for .net "Local Intranet" to full trust the application worked, this may not be the most secure way to do it, but it works. I will also look at the information you provided

Thanks again
Kent
 

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