Weird error with VB Program and Networked drives - any idea ?

G

Guest

I'm having what seems to be a rather strange error.

The VB program interacts with an Access Database with ODBC connection to a
DB2 database, but doesn't really do anything too tricky (select statements,
outputting formated text to text files, a single update query). However, the
problem may not relate to that complexity.

When I run the program within VB 2003 .Net environment, it works perfectly.

When I run the compiled program from a local (C: Drive or E: Usb pen drive),
it works perfectly.

When I run the compiled program from a networked drive, it fails before
loading the form with : "An exception 'System.Security.SecurityException' has
occurred in <program name>."

When I try to debug that in Visual Studio .Net 2003, it says that it is an
unhandled exception within the program, with additional information "Request
failed". It is duing the InitializeComponent() line of the Windows Form
Designer generated code that we're not supposed to change!

Any idea what is happening ?

Cheers,
Chris
 
G

Guest

Some additional information, and a revision of the question.

I've cut the program down, and managed to find the offending line. Whenever
the following line is reached (whether in the windows generated form
definition, where it was, or in the code run by pressing a button, where I
moved it to), the error is generated, but only when running the windows
application from a networked drive :

InvDbCommand = New System.Data.OleDb.OleDbCommand

The error generated is :

The application attempted to perform an operation not allowed by the
security policy. The operation required the SecurityException. To grant this
application the required permission please contact your system administrator,
or use the Microsoft .NET security policy administration tool.

So, the question is, what change has to be made by the system administrator,
or in the Microsoft .NET security policy administration tool, in order to
allow a VB windows application containing the above line to run from a
networked drive ?

Cheers,
Chris
 

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