简体   繁体   English

Caspol,VM,映射驱动器,VS2010

[英]Caspol, VMs, Mapped Drives, VS2010

(updated this after various other attempts to crack it!) (在尝试了其他各种破解方法后更新了此功能!)

I have a VM (Win7 32 bit) with VS2010 installed. 我有一个装有VS2010的VM(Win7 32位)。 I have a drive mapped (not a vm shared folder 'cos I found a write-latency issue in other scenarios) into it from the host machine (VM 64 bit), when I have some of my VS2010 projects and to where I am building them. 当我有一些VS2010项目以及要构建的位置时,从主机(VM 64位)将驱动器映射到了驱动器(不是vm共享文件夹'cos,在其他情况下我发现了写延迟问题)他们。 (I've also tried mapped from an XP 32 bit host as well, but have exactly the same problem). (我也尝试过从XP 32位主机映射,但是有完全相同的问题)。

One of my projects is looking to load an assembly. 我的一个项目是要加载程序集。 If I copy that assembly to a local drive, the program ruins fine. 如果我将该程序集复制到本地驱动器,该程序将无法正常运行。 If I leave it on the mapped drive, then I get an error 如果我将其保留在映射的驱动器上,则会出现错误

Exception is: FileLoadException - Could not load file or assembly 'file:///G:\BusinessTier\bin\Debug\BusinessTier.dll

I am unsure whether or not I need to run Caspol. 我不确定是否需要运行Caspol。 There is another post on SO which pointed me to a post which indicated that VS2008 SP1+ removed the need for caspol wrt network drives, but I wondered if I still needed to because I am in a VM. SO上还有另一篇文章,指出我的文章表明VS2008 SP1 +消除了对caspol wrt网络驱动器的需求,但我想知道是否仍需要这样做,因为我在VM中。

I have tried running the following on the host machine in an attempt to give permissions to VS inside the VM, but to no avail 我试图在主机上运行以下命令,以尝试向VM内部的VS授予权限,但无济于事

C:\Windows\Microsoft.NET\Framework\v4.0.30128>caspol -m -ag 1 -url file://g:\* FullTrust
C:\Windows\Microsoft.NET\Framework\v4.0.30128>caspol -m -ag 1.2 -url file://g:\* FullTrust
C:\Windows\Microsoft.NET\Framework\v4.0.30128>caspol -m -ag 1.3 -url file://g:\* FullTrust
C:\Windows\Microsoft.NET\Framework\v4.0.30128>caspol -m -ag 1.5 -url file://g:\* FullTrust

where g:* is the drive being mapped into the VM (as drive z:) 其中g:*是要映射到VM的驱动器(作为驱动器z :)

Similarly, following various blog postings (A), I have tried 同样,在各种博客文章(A)之后,我尝试了

  • replacing the local drive letter to a unc 将本地驱动器号替换为unc
  • quoting file://unc and/or drive letter eg "file://g:*" 引用file:// unc和/或驱动器号,例如“ file:// g:*”
  • adding various numbers of forward/back slashes eg file://g:/* with unc and local path 添加各种数量的正/反斜杠,例如file:// g:/ *,带有unc和本地路径

However (and this could be a red herring), if I create a simple winforms exe in the VM and save it onto the g: drive it seems to run okay 但是,(这可能是一个红色的鲱鱼),如果我在VM中创建一个简单的winforms exe并将其保存到g:驱动器上,它似乎可以运行

What am I missing (apart from understanding!)? 我缺少什么(除了了解!)?

I am beginning to wonder whether the problem is a permissions issue on the host vm, but I have given Full control permissions to Everyone on that share. 我开始怀疑问题是否是主机vm上的权限问题,但是我已对该共享上的所有人赋予了完全控制权限。 (Although I can read and write to that folder so TMM the permissions look like they are probably correct). (尽管我可以读写该文件夹,所以TMM的权限看起来像是正确的)。 Should that be good enough for a user who is connecting remotely? 这对于远程连接的用户是否足够好?

Thx 谢谢

Simon 西蒙

A - There are a whole host of other blog entries which offer alternative solutions, none of which appear to work for me. 答-还有很多其他博客条目提供了替代解决方案,但这些似乎都不适合我。 but others have had success with eg (perhaps this may help others) 但是其他人已经取得了成功(例如,这可能对其他人有帮助)

尝试使用主机名而不是网络驱动器执行caspol,例如

caspol -m -ag 1.3 -url "file://\.vmware-host/*" FullTrust

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM