Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

allow .NET 2.0 runtime to run executables from network with full trust

Tags:

.net

security

Guys, this can't be for real

I'm trying to make a .NET 2.0 executable run from a network drive and it turns out that since Microsoft .net 2.0 has no mscorcfg.msc installed on server 2003, in order to get one I have to install the full SDK. I simply want to run the dang thing without downloading 350Mb piece of crap!

Sorry for rant... Anyone can think of an easy solution?

EDIT1: There seems to be a misunderstanding as to what is it that I want to achieve. This is for my test environment. I have many virtual machines and all I want is to just disable the dang security altogether. The task seems to be so trivial, yet it seems so far I have to deploy SDK, or 3.5 SP1, or some other multi-terabyte package to every machine in order to achieve it

like image 537
galets Avatar asked Feb 10 '09 16:02

galets


4 Answers

You can try running the following command from the .NET command prompt -

caspol -cg All_Code FullTrust

This gives the code group 'All_Code' the full set of permissions.

like image 93
ilias Avatar answered Nov 17 '22 06:11

ilias


You can configure the security with caspol.exe, without needing the msc. However, it would be easier to use ClickOnce deployment ("publish") from VS2005 - this avoids most of the security issues with network shares (but can be hosted on a network share).

like image 2
Marc Gravell Avatar answered Nov 17 '22 05:11

Marc Gravell


You can try updating to .Net 3.5sp1 or later. That should be capable of running .Net 2.0 code, but they changed the trust system in that version to fix this deployment scenario.

Also, I don't have the link handy, buy you don't need the full SDK to get mscorcfg.msc. I've seen it included in a much smaller package. But again, I don't have the link handy and you could google it as easy as I.

like image 1
Joel Coehoorn Avatar answered Nov 17 '22 04:11

Joel Coehoorn


Have you tried caspol.exe?

http://msdn.microsoft.com/en-us/library/cb6t8dtz(VS.80).aspx http://blogs.msdn.com/shawnfa/archive/2004/12/30/344554.aspx

like image 1
Alejandro Mezcua Avatar answered Nov 17 '22 06:11

Alejandro Mezcua