Interview Questions

Asp.Net Back

Can you have two files with the same file name in GAC?

Ans:  GAC is a very special folder, and while normally you would not be able to place two files with the same name into a Windows folder, GAC differentiates by version number as well, so it's possible for MyApp.dll and MyApp.dll to co-exist in GAC if the first one is version 1.0.0.0 and the second one is 1.1.0.0.

Where's global assembly cache located on the system?

Ans:  Usually C:\winnt\assembly or C:\windows\assembly.

How can you create a strong name for a .NET assembly?

Ans:  With the help of Strong Name tool (sn.exe).

Where are shared assemblies stored?

Ans:  Global Assembly Cache.

How can you debug failed assembly binds?

Ans:  Use the Assembly Binding Log Viewer (fuslogvw.exe) to find out the paths searched.

How can you tell the application to look for assemblies at the locations other than its own install?

Ans:  Use the directive in the XML .config file for a given application. should do the trick. Or you can add additional search paths in the Properties box of the deployed application.

What's a strong name?

Ans:  A strong name includes the name of the assembly, version number, culture identity, and a public key token.

What's the difference between private and shared assembly?

Ans:  Private assembly is used inside an application only and does not have to be identified by a strong name. Shared assembly can be used by multiple applications and has to have a strong name.

What do you know about .NET assemblies?

Ans:  Assemblies are the smallest units of versioning and deployment in the .NET application. Assemblies are also the building blocks for programs such as Web services, Windows services, serviced components, and .NET remoting applications.

How do you check whether the row data has been changed?

Ans:  The definitive way to determine whether a row has been dirtied is to handle the changed event for the controls in a row. For example, if your grid row contains a TextBox control, you can respond to the control's TextChanged event. Similarly, for check boxes, you can respond to a CheckedChanged event. In the handler for these events, you maintain a list of the rows to be updated.