Monday, November 05, 2012

i18N concepts

  • What is the difference between Unicode and UTF-16?
  • What is the significance of UTF-8? When to use it?
  • If Chinese characters are represented as 2 or 3 bytes, how will you find out the length of a string in Chinese? For e.g. for validating the length of a field on a form.
  • When do we need to use Base64 encoding?
  • If I need to make an application i18n enabled, besides label/message strings, what are the other areas (data-points) I need to take care of?
  • Can you open an unicode file (containing CJK chars) in notepad? If not, then why? What editors support unicode on your desktop?

Security concepts

  • What is the difference between pseudo-random numbers and real random numbers? PRNG and TRNG...
  • Is it even possible to create a true random number?
  • Why are random numbers important in cryptography?
  • What is the difference between hashing and encryption?
  • When would you use symmetric vs asymmetric encryption?
  • Does SSL / HTTPS use symmetric key or asymmetric key? What is session key?
  • What do you mean by 128-bit encryption? Is it the size of the symmetric key or asymmetric key?
  • What is the difference between digital signature and digital certificate?
  • What does a digital certificate contain? Also please explain how this all relates to the "Chain of Responsibility" design pattern?
  • What's the difference between a GUID generator and a random number generator?
  • When you install a digital certificate on the server, where is the private key stored?
  • What digital certs are installed on your brower? Who installs them and why are they required?
 Sample scenarios: What to do? Whose public / private key to use?
  • You want to send a encrypted message to a person
  • You want to digitally sign a document/message

Monday, December 05, 2005

- What's the difference btw a DataReader and a DataSet?
- When would U use a DataReader instead of a DataSet ?
- How is a DataSet populated ? Is a DataReader used behind the scenes ?
- How is a database Cursor linked to a DataReader ?

Wednesday, October 19, 2005

Can a single ASP.NET application have 2 different authentication modes specified in 2 different web.config files?

If Cookies is disabled, then can Forms authentication work?
How do I create a multilanguage, multifile assembly?
Why cannot you specify the accessibility modifier for methods inside the interface?

Friday, October 07, 2005

How are the activation URLs different in case of SAO and CAO in .NET remoting?
When will U use a XMLDataDocument and when will U use a XPathDocument? What's the differences btw the two?

When will U use a XMLReader class? What's the difference btw 'pull' model and 'SAX event-driven' push model of XML parsing?

Monday, October 03, 2005

What are 'Principles' and 'Identities' in .NET ?

How can these be used for authentication and authorization?
How would U create a user-control?
What basic steps are required to create a custom webcontrol?
In web applications what's the difference btw authentication and authorization?

What are the different ways of authentication in ASP.NET ?

Scenario: At runtime, whenever the user requests a change in some settings, I update the web.config file dynamically at runtime to store the config values. But I notice that my session state gets lost. Why does this occur?

U want to control anonymous user's access to resources on the server. How would U do it? (Hint: Which user account would U modify? )
How would U add a client side script for a web-control in ASP.NET ?

Can U raise a post-back event for a custom control?...Say U have a link and U want a post-back event to be raised when the link is clicked.

What's the difference btw a 'HyperLink' and a 'LinkButton' ?
What is the 'Item' property in C#. How does one access the Item property in C#.NET ?
What's the difference between 'const' and 'static readonly' in C#.NET ?

How would U mark a method as obsolete in C#.NET. Say U want a compiler error to be generated whenever someone uses a obsolete version of you API....Can this be done?

Friday, September 23, 2005

What's the difference btw the following methods in .NET remoting?

RegisterWellknownServiceType()
RegisterWellknownClientType()
RegisterActivatedServiceType()
RegisterActivatedClientType()

Tuesday, September 20, 2005

Visual Studio Questions:
---------------------------
1) Can U debug JavaScript or VBScript code using VS ?
2) When I debug a ASP.NET application, IE opens by default. How can I change the browser?
3) Can U debug ASP.NET applications remotely? i.e. Ur application is running on a different server and U have VS.NET on Ur m/c ?
4) How would U do "Production Debugging" in ASP.NET?

Thursday, July 14, 2005

Can U debug (generate debug information/symbols) in Release mode?
Is the size of a .NET dll/assembly same in Debug and Release mode?
While debugging, I see the VS.NET pointer skipping some lines.Why ?

Tuesday, July 12, 2005

What is thread-pool starvation in ASP.NET and when does it occur?

Monday, July 11, 2005

.NET Remoting Questions Contd.

What is a sink? What are message sinks, channel sinks, transport sinks?

Can I use SoapSuds.exe to access a Webservice?

How can I control the lifetime of SAO Single-Call objects?

Can a SAO have a non-default parameter constructor? Why?

When would U override the InitializeLifetimeService() method?

How can a client increase the lease time of a remote object?

Why does a Sponsor class need to extend MarshalByRef? Who controls the life-time of the sponsor?

.NET Remoting Questions

In .NET webservices, we can create a proxy class by either adding a web-reference in VS.NET or using the WSDL.exe tool from the command prompt. Who creates the proxy classes in .NET remoting?

What are well-known types in .NET remoting?

We have 2 methods of Activator -- GetObject() {Used for Server-activated objects}
and CreateInstance() { Used for client activated objects }
When do we use the 'new' operator ?

What are the advantages/disadvantages of using programmatic configuration of remoting data Vs config files?

When do we need to override the InitializeLifetimeService() method?

How are Life-times managed in a .NET remoting distibuted environment?

When would U use the SoapSuds.exe utility?

What's the difference between the Soapsuds.exe and Wsdl.exe tools? (Both of them are used to generate proxies for web-services)

Is it possible to have a binary formatter for a HTTP channel?

Can I use SoapSuds.exe for a Tcp channel? For a CAO?

What network calls happen when Activator.GetObject() is called for a SAO?

Can I pass parameters to the constructor of a CAO?

Saturday, July 09, 2005

In COM interop, what's the difference between "tlbexp" and "regasm" tools?

Friday, July 08, 2005

How would U maintain data-concurrency in ADO.NET?
Please explain the common techniques.
What are the different transaction isolation levels and when to use what?
What does the isolation level 'Any' mean?

Thursday, June 30, 2005

What's the advantage of using strongly typed datasets in ADO.NET?

Monday, June 27, 2005

A circular project dependency occurs when two or more projects depend on each other. For example: FileOne in ProjectA depends on FileTwo in ProjectB, and FileThree in ProjectB depends on FileFour back in ProjectA.

How will U solve such dependencies in VS.NET ?

Wednesday, June 22, 2005

Suppose U have a file that needs to be shared between a .NET application and a non-.NET application for writing/reading. How will U do it ?

Thursday, June 16, 2005

Webservice questions:
  • What's the difference btw a *.WSDL file and a *.DISCO file?
  • Diff btw *.vsdisco and *.disco file?
  • How does dynamic discovery (in case of *.vsdisco) work? What goes on behind the scenes?

Wednesday, June 15, 2005

How do U change the account under which asp.net runs? In IIS5 and IIS6?
What do the special accounts "machine" and "system" mean?
What are the differences between Response.Redirect(), Server.Transfer() and Server.Execute() ?

Tuesday, June 14, 2005

U need to insert a binary value in a registry key. What object type would U use to insert the data?
What is a channel sink in .NET remoting?
Explain how would U create a chain of channel sinks and how they are useful?
Can I use a binary formatter with a HTTP channel in .NET remoting?

Monday, June 13, 2005

Have U ever used thread-pooling in .NET? What classes did U use?
What is a race condition? How is it different from a dead-lock?
How can U use delegates for asynchronous programming?
Ever heard of 'AsyncCallBack'?
What's the difference btw 'out' and 'ref' parameters?

Why does .NET have both 'out' and 'ref' parameters?
(Hint: I have observed that after compilation, the IL assembly code of both 'out' and 'ref' is same)
Can I declare a delegate outside of a class? i.e. public delegate void myDelegate()
Can I declare a event outside of a class? i.e. public event myDelegate myEvent;
If not then WHY?

Is is necessary that a event delegate should take the 'source' and 'EventArgs' parameters?

Have U ever heard of the 'EventHandler' delegate? Where have U seen it being used?

Wednesday, June 08, 2005

What is obfuscation and how does it work?
How to Decompilers work ?

Tuesday, June 07, 2005

  • How would U debug a service? Will F5 work?
  • How would U debug the OnStart() method of a service?
Can U create a custom event log? (besides the "Application", "Security" and "System")
I need to create a public/private key pair. What .NET SDK tool can I use?
  • Can 2 services share a same process?
  • In the OnStart() method of a service, I try to make a database connection that takes around 40 sec. What will happen?
  • How is the Pause() method different from a Stop() method in a service?
  • A service is handling some Performance counters, EventLogs etc. Is it possible to add a new Perf counter without recompiling the service application?

Monday, June 06, 2005

How is the DLL Hell problem solved in .NET?
Can you change the value of a variable while debugging a C# application?
U develop an application that supports various languages using globalization. How will U compare or sort strings?. Will the == or equals() method suffice?
By default, ASP.NET configuration files that are located in subdirectories override and extend configuration settings that are declared in parent configuration files. In application hosting scenarios, you might want to lock some settings of an ASP.NET application to prevent modification at lower levels. How will U do so?

Thursday, June 02, 2005

What are events and delegates?
How are events different from delegates? (I typically use the "+" operator to assign a delegate to a event)
What are weak references? What are their advantages?
  • How does GC work in .NET?
  • Since objects are automatically memory-managed, can a .NET application ever go "out of memory" ??
  • Are there resources that cannot be garbage collected? Why do we have a Dispose() method?
  • What's the difference between Finalize() and Dispose() method? When to use what?
  • What are generations in GC? What's the advantage of having generations?
  • How does GC work in a distributed environment such as "Remoting"?
  • When do we use the "SuppressFinalize()" method?

Important Notice - to all wannabe geeks..

Over the last couple of years, I have been taking interviews for .NET and I realise that the percentage of developers who have their fundamentals strong is so less !!!
In this blog, I am going to post dotnet interview questions.

These questions will not have their answers. This is on purpose !!!!

I do not want someone to just read the answers and mug-up for an interview...A true geek should take the pain to find out the answers and understand the underlying concepts.
It is possible that some of the answers may be found at my other blog:
http://NarenCoolGeek.blogspot.com/

Note: Some questions would be very simple, some complex and confusing...Enjoy !!!