Thursday, 20 December 2012

asp.net Interview questions for Web application developers





Interview questions for Web application Developers

  1. What is the maximum length of a varchar field in SQL Server?
  2. How do you define an integer in SQL Server?
  3. How do you separate business logic while creating an ASP.NET application?
  4. If there is a calendar control to be included in each page of your application, and we do not
    intend to use the Microsoft-provided calendar control, how do you
    develop it? Do you copy and paste the code into each and very page of your
    application?
  5. How do you debug an ASP.NET application?
  6. How do you deploy an ASP.NET application?
  7. Name a few differences between .NET application and a Java application?
  8. Specify the best ways to store variables so that we can access them in various pages of ASP.NET application?
  9. What are the XML files that are important in developing an ASP.NET application?
  10. What is XSLT and what is its use?


Interview questions for ASP


Used by IBM Consulting Services, according to the site visitor.
  1. How many objects are there inASP?
  2. Which DLL file is needed tobe registered for ASP?
  3. If you want to initialize aglobal variable for an application, which is the right place to declare
    it? (like form or some other file).
  4. What is diffrence between Server.transfer and Response.redirect.
  5. Is there any inbuilt paging(for example shoping cart. which will show next 10 records without refreshing) in ASP? How will you do pating.
  6. What does Server.MapPath do?
  7. Name at least three methods
    of response object other than Redirect.
  8. Name at least two methods of
    response object other than Transfer.
  9. Tell few programming
    diffrence between ADO and DAO programming. What is state?
  10. How many types of cookies are
    there?
  11. Tell few steps for optimizing
    (for speed and resources) ASP page/application .


COM/COM+ services and components in .NET, Part- IV




COM/COM+ services and components in .NET
  1. Explain transaction
    atomicity.
    We must ensure that the
    entire transaction is either committed or rolled back.
  2. Explain consistency. We must ensure that the
    system is always left at the correct state in case of the failure or
    success of a transaction.
  3. Explain integrity. Ensure data integrity by
    protecting concurrent transactions from seeing or being adversely
    affected by each other’s partial and uncommitted results.
  4. Explain durability. Make sure that the system can
    return to its original state in case of a failure.
  5. Explain object pooling. With object pooling, COM+
    creates objects and keeps them in a pool, where they are ready to be
    used when the next client makes a request. This improves the performance
    of a server application that hosts the objects that are frequently used
    but are expensive to create.
  6. Explain JIT activation. The objective of JIT
    activation is to minimize the amount of time for which an object lives
    and consumes resources on the server. With JIT activation, the client
    can hold a reference to an object on the server for a long time, but the
    server creates the object only when the client calls a method on the
    object. After the method call is completed, the object is freed and its
    memory is reclaimed. JIT activation enables applications to scale up as
    the number of users increases.
  7. Explain role-based security. In the role-based security
    model, access to parts of an application are granted or denied based on
    the role to which the callers belong. A role defines which members of a
    Windows domain are allowed to work with what components, methods, or
    interfaces.
  8. Explain queued components. The queued components service
    enables you to create components that can execute asynchronously or in
    disconnected mode. Queued components ensure availability of a system
    even when one or more sub-systems are temporarily unavailable. Consider
    a scenario where salespeople take their laptop computers to the field
    and enter orders on the go. Because they are in disconnected mode, these
    orders can be queued up in a message queue. When salespeople connect
    back to the network, the orders can be retrieved from the message queue
    and processed by the order processing components on the server.
  9. Explain loosely coupled events.
    Loosely coupled events enable
    an object (publisher) to publish an event. Other objects (subscribers)
    can subscribe to an event. COM+ does not require publishers or
    subscribers to know about each other. Therefore, loosely coupled events
    greatly simplify the programming model for distributed applications.
  10. Define scalability. The application meets its
    requirement for efficiency even if the number of users increases.
  11. Define reliability. The application generates
    correct and consistent information all the time.
  12. Define availability. Users can depend on using the
    application when needed.
  13. Define security. The application is never
    disrupted or compromised by the efforts of malicious or ignorant users.
  14. Define manageability. Deployment and maintenance of
    the application is as efficient and painless as possible.
  15. Which namespace do the
    classes, allowing you to support COM functionality, are located?
    System.EnterpriseServices
How do you make a NET
component talk to a COM component?
To enable the communication between COM and .NET
components, the .NET Framework generates a COM Callable Wrapper (CCW).
The CCW enables communication between the calling COM code and the
managed code. It also handles conversion between the data types, as well
as other messages between the COM types and the .NET types.

ASP.NET and COM Interterview Questions For Experts , Part-III



.NET and COM Interterview Questions

  1. Describe the advantages of writing a managed code application instead of unmanaged one. What’s involved in certain piece of code being managed?
 The advantages include automatic garbage collection, memory management, support for versioning and security. These advantages are provided through .NET FCL and CLR, while with the unmanaged code similar capabilities had to be implemented through third-party libraries or as a part of the application itself.
  1. Are COM objects managed or unmanaged?
Since COM objects were written before .NET, apparently they are unmanaged.
  1. So can a COM object talk to a .NET object?
Yes, through Runtime Callable Wrapper (RCW) or PInvoke.
  1. How do you generate an RCW from a COM object?
    Use the Type Library Import utility shipped with SDK. tlbimp
    COMobject.dll /out:.NETobject.dll or reference the COM library from
    Visual Studio in your project.
  2. I can’t import the COM object that I have on my machine.
    Did you write that object? You can only import your own objects. If you need to use a COM component from another developer, you should obtain a Primary Interop Assembly (PIA) from whoever authored the original object.
  3. How do you call unmanaged methods from your .NET code through PInvoke? Supply a DllImport attribute. Declare the methods in your .NET code as static extern. Do not implement the methods as they are implemented in your unmanaged code, you’re just providing declarations for method signatures.
  4. Can you retrieve complex data types like structs from the PInvoke calls?
  5. Yes, just make sure you re-declare that struct, so that managed code knows what to do with it.
  6. I want to expose my .NET objects to COM objects. Is that possible?
 Yes, but few things should be considered first. Classes should implement interfaces explicitly.
Managed types must be public. Methods, properties, fields, and events that are exposed to COM must be public. Types must have a public default constructor with no arguments to be activated from COM. Types cannot be abstract.
  1. Can you inherit a COM class in a .NET application?
    The .NET Framework extends the COM model for reusability by adding implementation inheritance. Managed types can derive directly or indirectly from a COM coclass; more specifically, they can derive from the runtime callable wrapper generated by the runtime. The derived type
    can expose all the method and properties of the COM object as well as methods and properties implemented in managed code. The resulting object is partly implemented in managed code and partly implemented in unmanaged code.
  2. Suppose I call a COM object
    from a .NET applicaiton, but COM object throws an error. What happens on
    the .NET end?
    COM methods report errors by
    returning HRESULTs; .NET methods report them by throwing exceptions. The
    runtime handles the transition between the two. Each exception class in
    the .NET Framework maps to an HRESULT.




COM/COM+ services and components
in .NET
  1. Explain transaction
    atomicity.
    We must ensure that the
    entire transaction is either committed or rolled back.
  2. Explain consistency. We must ensure that the
    system is always left at the correct state in case of the failure or
    success of a transaction.
  3. Explain integrity. Ensure data integrity by
    protecting concurrent transactions from seeing or being adversely
    affected by each other’s partial and uncommitted results.
  4. Explain durability. Make sure that the system can
    return to its original state in case of a failure.
  5. Explain object pooling. With object pooling, COM+
    creates objects and keeps them in a pool, where they are ready to be
    used when the next client makes a request. This improves the performance
    of a server application that hosts the objects that are frequently used
    but are expensive to create.
  6. Explain JIT activation. The objective of JIT
    activation is to minimize the amount of time for which an object lives
    and consumes resources on the server. With JIT activation, the client
    can hold a reference to an object on the server for a long time, but the
    server creates the object only when the client calls a method on the
    object. After the method call is completed, the object is freed and its
    memory is reclaimed. JIT activation enables applications to scale up as
    the number of users increases.
  7. Explain role-based security. In the role-based security
    model, access to parts of an application are granted or denied based on
    the role to which the callers belong. A role defines which members of a
    Windows domain are allowed to work with what components, methods, or
    interfaces.
  8. Explain queued components. The queued components service
    enables you to create components that can execute asynchronously or in
    disconnected mode. Queued components ensure availability of a system
    even when one or more sub-systems are temporarily unavailable. Consider
    a scenario where salespeople take their laptop computers to the field
    and enter orders on the go. Because they are in disconnected mode, these
    orders can be queued up in a message queue. When salespeople connect
    back to the network, the orders can be retrieved from the message queue
    and processed by the order processing components on the server.
  9. Explain loosely coupled events.
    Loosely coupled events enable
    an object (publisher) to publish an event. Other objects (subscribers)
    can subscribe to an event. COM+ does not require publishers or
    subscribers to know about each other. Therefore, loosely coupled events
    greatly simplify the programming model for distributed applications.
  10. Define scalability. The application meets its
    requirement for efficiency even if the number of users increases.
  11. Define reliability. The application generates
    correct and consistent information all the time.
  12. Define availability. Users can depend on using the
    application when needed.
  13. Define security. The application is never
    disrupted or compromised by the efforts of malicious or ignorant users.
  14. Define manageability. Deployment and maintenance of
    the application is as efficient and painless as possible.
  15. Which namespace do the
    classes, allowing you to support COM functionality, are located?
    System.EnterpriseServices
  16. How do you make a NET
    component talk to a COM component?
    To enable the communication between COM and .NET
    components, the .NET Framework generates a COM Callable Wrapper (CCW).
    The CCW enables communication between the calling COM code and the
    managed code. It also handles conversion between the data types, as well
    as other messages between the COM types and the .NET types.