1. What is garbage collector ?
- It searches for managed objects(native .net objects) that are referenced in managed code.
- It then attempts to finalize those objects that are not referenced in the code.
- Lastly, it frees the unreferenced objects and reclaims the memory occupied by them.
2. Which memory it will deallocate while garbage collecting?
Memory occupied by the objects which are unreferenced in the code.
3. What is the difference between namespace and assembly ?
An Assembly can contain many namespaces and it is self describing.
A namespace is used for logical separation of classes that have same name. Suppose You create a class for a calculator and call it Calc. At the same time your friend also creates a class called Calc. How will you differentiate the two classes which have same name but completely different code. Here is where namespaces come in.
You can put your class inside the namespace PKSDotNet and call your calc Class like this.
PKSDotNet.Calc _CalcFuncts = new PKSDotNet.Calc();
YourFriend.Calc _Calc = new YourFriend.Calc();
4. What are the types of assemblies ?
5. What is strong name ?
A strong name consists of the assembly's identity—its simple text name, version number, and culture information (if provided)—plus a public key and a digital signature.
6. Where is the version information stored in an assembly ?
Manifest
7. What are the session management techniques available ?
http://dotnetnotepad.blogspot.com/2010/11/exploring-session-in-aspnet.html
8. What is the need for storing session data in state server or sql server ?
InProc is very fast session storing mechanism but suitable for small web applications. InProc Session Data will get lost if we Restart the server, application domain recycles. It is also not suitable for Web Farm and Web Garden Scenarios. Due to this drawbacks in InProc mode, storing session data in state server or sql-server comes into picture.
9. If I open a page in Tab in the browser and I opened the same page in the next tab,
if changed something in the first tab and submitted, how i can get the latest data in
the next tab also (without refreshing the page) ? (which property you will use)
10. What are the AJAX controls you have used ?
A. Update panal and update progress.
Q. What is content template in update panale ? what if i placed controls outside the content template ?
The <asp:UpdatePanel> tag has two childtags - the ContentTemplate and the Triggers tags.
The ContentTemplate tag holds the content of the panel. The content can be anything that you would normally put on your page, from literal text to web controls.
If I place controls outside the content template tag, it will give you compile error and application cannot be run.
http://ajax.net-tutorials.com/controls/updatepanel-control/
Q. When you use triggers in update panal ?
If you want to update content on Update Panel, define a Triggers in Update Panel..
11. What is scriptManager ?
The ScriptManager makes sure that the required ASP.NET AJAX files are included and that AJAX support is added, and has to be included on every page where you wish to use AJAX functionality.
12. What is scriptManageProxy ? When it is used?
ScriptManagerProxy enables nested components such as content pages and user controls to add script and service references to pages when a ScriptManager control is already defined in a parent element.
If you have a page that requires you to register a web service or a .js file that is only needed on a few pages in your application then you would use the ScriptManagerProxy to register those items specifically for those pages.
If you added those items to the
13. What if i have a master page and a script manager on master and i did not add a scriptManagerProxy
in child page, will it compile ?
It will compile without giving error...If script manager on child page and there is no script manager on Master page, still it will compile without any error.
14. By default Validation controls fire on client side or server side ?
There is a property for every validation control. That is EnableClientScript. This is set to True by default. So, validation is done at client side by default. If browser's javascipt is disabled, then it is automatically done the validation on server side.
reference: msdn :
What makes these validation server controls effective is that when an ASP.NET page containing these controls is requested, it is the ASP.NET engine that decides whether to perform the validation on the client or on the server depending on the browser that is making the request. Therefore, your page's functionality changes depending on the requesting browser—thus enabling you to make your Web pages the best they can possibly be—rather than dummying-down your Web applications for the lowest common denominator.
15. What is the difference between user control and custom control ?
http://dotnetnotepad.blogspot.com/2010/11/sql-star-telphonic.html
16. Can you implement cacheing in user control and custom control ?
17. How can you expire a cache when the data is changed and get the new data ?
http://dotnetnotepad.blogspot.com/2010/12/value-labs-all-rounds.html
18. Is there any mechanism for storing cache data somewhere like you do in case of session where
there are option to store session data in state server or sql server ?
A. I think in 4.0 there is an option to store cache data whereever you want
Q. That feature is not in 3.5 ?
Q. How will you do that ?
19. what is the binding you have used in your service ?
A. WSHttpBinding
Q. Why is that ?
A. It will provide security and it will support http protocol.
20. How many endpoint you can have ?
A. N number of endpoints.
Q. Minimum how many should be there?
A. 1.
21. What is contract in endpoint ?
A. You have to mention service type (i.e. interface name)
Q. What if i give a class name there ?
A. Yes, whatever either class or interface whichever having servicecontract attribute applied on it.
22. What is mex endpoint ?
A. To expose service metadata.
Q. Means if i did not provide the mex endpoit client cannot create proxy ?
A. No, even mex endpoint is there or not there, you can create a proxy.
Q. Then why is that mex endpoint used for?
A. Client can see the metadata in the browser by giving ?wsdl .
23. What is data contract ?
24. What is message contract ?
25. When you use a message contract?
26. How will you handle exceptions in wcf ?
A. Using faultexception class.
Q. How will you do that write down on a paper.
A. [Faultcontract(typeof(class))]
Q. Ok, what if i did not give typeof(class) there ?
A. The client may not know the type of object which is coming to , when an exception is thrown.
Q. What if that class is not a datacontract ?
A. That will not be serialized.
Q. So, will it throw an exception ?
A. I think ,... yes.
Q. What type of exception is it compile time or run time?
A. Compile time.
27. What are the instanceContextModes available ?
A. PerCall, PerSession,
Q. What is default instanceContextMode ?
A. PerCall
Q. What will percall instanceContextMode do ?
A. Creates a differenct instance of servie implementation class with each request.
28. Can we enable sessions in WCF ?
A. Yes.
Q. How what all properties you need to set ?
29. Coming to Sql, what are indexes?
30. Can we have two clustered indexes on a table ?
31. Performancewise what will happen if i use more number of indexes, will it improve performance or decrease ?
Decrease the performance..
32. What are triggers ?
33. Can we use select statement in a trigger ?
Yes..you can..but it needs special handling..
source: msdn
When a trigger fires, results are returned to the calling application, just as with stored procedures. To eliminate having results returned to an application due to a trigger firing, do not include either SELECT statements that return results, or statements that perform variable assignment in a trigger. A trigger that includes either SELECT statements that return results to the user or statements that perform variable assignment requires special handling; these returned results would have to be written into every application in which modifications to the trigger table are allowed. If variable assignment must occur in a trigger, use a SET NOCOUNT statement at the beginning of the trigger to eliminate the return of any result sets.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.