# Shared Network Drives - CASPOL - Help!



## theboutros (Oct 22, 2007)

For whatever the reason (not important) we have the following situation:

A .NET DLL that is called from a legacy VB application which is accessed by local users running an EXE which resides on a shared network drive.

So, to make it clear, we have users on local PC's (WinXP) that have mapped drives pointing to a network share (W: mapped to \\server\directory) who run a legacy VB application from that shared directory ("w:\app.exe"). This app then calls a .NET DLL to perform some calculations ("w:\bin\appdll.dll").

Now, what we've found is that in order for this to work the local PC's need to run the CASPOL command to create an explicit full trust between the local PC and the directory housing the DLL (please don't even get me started on what a completely terrible idea this is).

So, we created a nifty little MSI that dumps the DLL in the correct directory, performs the necesary REGASM and then, from the local PC, executes the CASPOL command.

The only problems now are that, sometime between July and Ocotber of this year somthing has changed (not on our end) whereby that CASPOL command in the installation program no longer works. It _appears _to work, but the end result ultimately is it not working.

Further to that, if we get a user to run the command manually from a command prompt, some of the PC's execute the command properly and some of the PC's do not ("Invalid Label" error, but nothing more descript).

Here's the command the program runs that used to work, and only sometimes works when run manually:

c:\windows\Microsoft.NET\Framework\v2.0.50727\CasPol.exe -q -m -ag LocalIntranet_Zone -url "file:\\server\directory\*" FullTrust -n "AppName"​
So, any ideas? I've been back and forth with the Dev guy for about a week now and we're pretty much ready to throw in the towel and go for drinks.


----------

