caspol

execute caspol from within vbscript

Hi all, I'd like to call caspol from within a script inside a custom action in an msi (setup project). I'd prefer a standard msi to ClickOnce, because with a standard msi I can install drivers & associate filetypes with our application whereas with ClickOnce I can't. When I execute the caspol command from the command line it succeeds, ...

What's the best way for a VPC to access files on the host machine

I am running Vista64 as the host for Win XP in Virtual PC 2007 SP1. I want to store my files on the host machine and just access them from the virtual pc. I access the files on the Host through a network share over the loopback adapter. Everyone has read access to the share and in the VPC the share is mapped to the U:\ drive letter. ...

.Net 2.0 application from network share without FullTrust

I am trying to run a .Net 2.0 application from a network share without using the FullTrust permission set. I want to create a new permission set that has just the permissions my assemblies require, and then assign that to the exe on the shared path. Is it possible to do this? From my limited experiments, I find that I am unable to do get...

C#: windows application Caspol

I have a windows application.. which will run in a very restricted environment ... The windows app queries event logs and performance counters.. it requires these permission.. the log in account being restricted disallow access to event logs and performance logs... I cant make any changes to the windows application... i was looking for a...

Virtual PC 2007 host is 64 bit XP Pro - guest is 32 bit XP Pro - cannot access shared folder

I've Googled, I've Caspol to death, but I still cannot load a VS2008 solution from a drive on the host machine. I get the project location not trusted message. When I try: Caspol -q -machine -addgroup 1 -url file://d:/* FullTrust -name "D Drive" VS2008 starts to open the solution, then crashes with no error message - just disappears....

CASPOL, FullTrust and running an ActiveX Control in IE with FullTrust based on URL

I've set up an activex control to run on a webpage. The server is able to serve this webpage to itself, but other machines on the intranet and internet aren't able to access it. The Caspol settings look like this: Code Groups: 1. All code: FullTrust 1.1. Zone - MyComputer: FullTrust 1.1.1. StrongName - (omitted) : FullTru...

How to change the security level of a local assembly to internet or customized permission set?

I built a assembly which is a class library, for example lib.dll . And I also have a application to access this lib, for example test.exe. I changed the security permission for the test.exe to "intranet". At the same time, I want to change lib.dll to "Internet" like this: (Because I want to do some testing for security.) CasPol.exe -m ...

Is there a CASPOL.exe GUI command line generator?

Is there a simple utility/GUI application for generating CASPOL commands? ...

Setting Code Access Policy (CAS) on console application running over network

I have a console app written in .NET 2 that uses reflection to dynamically load Assembly files, instantiate an instance of that Assembly, and invoke members of it. I had this app running very smoothly on our current servers, but we're now migrating to a new host, which is a 64-bit machine running Server 2008. The code that is executed, r...

A CASPOL command to completely trust all code

We have a a couple of old framework 1.1 applications at my workplace, and we have run up against security exception problems. At this stage, I don't have the option of upgrading the apps to use ClickOnce security. What I am after is a CASPOL command that will just allow any .NET applications to run on the users machine, regardless of wh...

MS Exam 70-536 - Caspol actions not presented by .Net Config Tool

Hello! Studying MS Exam 70-536 .Net Foundation I've got to Chapter 11 Application Security and in the end of a lesson there is a practice to add code group with .Net Configuration Tool and change it with caspol. After adding new code group with config tool I've tried to run caspol -lg but new group was not listed... ...

C# app fails to load Matlab DLL when running from a shared drive?

I have a C# .NET 2.0 program that calls a Matlab .dll file that I created using Matlab Builder for .NET. This Matlab .dll file is a wrapper for a m file function that I need to call from my C# program. Everything works fine when I run this app from my local drive. However once I copy the app to a shared drive the Matlab dll fails when...

.NET: are regasm and caspol dependent on which user is logged

When using regasm and caspol to register and grant trust to assemblies, will it matter under which user account these utilties are executed? Could there arise a situation where assemblies are registered and/or granted trust only for certain users on a machine or domain? ...

Caspol, VMs, Mapped Drives, VS2010

Hi (updated this after various other attempts to crack it!) I have a VM (Win7 32 bit) with VS2010 installed. 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. (I've also t...

That assembly does not allow partially trusted callers although the zone is fully trusted.

Since yesterday, I receive a security exception when I want to run a unit-test from within VS.NET 2008. The error goes like this: SecurityException: that assembly does not allow partially trusted callers ... The assembly that failed was : file:///S:/MyProject/MyAssembly.dll The S: drive is a mapped drive which points to a physical lo...

Why would you need to run regasm and caspol on a .net component more than once?

Why would you need to run regasm and caspol on a .NET component more than once? I have a COM client that uses a .NET component residing on another machine. Consequently I need to run regasm and caspol on this .NET component. What could cause there to be the need to do this again on the same machine to the same component? Is the effec...

Exists a replacement for the command-line-tool CASPOL.exe?

When trying to execute a .NET-App, it throws a "PolicyException", because "only one group is allowed". The tool should list existing settings, and allow to delete selected settings. Using caspol to list is not helpful, it is cruel. I've seen there is a simple gui-frontend, which allows to define NEW settings, but it does not allow to li...

Problem deploying VSTO add-in in 64 bit Windows Server 2003 Terminal Server environment

Hi, We are having a problem deploying a VSTO 2005 Second Edition Add-In and would appreciate any help with this. We previously successfully deployed this add-in onto a 32bit Windows 2003 terminal service environment. By default VSTO installs on a per-user basis. But we got around this limitation by creating a custom CASPOL script which...

Run c# .NET Program from network share

Hello, got a interesting problem. I placed a c# .net .exe file on a network share. If i try to Start->Run: \\hostname\test.exe my software starts properly and everything is working. We also have a DNS Alias set for this computer, so if I try to run my program by: Start->Run: \\mydnsalias\test.exe My programm will cause an error me...

Legacy Security Policy in Visual Studio 2010 and COM References

I have a project using DevExpress 8.3 (2008.3) which I just recently upgraded to use VS 2010. After doing so, everything compiled fine but I got errors trying to use the designer. I resolved this as described here: http://stackoverflow.com/questions/2637089/netfx40-legacysecuritypolicy-in-design-time-mode by adding <NetFx40_LegacySecur...