Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / March 2008

Tip: Looking for answers? Try searching our database.

VB6/ VB.NET interop form from a Network drive ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
joseph.fallon@ipsi.ie - 11 Feb 2008 16:05 GMT
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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.