Hi,
We are moving a VB6 app to .NET form by form.
In the past for our VB6 app we installed the necessary ocx's, dll's
etc on the client
PC but kept the main exe on a network folder. To release a new version
of the application we could just replace the exe file on the network
instead of doing a local install on every PC.
Now we've developed an InterOp form in .NET. It works fine with the
VB6 exe if we let the .NET installler store all of the files on the
client C: drive, but it doesn't want to play ball if we install it
to a network path.
We get this error
---------------------------
Project1
---------------------------
Run-time error '-2146233078 (8013150a)':
Automation error
---------------------------
OK
---------------------------
If we try to reference the network .NET interop form from Excel we
get
---------------------------
Microsoft Visual Basic
---------------------------
Run-time error '-2147024894 (80070002)':
Automation error
The system cannot find the file specified.
---------------------------
OK Help
---------------------------
Has anyone done something similar successfully ?
Thanks a million,
Joe
Phill W. - 12 Feb 2008 12:51 GMT
> It works fine with the VB6 exe if we let the .NET installer
> store all of the files on the client C: drive, but it doesn't
> want to play ball if we install it to a network path.
The .Net Framework Trusts the local disks on the PC. Any .Net code that
managed to "get there" can do whatever it likes.
It /doesn't/ Trust /anything/ else, and that includes your network file
shares. Any .Net code run from these runs in a restricted, security
"sandbox" which severely limits what the code is allowed to do.
I would expect that anything to do with COM is likely to be on the
"No-no" list.
You can use Code Access Security Policies (using either the
script-friendly caspol.exe or [the incomprehensible] mscorcfg.msc) to
tell your PC's to Trust the file share just as it would code running
locally.
You /do/ have to do this on /every/ client machine.
HTH,
Phill W.
joseph.fallon@ipsi.ie - 04 Mar 2008 10:34 GMT
Thanks for that Phill, will give it a shot.