Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/20

Click to flip

20 Cards in this Set

  • Front
  • Back
What is an application domain?
An application domain is the bridging link between managed and unmanaged code wherby unmanaged code the os is. An app domain is the equivelant to a process only that it sits on top of the unmanaged process. There is no one-to-one requiremend therefore one process can host multiple app domains.
What is the advantage of loading assemblies into seperate AppDomains?
- Reliability, appDomain can be unloaded without affecting the process
- Efficiency, an assembly cannot be unloaded if its in the DefaultDomain, but in a seperate AppDomain
How to create an Application Domain and execute an assembly within?
AppDomain d = AppDomain.CreateDomain("myDomain");
// or
AppDomain d = Thread.GetDomain()
d.ExecuteAssembly("myAssembly.exe") ;
// or
d.ExecuteByAssemblyName("myAssembly");
How to unload Application Domains?
AppDomain d = AppDomain.CreateDomain("das");
AppDomain.Unload(d);
What is defense-in-depth when speaking of Application Domains?
Launching assemblies with limited Privileges. Important when calling external code as it can contain malicous code
How to control the permissions assigned to an assembly in an application?
object[] hostEvidence = {New Zone(SecurityZone.Internet)};
Evidence internetEvidence = new Evidence(hostEvidence, null);
AppDomain myDomain = AppDomain.Create("mDomain");
myDomain.ExecuteAssembly("Assembly.exe", internetEvidence);
How to provide Host Evidence for an entire Application Domain?
object[] hostEvidence = {new SecurityZone.Internet)};
Evidence appDomainEvidence = new Evidence(hostEvidence, null);
AppDomain d = AppDomain.CreateDomain("mySecureDomain", appDomainEvidence);
d.ExecuteAssembly("Assembly.exe)";
What is the AppDomainSetup class?
A class to provide the runtime with configuration information of a new domain. The instance of the AppDomainSetup class is passed to the AppDomain.Create() method
What is the Property
ApplicationBase of the AppDomainSetup class?
Gets or sets the name of the application root directory.
What is a service and differ from normal applications?
1. They run in the background without user interaction
2. Are started before the user logged on and run in their own security context
3. You cannot debug them, run them and attach a deubgger to the process
What to consider when installing services with an installer?
You must create installation components to install and register with the Windows Services Control Manager
What is a window station?
It is a secure object that contains a Clipboard, a set of global atoms and a group of desktop objects.
How to implement a service in Visual Studio? only required methods
1. Assign the ServiceBase.ServiceName which is unique for each service
2. Add code to the OnStart Method, this method must return to the operating system. so no loops or lasting tasks
3. Add code to the OnStop method
What are the optional methods in a Service?
OnPause - When the service is paused
OnContinue - When the service is continued
OnShutdown - When the computer is shutdown
If you use these methods set ServiceBase.CanShutdown and ServiceBase.CanPauseAndContinue
What are the two Installer classes for a Service?
ServiceInstaller - which is used to define the service description
ServiceProcessInstaller - to define the user account settings
What are the security contexts for the ServiceProcessInstaller?
LocalService - acts as nonprivileged user and presents anonymous credentials, use to minimize security risks
NetworkService - enables to authenticate to another computer, not required for anonymous connections
LocalSystem - unlimited privileges and presents the computers credentials to any remote server, sever security risk
User (default) - causes the system to prompt for User/Pass if not set in ServiceProcessInstaller
How to install a Service manually?
InstallUtil.exe /u myService.exe
How to build a Setup project for a service?
1. Add Project output the service and select Primary output
2. Choose custom actions and select Primary Output From and the service. It is installed to all four nodes, Install, Commit, RollBack, Unistall
If a service startup is set to automatic, when does it start?
After reboot
How to controllservices from an assembly?
System.ServiceProcess.ServiceController
and use Stop() etc.