By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,028 Members | 1,062 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,028 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.