The caspol tool grants and modifies permissions to code groups at the user policy, machine policy, and enterprise policy levels.
Best collection of Interview Questions for Interview preparation - OOPS Questions, jQuery Questions, SharePoint Questions, C# Questions, MVC Questions etc
Wednesday, 6 April 2016
What is the caspol.exe tool used for?
What is GAC? What are the steps to create an assembly and add it to the GAC?
The global assembly cache (GAC) is a machine-wide code cache that stores assemblies specifically
designated to be shared by several applications on the computer. You should share assemblies by
installing them into the global assembly cache only when you need to.
Steps
designated to be shared by several applications on the computer. You should share assemblies by
installing them into the global assembly cache only when you need to.
Steps
- Create a strong name using sn.exe tool eg: sn -k mykey.snk
- in AssemblyInfo.cs, add the strong name eg: [assembly: AssemblyKeyFile("mykey.snk")]
- recompile project, and then install it to GAC in two ways :
- drag & drop it to assembly folder (C:\WINDOWS\assembly OR C:\WINNT\assembly) (shfusion.dll tool)
- gacutil -i abc.dll
What is a strong name?
You need to assign a strong name to an assembly to place it in the GAC and make it globally accessible. A strong name consists of a name that consists of an assembly's identity (text name, version number, and culture information), a public key and a digital signature generated over the assembly. The .NET Framework provides a tool called the Strong Name Tool (Sn.exe), which allows verification and key pair and signature generation.
To create a strong-name key file-
- Start Visual Studio Command Prompt.
- At the command prompt, navigate to the location where you want to create the key file.
- At the command prompt, type sn -k <key file name>.snk, and then press ENTER.
- At the command prompt, type exit, and then press ENTER.
What are the contents of assembly?
A static assembly can consist of four elements:
- Assembly manifest - Contains the assembly metadata. An assembly manifest contains the information about the identity and version of the assembly. It also contains the information required to resolve references to types and resources.
- Type metadata - Binary information that describes a program.
- Microsoft intermediate language (MSIL) code.
- A set of resources.
What is an assembly?
An assembly is a collection of one or more .exe or dll’s. An assembly is the fundamental unit for
application development and deployment in the .NET Framework. An assembly contains a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the CLR with the information it needs to be aware of type implementations.
application development and deployment in the .NET Framework. An assembly contains a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the CLR with the information it needs to be aware of type implementations.
Explain CLR, CTS and CLS
CLR:
The .NET Framework provides a runtime environment called the Common Language Runtime or CLR. The CLR can be compared to the Java Virtual Machine or JVM in Java. CLR handles the execution of code and provides useful services for the implementation of the program. In addition to executing code, CLR provides services such as memory management, thread management, security management, code verification, compilation, and other system services. It enforces rules that in turn provide a robust and secure execution environment for .NET applications.
CTS:
Common Type System (CTS) describes the datatypes that can be used by managed code. CTS defines
how these types are declared, used and managed in the runtime. It facilitates cross-language integration, type safety, and high performance code execution. The rules defined in CTS can be used to define your own classes and values.
CLS:
Common Language Specification (CLS) defines the rules and standards to which languages must adhere to in order to be compatible with other .NET languages. This enables C# developers to inherit from classes defined in VB.NET or other .NET compatible languages.
The .NET Framework provides a runtime environment called the Common Language Runtime or CLR. The CLR can be compared to the Java Virtual Machine or JVM in Java. CLR handles the execution of code and provides useful services for the implementation of the program. In addition to executing code, CLR provides services such as memory management, thread management, security management, code verification, compilation, and other system services. It enforces rules that in turn provide a robust and secure execution environment for .NET applications.
CTS:
Common Type System (CTS) describes the datatypes that can be used by managed code. CTS defines
how these types are declared, used and managed in the runtime. It facilitates cross-language integration, type safety, and high performance code execution. The rules defined in CTS can be used to define your own classes and values.
CLS:
Common Language Specification (CLS) defines the rules and standards to which languages must adhere to in order to be compatible with other .NET languages. This enables C# developers to inherit from classes defined in VB.NET or other .NET compatible languages.
What is CLS?
Common Language Specification (CLS) defines the rules and standards to which languages must adhere to in order to be compatible with other .NET languages. This enables C# developers to inherit from classes defined in VB.NET or other .NET compatible languages.
What is CTS?
Common Type System (CTS) describes the datatypes that can be used by managed code. CTS defines how these types are declared, used and managed in the runtime. It facilitates cross-language integration, type safety, and high performance code execution. The rules defined in CTS can be used to define your own classes and values.
What is CLR?
The .NET Framework provides a runtime environment called the Common Language Runtime or CLR. The CLR can be compared to the Java Virtual Machine or JVM in Java. CLR handles the execution of code and provides useful services for the implementation of the program. In addition to executing code, CLR provides services such as memory management, thread management, security management, code verification, compilation, and other system services. It enforces rules that in turn provide a robust and secure execution environment for .NET applications.
What is a base class and derived class?
A class is a template for creating an object. The class from which other classes derive fundamental
functionality is called a base class.
The class which derives functionality from a base class is called a derived class.
For e.g.
functionality is called a base class.
The class which derives functionality from a base class is called a derived class.
For e.g.
public class X { private int a, b; public X() // constructor { a = 0; b = 0; } public int A { get { return a; } set { a = value; } } public int B { get { return b; } set { b = value; } } }
In above example Class Y derives from Class X, then Class X is a base class and Class Y is the derived class.public class Y : X { private System.Drawing.Color screenColor; public Y() // constructor { screenColor = System.Drawing.Color.Red; } public System.Drawing.Color ScreenColor { get { return screenColor; } set { screenColor = value; } } }
Tuesday, 9 December 2014
Facts about Static
1. Static class can not be instantiated.
2. Static class can not contain any constructor, whether we can create without error but it does not have mean.
3. Static class method and properties etc called by class name.
4. Static constructor can't be parameterized. Access modifiers can not be applied on Static constructor.
5. Default constructor can be used To assign value in any static variable.
6. Static Constructors can not have access modifier and parameter
7. const(constant) type can not be created as static, error will come.
2. Static class can not contain any constructor, whether we can create without error but it does not have mean.
3. Static class method and properties etc called by class name.
4. Static constructor can't be parameterized. Access modifiers can not be applied on Static constructor.
5. Default constructor can be used To assign value in any static variable.
6. Static Constructors can not have access modifier and parameter
7. const(constant) type can not be created as static, error will come.
Subscribe to:
Posts (Atom)
Featured post
What is SharePoint?
Microsoft SharePoint is an extensible platform that provides a range of products that can help organizations with solution for a variety...
-
In Central Administration, open Service management (“ Manage Services on server ”) Check if “User Profile Synchronization Service” i...
-
The following list contains basic features and properties of extension methods : It is a static method. It must be located in a sta...