Setting up Code Access Security

C

Chris Dunaway

We have an app that will be run from a network share. I know that on
the machine that will run the app, I need to grant the proper
permissions. On the laptop, I installed the .Net framework verson 2.0
(dotnetfx) but when I went to the control panel under administrative
tools, the .Net 2.0 configuration tool was not there. The 1.1 tool
was there, but not the 2.0 tool.

How do you configure code access without that tool?

Chris
 
N

Nicholas Paldino [.NET/C# MVP]

Chris,

I believe you can use CASPOL.EXE to configure the framework. However,
that tool should be there. I would reinstall the framework and use that.

This assumes you have the proper rights to use the tool. Since you have
access to the 1.1 tool, you should have access to the 2.0 tool.

Hope this helps.
 
J

Jani Järvinen [MVP]

Hello!
I believe you can use CASPOL.EXE to configure the framework. However,
that tool should be there. I would reinstall the framework and use that.

Yes, one could use CASPOL.EXE to configure what is needed, but this is a
command-line interface and I prefer GUIs for this kind of work.

As for the graphical configuration utility, I don't think it comes with the
..NET Redistributable. Unless I'm mistaken, it is only part of the .NET 2.0
SDK kit, which is of course a free download as well but otherwise
unnecessary for a production machine.

The configuration utility Chris is looking for is named "mscorcfg.msc". It
is a MMC snap-in. By default, the location is:

"C:\Program Files\Microsoft Visual Studio 2005\SDK\v2.0\Bin\mscorcfg.msc"

For .NET 1.1, this file came with the redistributable.

Hope this helps.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
(e-mail address removed)
http://www.saunalahti.fi/janij/
 
C

Chris Dunaway

Jani said:
The configuration utility Chris is looking for is named "mscorcfg.msc". It
is a MMC snap-in. By default, the location is:

"C:\Program Files\Microsoft Visual Studio 2005\SDK\v2.0\Bin\mscorcfg.msc"

The machine that I am configuring security for may not have Visual
Studio installed on it but will that snap in still be there in that
case?

I was able to use caspol to grant the trust that I need, however.

Thanks Nick and Jani for the suggestions
 
W

Willy Denoyette [MVP]

The GUI tool is not any longer considered an end user tool, it's a
developpers tool, CASPOL is the only tool available on a run-time only
system. It's up to you (the developer) or an admin to supply a command
script (batch file) in oder to configure CAS, an other option is to do it in
code, but why would you?

Willy.

| Hello!
|
| > I believe you can use CASPOL.EXE to configure the framework. However,
| > that tool should be there. I would reinstall the framework and use
that.
|
| Yes, one could use CASPOL.EXE to configure what is needed, but this is a
| command-line interface and I prefer GUIs for this kind of work.
|
| As for the graphical configuration utility, I don't think it comes with
the
| .NET Redistributable. Unless I'm mistaken, it is only part of the .NET 2.0
| SDK kit, which is of course a free download as well but otherwise
| unnecessary for a production machine.
|
| The configuration utility Chris is looking for is named "mscorcfg.msc". It
| is a MMC snap-in. By default, the location is:
|
| "C:\Program Files\Microsoft Visual Studio 2005\SDK\v2.0\Bin\mscorcfg.msc"
|
| For .NET 1.1, this file came with the redistributable.
|
| Hope this helps.
|
| --
| Regards,
|
| Mr. Jani Järvinen
| C# MVP
| Helsinki, Finland
| (e-mail address removed)
| http://www.saunalahti.fi/janij/
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top