Question : VB.net program fails when run from a network drive

I have a straightforward VB.net program that has been working for several months when run from the C: drive.  We need to deploy it to other users (via Citrix) and have copied the program release directory to a network drive Q:.  The program fails with a .NET Runtime 2.0 invalidoperationexception (see EventLog entry below).  Using the same login, the program works when executed from C:, but fails from Q:.

My code, per se, is not even getting control.  I inserted a MsgBox() statement in the MAIN form load routine, but never see the dialog box.

The program doesn't have anything exotic.  It uses ADODB for accessing an SQL database (which resides on the C: drive), and My.Settings to access application config settings (stored in the Q: drive in same directory as the EXE).  The program directory contains all components (EXE, .config, DLLs, etc.).

I've noted other similar reports about security issues, but my error does NOT appear to be security related.  I have never had to use the NET configuration utility.  .NET 2.0 SP1 is already installed and the MDAC components are part of the Server 2003 OS.

Any help would be greatly appreciated!
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
Source = .NET Runtime 2.0 Error
Category = None
Type = Error
Event ID = 5000
User = N/A
---------------------------------------------------------
EventType clr20r3, P1 facts-valogixorders.exe, P2 1.3.0.0, P3 4acb52ef,
P4 facts-valogixorders, P5 1.3.0.0, P6 4acb52ef, P7 d, P8 c6,
P9 system.invalidoperationexception, P10 NIL.
 
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
---------------------------------------------------------
0000: 63 00 6c 00 72 00 32 00   c.l.r.2.
0008: 30 00 72 00 33 00 2c 00   0.r.3.,.
0010: 20 00 66 00 61 00 63 00    .f.a.c.
0018: 74 00 73 00 2d 00 76 00   t.s.-.v.
0020: 61 00 6c 00 6f 00 67 00   a.l.o.g.
0028: 69 00 78 00 6f 00 72 00   i.x.o.r.
0030: 64 00 65 00 72 00 73 00   d.e.r.s.
0038: 2e 00 65 00 78 00 65 00   ..e.x.e.
0040: 2c 00 20 00 31 00 2e 00   ,. .1...
0048: 33 00 2e 00 30 00 2e 00   3...0...
0050: 30 00 2c 00 20 00 34 00   0.,. .4.
0058: 61 00 63 00 62 00 35 00   a.c.b.5.
0060: 32 00 65 00 66 00 2c 00   2.e.f.,.
0068: 20 00 66 00 61 00 63 00    .f.a.c.
0070: 74 00 73 00 2d 00 76 00   t.s.-.v.
0078: 61 00 6c 00 6f 00 67 00   a.l.o.g.
0080: 69 00 78 00 6f 00 72 00   i.x.o.r.
0088: 64 00 65 00 72 00 73 00   d.e.r.s.
0090: 2c 00 20 00 31 00 2e 00   ,. .1...
0098: 33 00 2e 00 30 00 2e 00   3...0...
00a0: 30 00 2c 00 20 00 34 00   0.,. .4.
00a8: 61 00 63 00 62 00 35 00   a.c.b.5.
00b0: 32 00 65 00 66 00 2c 00   2.e.f.,.
00b8: 20 00 64 00 2c 00 20 00    .d.,. .
00c0: 63 00 36 00 2c 00 20 00   c.6.,. .
00c8: 73 00 79 00 73 00 74 00   s.y.s.t.
00d0: 65 00 6d 00 2e 00 69 00   e.m...i.
00d8: 6e 00 76 00 61 00 6c 00   n.v.a.l.
00e0: 69 00 64 00 6f 00 70 00   i.d.o.p.
00e8: 65 00 72 00 61 00 74 00   e.r.a.t.
00f0: 69 00 6f 00 6e 00 65 00   i.o.n.e.
00f8: 78 00 63 00 65 00 70 00   x.c.e.p.
0100: 74 00 69 00 6f 00 6e 00   t.i.o.n.
0108: 20 00 4e 00 49 00 4c 00    .N.I.L.
0110: 0d 00 0a 00               ....

Answer : VB.net program fails when run from a network drive

Have you enabled .NET to run from a network share? By default it is NOT allowed.

Here's how to do it with CASPOL.EXE

http://social.msdn.microsoft.com/forums/en-US/clr/thread/e4a65263-24f9-45a6-a2ad-6c26aae36075/

I can't remember the error text you're presented with if this is the situation, but I think this the obvious first step.
Random Solutions  
 
programming4us programming4us