Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Though it is not running inside the CLR, the unmanaged code will work properly if all the
other parameters are correctly followed.
There are two types of State management, Client Side, and Server side.
Client Side – Storing the information in the Page or Client’s System. They are reusable,
simple objects.
Server Side – Storing the information on the Server. It is easier to maintain the information
on the Server rather than depending on the client for preserving the state.
Q12) What is an Assembly? What are the different types of Assemblies?
Ans: An Assembly is a collection of logical units. Logical units refer to the types and
resources which are required to build an application and deploy them using the .Net
framework. The CLR uses this information for type implementations. Basically, Assembly is
a collection of Exe and Dlls. It is portable and executable.
There are two types of Assemblies, Private and Shared.
Private Assembly, as the name itself suggests, it is accessible only to the application. It is
installed in the installation directory of the Application.
A Shared assembly can be shared by multiple applications. It is installed in the GAC.
Q13) Explain the different parts of an Assembly.
Ans: The different parts of an Assembly are:
Manifest – It contains the information about the version of an assembly. It is also
called as assembly metadata.
Type Metadata – Binary information of the program.
MSIL – Microsoft Intermediate Language code.
Resources – List of related files.
Q14) What is an EXE and a DLL?
Ans: Exe and DLLs are Assembly executable modules.
Exe is an executable file. This runs the application for which it is designed. An Exe is
generated when we build an application. Hence the assemblies are loaded directly when we
run an Exe. However, an Exe cannot be shared with the other applications.
DLL stands for Dynamic Link Library. It is a library that consists of code which needs be
hidden. The code is encapsulated inside this library. An Application can consist of many
DLLs. These can be shared with the other applications as well.
Other applications which need to share this DLL need not worry about the code intricacies
as long as it is able to call the function on this DLL.
The different components of CAS are Code group, Permissions, and Evidence.
Evidence– To decide what permissions to give, the CAS and CLR depend on the specified
evidence by the assembly. The examination of the assembly provides details about the
different pieces of evidence. Some common evidence include Zone, URL, Site, Hash Value,
Publisher and Application directory.
Code Group – Depending on the evidence, codes are put into different groups. Each group
has specific conditions attached to it. Any assembly that matches those condition is put into
that group.
Permissions – Each code group can perform only specific actions. They are called
Permissions. When CLR loads an assembly, it matches them to one of the code groups and
identifies what actions those assemblies can do. Some of the Permissions include Full
Trust, Everything, Nothing, Execution, Skip Verification, and the Internet.
Q19) What is GAC?
Ans: GAC stands for Global Assembly Cache. Whenever CLR gets installed on the
machine, GAC comes as a part of it. GAC specifically stores those assemblies which will be
shared by many applications. A Developer tool called Gacutil.exe is used to add any file to
GAC.
Q20) What is meant by Globalization and Localization?
Ans: Internationalization is the process of designing applications that support multiple
languages. This is divided into Localization and Globalization.
Globalization is nothing but developing applications to support different languages. Existing
applications can also be converted to support multiple cultures.
Whereas Localization means changing the already globalized app to cater to a specific
culture or language Microsoft.Extensions.Localization is used for localizing the app content.
Some of the other keywords that are used for Localization are IHtmlLocalizer,
IStringLocalizer, IViewLocalizer and so on
During the Garbage collection process, as the first phase, list of live objects are identified. In
the second phase, references are updated for those objects which will be compacted. And
in the last phase, the space occupied by dead objects are reclaimed. The remaining objects
are moved to an older segment.