- This provides One Way Communication between Client and Server.
- In Client System(where service is consumed), MSMQ component is installed and similarly MSMQ component is installed Server system(where service is hosted).
- As this is a One Way Communication, [Operation Contract] method should not have any return type and provide attribute IsOneWay = True
- In Real Time, this MSMQ channel is used for writing some exceptions into event files where response of the service is not needed for a request.
- MSMQ provides Offline Communication. Means even though service is down for a while, messages taken by client will not be lost instead it stored the message in Queue.
- When Service is not available, giving request to service from client will not throw any exception in MSMQ. If it is HTTP, it will throw an exception.
Monday, March 28, 2011
MSMQ
MSMQ - Microsoft Message Queuing
Friday, March 25, 2011
Valuemomentum ( A CMMi Level 3 )
Telephonic:
=========================================================================
1) When do we use static class?
2) What is single ton? How do you write this..Tell me code?
3) What is framwork difference between 2.0 and 3.5?
4) What is ajax.net?
5) I have hundred records..How do you insert those into database at a time?
http://dotnetnotepad.blogspot.com/2011/04/multiple-record-insertion-and-updation.html
5a) What is concurrency? How do you handle it?
6) What is advantage of stored procedure?
7) What is difference between union and union all?
8) What is webservice? How it is better than WCF?
9) Where do we configure security in WCF?
10) What are ado.net objects?
11) Do you know design pattern?
12) Asked something about base class library.
13) What is serialization?
=========================================================================
F to F Round
1) You finished your graduation in so and so year. What were you doing before switching to Software?
2) Why sudden change from Electrical field to Software field?
3) Person who had a telecon with you given your .net 3.5 knowledge rating as not up to the mark. Why?
4) What is difference between .Net 3.5 and .Net 2.0?
5) What is extension method?
6) What is Linq method?
7) What is 'new' keyword?
8) How do you write event log?
http://www.codeproject.com/KB/trace/writing_to_system_event.aspx?PageFlow=Fluid
9) What is static class?
10) Do you know design patterns?
11) What is singleton pattern?
12) What is the difference between singleton and static class?
13) What is difference between interface and abstract class?
14) What is difference between product application and service based application?
15) Which one you think good?
16) What is difference between Joins and (he added some other word here)
17) Suppose I want to restrict data to be sent to browser. How do you do that?
18) Do you know silverlight and WPF?
19) What have you done in database?
20) Can you write a delegate inside an Interface?
21) Can I write property inside an Interface?
22) What an Interface should not contain?
=========================================================================
1) When do we use static class?
2) What is single ton? How do you write this..Tell me code?
3) What is framwork difference between 2.0 and 3.5?
4) What is ajax.net?
5) I have hundred records..How do you insert those into database at a time?
http://dotnetnotepad.blogspot.com/2011/04/multiple-record-insertion-and-updation.html
5a) What is concurrency? How do you handle it?
6) What is advantage of stored procedure?
Precompiled execution. SQL Server compiles each stored procedure once and then reutilizes the execution plan. This results in tremendous performance boosts when stored procedures are called repeatedly.
Reduced client/server traffic. If network bandwidth is a concern in your environment, you'll be happy to learn that stored procedures can reduce long SQL queries to a single line that is transmitted over the wire.
Efficient reuse of code and programming abstraction. Stored procedures can be used by multiple users and client programs. If you utilize them in a planned manner, you'll find the development cycle takes less time.
Enhanced security controls. You can grant users permission to execute a stored procedure independently of underlying table permissions.
8) What is webservice? How it is better than WCF?
9) Where do we configure security in WCF?
10) What are ado.net objects?
11) Do you know design pattern?
12) Asked something about base class library.
13) What is serialization?
=========================================================================
F to F Round
1) You finished your graduation in so and so year. What were you doing before switching to Software?
2) Why sudden change from Electrical field to Software field?
3) Person who had a telecon with you given your .net 3.5 knowledge rating as not up to the mark. Why?
4) What is difference between .Net 3.5 and .Net 2.0?
5) What is extension method?
6) What is Linq method?
7) What is 'new' keyword?
8) How do you write event log?
http://www.codeproject.com/KB/trace/writing_to_system_event.aspx?PageFlow=Fluid
9) What is static class?
10) Do you know design patterns?
11) What is singleton pattern?
12) What is the difference between singleton and static class?
13) What is difference between interface and abstract class?
14) What is difference between product application and service based application?
15) Which one you think good?
16) What is difference between Joins and (he added some other word here)
17) Suppose I want to restrict data to be sent to browser. How do you do that?
18) Do you know silverlight and WPF?
19) What have you done in database?
20) Can you write a delegate inside an Interface?
21) Can I write property inside an Interface?
22) What an Interface should not contain?
Sunday, March 20, 2011
HCL Written Qns
1) Write a C# program such that all zeroes in the array should be at left side and all ones should be at right side.
a = { 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0 }
2) Find the 6th highest salary from Employee Table?
3) What is the functionality of the following..
5) Constructor of child class first calls ___Constructor_______________ of the parent class.
6) Interface members by default _____Public_____________ and ______abstract__________
7) a = {1,2,3,4,5,6,6,7,8,9,10}
Without comparing each cell with the other, how can you find duplicate number in the given array?
8) What is difference between web.config and global.asax?
Global.asax
The Global.asax file, also known as the ASP.NET application file, is an optional file that contains code for responding to application-level events raised by ASP.NET or by HTTP modules. The Global.asax file resides in the root directory of an ASP.NET based application. At run time, Global.asax is parsed and compiled into a dynamically generated .NET Framework class derived from the HttpApplication base class. The Global.asax file itself is configured so that any direct URL request for it is automatically rejected. External users cannot download or view the code written within it.
Web.Config
The Web.Config is an XML based file that contains configuration information for ASP.NET resources. This file contains information about how the server will handle your application. You can set options for security, permissions, tracing, etc in this file.
9) Write a query on Employee table which gives the employees who have atleast two phone numbers?
Also write a query which gives the employees who have no phone number?
a = { 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0 }
static void Main(string[] args)
{
int[] a = { 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0 };
for (int i = 0; i < a.Length - 1; ++i)
{
for (int j = 0; j < a.Length - i - 1; ++j)
{
if (a[j] > a[j + 1])
{
int Temp = 0;
Temp = a[j + 1];
a[j + 1] = a[j];
a[j] = Temp;
}
}
}
Console.Write("a = {");
for (int k = 0; k <= a.Length - 1; k++)
{
Console.Write(a[k].ToString() + " ");
}
Console.Write("}");
Console.WriteLine("\n");
}
2) Find the 6th highest salary from Employee Table?
3) What is the functionality of the following..
- inetinfo.exe
- aspnet_isapi.dll
- aspnet_wp.exe
5) Constructor of child class first calls ___Constructor_______________ of the parent class.
6) Interface members by default _____Public_____________ and ______abstract__________
7) a = {1,2,3,4,5,6,6,7,8,9,10}
Without comparing each cell with the other, how can you find duplicate number in the given array?
8) What is difference between web.config and global.asax?
Global.asax
The Global.asax file, also known as the ASP.NET application file, is an optional file that contains code for responding to application-level events raised by ASP.NET or by HTTP modules. The Global.asax file resides in the root directory of an ASP.NET based application. At run time, Global.asax is parsed and compiled into a dynamically generated .NET Framework class derived from the HttpApplication base class. The Global.asax file itself is configured so that any direct URL request for it is automatically rejected. External users cannot download or view the code written within it.
Web.Config
The Web.Config is an XML based file that contains configuration information for ASP.NET resources. This file contains information about how the server will handle your application. You can set options for security, permissions, tracing, etc in this file.
9) Write a query on Employee table which gives the employees who have atleast two phone numbers?
Also write a query which gives the employees who have no phone number?
Thursday, March 17, 2011
Ust Global Qns
1. Tell me the situations when you feel challenging in your development (specifically).
2. What is your present application (explain) ?
3. How many ways you can do session management ?
4. Do you think .net is language independent ? how
5. Did you ever get out of memory exception in your applications ?
6. How can you write you own Custom exception class ?
7. What is managed code and unmanaged code ?
8. Can you use a C++ dll in you .net code ? if yes , how ?
There are P/Invoke services in .net ( Platform Invocation Services )...They allow us to use c++ dll in .net code...
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/5df04db1-bbc8-4389-b752-802bc84148fe/
9. What is garbage collector ?
10. What if an object taken to leve2 in GC ? what will happen ?
11. do you know about boxing ?
12. Have you used delegates? what are multicast delegates ? how to create them?
13. how many constructors can you have in a class ?
14. how can you copy an object ?
15. Do you know about shallow copy and deep copy ?
16. What are the builtin interfaces you use in your daily coding?
IDisposable, IComparable, IEnumerable...
17. What is iDisposable ? or why is dispose method ? is that called by GC ?
18. Have you used using(){} block in c# ? whats the use of it ?
The using statement defines a scope at the end of which an object will be disposed.
You create an instance in a using statement to ensure that Dispose is called on the object when the using statement is exited. A using statement can be exited either when the end of the using statement is reached or if, for example, an exception is thrown and control leaves the statement block before the end of the statement.
Suppose If an exception is thrown inside using, will it still call the dispose on the Object? Yes..surely it will call Dispose even though an exception is thrown inside using.
19. You are presently working on which version of .net? A. 3.5 ;
Q. You have worked on any other versions or only on 3.5 ? A. 2.0 also;
Q. What are the differences you find in 2.0 and 3.5 ?
20. Linq uses two interfaces what are they ? ans. 1. IEnumerable
Q. what is the other one?
21. What are the methods used in linq ? he gave some scenerio - so - the methods are called extension methods.
22. what is the syntax for extension methods ?
23. Can you tell me the logic to check if a string is palindrom or not without using builtin functions ?
24. What is an abstract class?
25. I will give you a scenerio, tell me the architecture or classes required to do that. I have a customer and he has an account . he should be able to deposit money and withdraw money.
(twist ... you can have only one method for deposit and withdraw , as withdarw means deposit a negitive balance)
26. How will you find out and solve an issue in windows application?
27. Do you have any testing tools knowledge like NUnit, ?
28. You have any knowledge in design patterns ? have you used anyone ?
29. You got any chance to work for console applications ?
30. What is the coding methodology you use ? do you know azile methodology ?
Interview Duration : 1hr.
2. What is your present application (explain) ?
3. How many ways you can do session management ?
4. Do you think .net is language independent ? how
5. Did you ever get out of memory exception in your applications ?
6. How can you write you own Custom exception class ?
class MyCustomException : Exception
{
public MyCustomException(string str)
{
Console.WriteLine(str + " thrown an exception \n");
}
}
static void Main(string[] args)
{
try
{
throw new MyCustomException("Sekhar");
}
catch (Exception e)
{
Console.WriteLine(e.Message.ToString()+"\n");
}
}
7. What is managed code and unmanaged code ?
8. Can you use a C++ dll in you .net code ? if yes , how ?
There are P/Invoke services in .net ( Platform Invocation Services )...They allow us to use c++ dll in .net code...
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/5df04db1-bbc8-4389-b752-802bc84148fe/
9. What is garbage collector ?
10. What if an object taken to leve2 in GC ? what will happen ?
11. do you know about boxing ?
12. Have you used delegates? what are multicast delegates ? how to create them?
13. how many constructors can you have in a class ?
14. how can you copy an object ?
15. Do you know about shallow copy and deep copy ?
16. What are the builtin interfaces you use in your daily coding?
IDisposable, IComparable, IEnumerable...
17. What is iDisposable ? or why is dispose method ? is that called by GC ?
18. Have you used using(){} block in c# ? whats the use of it ?
The using statement defines a scope at the end of which an object will be disposed.
You create an instance in a using statement to ensure that Dispose is called on the object when the using statement is exited. A using statement can be exited either when the end of the using statement is reached or if, for example, an exception is thrown and control leaves the statement block before the end of the statement.
using(Font ObjFont = new Font("Arial",10.0f))
{
//Use the object 'ObjFont' here....
}//Compiler will call Dispose on 'ObjFont' at this end...
The object you instantiate must implement the System.IDisposable interface.
If you create an object inside using for a custom class which is not implemented IDisposable interface, then it will give you compile error saying that class must implement IDisposable interface.....
Suppose If an exception is thrown inside using, will it still call the dispose on the Object? Yes..surely it will call Dispose even though an exception is thrown inside using.
19. You are presently working on which version of .net? A. 3.5 ;
Q. You have worked on any other versions or only on 3.5 ? A. 2.0 also;
Q. What are the differences you find in 2.0 and 3.5 ?
20. Linq uses two interfaces what are they ? ans. 1. IEnumerable
Q. what is the other one?
21. What are the methods used in linq ? he gave some scenerio - so - the methods are called extension methods.
22. what is the syntax for extension methods ?
23. Can you tell me the logic to check if a string is palindrom or not without using builtin functions ?
string str = "MALAYALAM";
for (int i = 0; i < str.Length / 2; i++)
{
if(str[i]!=str[str.Length-(i+1)])
{
Console.WriteLine("Not a Palindrome");
return;
}
}
Console.WriteLine("Its a Palindrome");
//Observe..You are using String varialbe str as a Char Array...
//May be it can be used like that in .net 3.5
24. What is an abstract class?
25. I will give you a scenerio, tell me the architecture or classes required to do that. I have a customer and he has an account . he should be able to deposit money and withdraw money.
(twist ... you can have only one method for deposit and withdraw , as withdarw means deposit a negitive balance)
26. How will you find out and solve an issue in windows application?
27. Do you have any testing tools knowledge like NUnit, ?
28. You have any knowledge in design patterns ? have you used anyone ?
29. You got any chance to work for console applications ?
30. What is the coding methodology you use ? do you know azile methodology ?
Interview Duration : 1hr.
Wednesday, March 16, 2011
App Shark Qns
Telephonic - 15 min
SQL
1) Difference between UDF and SP?
2) What is concurrency?
3) How do you handle concurrency?
4) What did you do in SQL?
5) What is transaction?
6) Where/when do you commit or rollback transaction?
C#
1) What is interface?
2) There is class A and Class B and Class C. C is inherited from B, B is inherited from A. I created object for Class C. What is the order of the constructor execution?
First constructor of Class A is executed. Next, Class B constructor is executed, later Class C constructor is executed.
3) What is static variable?
4) How do you access static member?
5) What is difference between a global variable and public property?
6) What is object intializer?
7) what is generations?
8) What is garbage collector?
9) What is dispose method?
ASP.NET
1) How do you maintain state?
2) Where do you store session?
3) How do you identity a session belongs to a particular user?
4) If cookies are disabled at browser, how do you identify a session belongs to a particular user?

SQL
1) Difference between UDF and SP?
2) What is concurrency?
3) How do you handle concurrency?
4) What did you do in SQL?
5) What is transaction?
6) Where/when do you commit or rollback transaction?
C#
1) What is interface?
2) There is class A and Class B and Class C. C is inherited from B, B is inherited from A. I created object for Class C. What is the order of the constructor execution?
First constructor of Class A is executed. Next, Class B constructor is executed, later Class C constructor is executed.
namespace ClasABC
{
class Program
{
static void Main(string[] args)
{
C obj = new C();
}
}
class A
{
public A()
{
Console.WriteLine("Constructor in 'Class A' is executed");
}
}
class B : A
{
public B()
{
Console.WriteLine("Constructor in 'Class B' is executed");
}
}
class C : B
{
public C()
{
Console.WriteLine("Constructor in 'Class C' is executed");
}
}
}
OutPut:
3) What is static variable?
4) How do you access static member?
5) What is difference between a global variable and public property?
6) What is object intializer?
7) what is generations?
8) What is garbage collector?
9) What is dispose method?
ASP.NET
1) How do you maintain state?
2) Where do you store session?
3) How do you identity a session belongs to a particular user?
4) If cookies are disabled at browser, how do you identify a session belongs to a particular user?
In ASP.NET, the necessary session-to-user link may optionally be established without using cookies. Interestingly enough, you don't have to change anything in your ASP.NET application to enable cookieless sessions, except the following configuration setting in web.config file.
Note that session settings are application-wide settings. In other words, all the pages in your site will, or will not, use cookies to store session IDs.
The node can also be used to configure other aspects of the session state management, including the storage medium and the connection strings. However, as far as cookies are concerned, setting the cookieless attribute to true (default is false) is all that you have to do.
Note that session settings are application-wide settings. In other words, all the pages in your site will, or will not, use cookies to store session IDs.
Where is ASP.NET storing the session ID when cookies are not being used? In this case, the session ID is inserted in a particular position within the URL. The figure below shows a snapshot from a real-world site that uses cookieless sessions.
Figure 1. MapPoint using cookieless sessions
Imagine you request a page like http://yourserver/folder/default.aspx. As you can see from the MapPoint screenshot, the slash immediately preceding the resource name is expanded to include parentheses with the session ID stuffed inside, as below.
The session ID is embedded in the URL and there's no need to persist it anywhere. Well, not exactly.. Consider the following scenario.
DrawBack:
You visit a page and get assigned a session ID. Next, you clear the address bar of the same browser instance, go to another application and work. Then, you retype the URL of the previous application and, guess what, retrieve your session values as you get in.
If you use cookieless sessions, in your second access to the application you're assigned a different session ID and lose all of your previous state. This is a typical side effect of cookieless sessions. To understand why, let's delve deep into the implementation of cookieless sessions.
5) What is webservice?
5) What is webservice?
Tuesday, March 15, 2011
Prokarma Qns
Contributor: Ganesh
1. What is garbage collector ?
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.
Your friend can use a different namepace (YourFriend)
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 or tags on the master page ScriptManager, then those items would be downloaded on each page that derives from the master page. It would be uneccessary to have those items registered with the ScriptManager on each and every page if they are only used on select pages throughout your application.
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.
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.
Sunday, March 13, 2011
Intergraph Qns
1) You have got a good eamcet rank...Where did you do your engineering?
2) How much percentile did you get in GATE? In which year you appeared for that? Why did'nt you do PG?
3) Where did you work as a faculty? Why did you opt software profession?
4) Did you learn .net in any institute?
5) What was your designation while you were joining in the company?
6) What is the next role you are expecting?
7) When do you use interface?
8) How can you create array of objects?
His expected answer was "we cannot put objects into an array"
9) What is attribute?
http://www.codeproject.com/KB/cs/dotnetattributes.aspx
http://msdn.microsoft.com/en-us/library/aa288454(v=vs.71).aspx
10) Suppose there is page which handles many data records. You got a compliant that the page is loading very slowly. What are the steps you will take for finding the reason for slow page loading?
11) What is white box testing?
12) He wrote a function which accept 4 boolean parameters. Asked me How would I test it?
I said that for each combination of 4 parameters, I would check and also would check return type of the function..
13) He asked me how many combination do I get for 4 parameters?
4! = 4*3*2*1 = 24
14) What was your CTC at the time of joining in current company?
15) How do you achieve overloading and overriding at a time?
16) When do you use overloading?
2) How much percentile did you get in GATE? In which year you appeared for that? Why did'nt you do PG?
3) Where did you work as a faculty? Why did you opt software profession?
4) Did you learn .net in any institute?
5) What was your designation while you were joining in the company?
6) What is the next role you are expecting?
7) When do you use interface?
8) How can you create array of objects?
His expected answer was "we cannot put objects into an array"
9) What is attribute?
http://www.codeproject.com/KB/cs/dotnetattributes.aspx
http://msdn.microsoft.com/en-us/library/aa288454(v=vs.71).aspx
10) Suppose there is page which handles many data records. You got a compliant that the page is loading very slowly. What are the steps you will take for finding the reason for slow page loading?
11) What is white box testing?
12) He wrote a function which accept 4 boolean parameters. Asked me How would I test it?
I said that for each combination of 4 parameters, I would check and also would check return type of the function..
13) He asked me how many combination do I get for 4 parameters?
4! = 4*3*2*1 = 24
14) What was your CTC at the time of joining in current company?
15) How do you achieve overloading and overriding at a time?
16) When do you use overloading?
ADP Qns
1) What is your current project architecture?
2) What is the need of different layers in architecture? Why don't we maintain all layers together?
Why use n-Tier architecture?
http://www.developerfusion.com/article/3058/boosting-your-net-application-performance/2/
3) What is internal?
4) What is sealed?
5) There is usercontrol which has two dropdowns, one contains Dept Ids and the other one contains respective employees. There are two instances of this usercontrol and if I select Dept from one dropdown, the other dropdown in another instance of usercontrol must be filled. How do you achieve this?
6) What are page life cycle events?
7) What are page life cycle events when there is usercontrol on the form? Tell me the sequence of events?
8) What are the performance improvement factors do you consider while writing stored procedure?
9) When do you use interface and abstract class?
10) How many ways are there to display data on gridview?
2) What is the need of different layers in architecture? Why don't we maintain all layers together?
Why use n-Tier architecture?
- Because each layer can be located on physically different servers with only minor code changes, hence they scale out and handle more server load.
- Also, what each layer does internally is completely hidden to other layers and this makes it possible to change or update one layer without recompiling or modifying other layers.
- This is a very powerful feature of n-Tier architecture, as additional features or change to a layer can be done without redeploying the whole application. For example, by separating data access code from the business logic code, when the database servers change you only needs to change the data access code. Because business logic code stays the same, the business logic code does not need to be modified or recompiled.
http://www.developerfusion.com/article/3058/boosting-your-net-application-performance/2/
3) What is internal?
4) What is sealed?
5) There is usercontrol which has two dropdowns, one contains Dept Ids and the other one contains respective employees. There are two instances of this usercontrol and if I select Dept from one dropdown, the other dropdown in another instance of usercontrol must be filled. How do you achieve this?
6) What are page life cycle events?
7) What are page life cycle events when there is usercontrol on the form? Tell me the sequence of events?
8) What are the performance improvement factors do you consider while writing stored procedure?
9) When do you use interface and abstract class?
10) How many ways are there to display data on gridview?
Friday, March 4, 2011
TCS Qns
1)can we mention public to interface ?
Interfaces declared directly within a namespace can be declared as public or internal and, just like classes and structs, interfaces default to internal access. Interface members are always public because the purpose of an interface is to enable other types to access a class or struct. No access modifiers can be applied to interface members.
2)what is the default access modifier to class ?
Classes that are declared directly within a namespace (in other words, that are not nested within other classes) can be either public or internal. Internal is the default if no access modifier is specified.
The access level for class members, nested classes, is private by default.
The access level for class members, nested classes, is private by default.
3)what is the page life cycle ?
4)what do u mean by view state?
5)how can we dynamically change the master pages ? which stage ?
In Page_Init event write the following..
This.MasterPageFile=”~/abc.master”;
6)what is the rennder event do? why do it wtites html to browser?
7)how can we make a method in class not to override in base ?
By declaring it as sealed method..
Note: If an instance method declaration includes the
sealed
modifier, it must also include the override
modifier. Use of the sealed
modifier prevents a derived class from further overriding the method. public class AAAA
{
public virtual void XXXX()
{
Console.WriteLine("Method XXXX");
}
public virtual void ZZZZ()
{
Console.WriteLine("Method ZZZZ");
}
}
public class BBBB : AAAA
{
//This stops further overriding method XXXX()....
sealed public override void XXXX()
{
Console.WriteLine("Override Method XXXX");
}
public override void ZZZZ()
{
Console.WriteLine("Override Method ZZZZ");
}
}
public class CCCC : BBBB
{
public override void ZZZZ()
{
Console.WriteLine("Override Method ZZZZ in CCCC Class");
}
//You cannot override method XXXX() here as it is declared as Sealed
//in parent class BBBB.
}
8)can we create a instance of abstarct class?
No..
9)why dictonarybase is used with hashtable ?
10)what do u mean by worker process?
The "Process" which is responsible for processing Asp.net application request and sending back response to the client , is known as "Worker Process". All ASP.NET functionalities runs within the scope of this process."
So finally I can write it...
"Process which is responsible for all asp.net requests and response cycle is known as worker process."
So finally I can write it...
"Process which is responsible for all asp.net requests and response cycle is known as worker process."
11)what is jit, how many are there nad hoe will you set each of them in the project ?
12)how can we pass values from one page to other pages?
14)wha is the difference between dataset and datareder ?
15)how will you invoke the webconfig connection string in the application ? with syntax.
SqlConnection Con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ConnectionString);
16)waht do u mean by appdomain ?
An Application Domain is a light weight process and provides a logical and physical isolation from another .NET application.This ensures that the Applications can work independent and isolated of each other. An Application Domain is created by the Common Language Runtime (CLR) and it ensures that if one Application Domain crashes or goes down, it does not in any way effect the functioning of another Application Domain. Multiple .NET applications can be executed in one single process by loading these applications in separate Application Domains. Several threads can be executing in a single application domain at any given time and a particular thread is not confined to a single application domain. In other words, threads are free to cross application domain boundaries and a new thread is not created for each application domain. The following are the benefits of Application Domains.
Isolation of code, data and configuration information of one application from another
A failure in one application will not affect the other
17)which iis version is running now ?
IIS 7.5
IIS 7.5
18)how to install .dll in gac ? with syntax.
Gacutil -i AssemblyName.dll
19)what do u mean by wcf and what is its advantages over remoting and webservices ?
Web Services are platform and language independent, and don't care about the consuming application. But it has restrictions of the HTTP protocol. Performance-wise, they are considered slow.
WCF can be hosted under the Windows environment, but it can be utilized by clients of different languages and different platforms.
XML Web Services use SOAP, i.e., XML via HTTP.
20)what do you mean by dataview?
21)how to get only modified rows in a table ?
ds.Tables(0).GetChagnes(DatarowState.Modified)
ds.Tables(0).GetChagnes(DatarowState.Modified)
22)how to make relation in a dataset with systax?
If ds Dataset has two tables "Employees" and "Dept" and both have a common column "DeptID" then relation can be written as follows....
ds.Relations.Add("RalationName", ds.Tables["Employees"].Columns["DeptID"], ds.Tables["Dept"].Columns["DeptID"])
23)where do the view state saved ?
Http hidden fields..
Http hidden fields..
24)where is the web.config saved ?
25)how many web.config can be there in a application?
Each folder in web application can contain one web.config file. Files in the folder take the configuration settings from the web.config file which is in that particular folder. An application root directory contains one web.config file.
Each folder in web application can contain one web.config file. Files in the folder take the configuration settings from the web.config file which is in that particular folder. An application root directory contains one web.config file.
26)how many app.config files can be present for a application ?
27)how many machine.config file can be there in a application ?
28)can we have two appconfig files in machine with two applications?
29)what is are the four parts in the publickeytoken ?
<major version>.<minor version>.<build number>.<revision>
For example, version 1.5.1254.0 indicates 1 as the major version, 5 as the minor version, 1254 as the build number, and 0 as the revision number.
30)how will you pass the connection string in your application ?
31)what is the differnce between delete and truncate ?
- “Drop Table”
- The DROP command removes a table from the database. All the tables' rows, indexes and privileges will also be removed. No DML triggers will be fired. The operation cannot be rolled back.
- “Truncate Table”
- TRUNCATE removes all rows from a table. The operation cannot be rolled back and no triggers will be fired. As such, TRUCATE is faster
- Deleted records are not recorded in the transaction log.
- “Delete Table”
- All rows will be removed. After performing a DELETE operation you need to COMMIT or ROLLBACK the transaction to make the change permanent or to undo it. Note that this operation will cause all DELETE triggers on the table to fire.
- It records each deletion in the transaction log
32)waht do u mean by indexs ?
34)if you create a primarykey which index will be formed?
Clustered Index
35)what is the disadvantage of clustered indexs?
If we update a record and change the value of an indexed column in a clustered index, the database might need to move the entire row into a new position to keep the rows in sorted order. This behavior essentially turns an update query into a DELETE followed by an INSERT, with an obvious decrease in performance. A table's clustered index can often be found on the primary key or a foreign key column, because key values generally do not change once a record is inserted into the database.
Good Article On Indexes.
36)what is the difference between having and group by claues ?
Having clause is used with group by clause to filter out records in a group.
Having clause is used with group by clause to filter out records in a group.
37)wher we will use the having clause ?
Having clause is used with group by clause to filter out records in a group.
Having clause is used with group by clause to filter out records in a group.
38)can you get the number and count of the number in a table, write the query ?
example:- 1
1
2
3
3
3
result should be:- 1 - 2, 2-1, 3-3
select Col1, count(Col1) from Table group by Col1
39)what are the constraints, how many are there and what are they ?
Common types of constraints include the following:
- NOT NULL Constraint: Ensures that a column cannot have NULL value.
- DEFAULT Constraint: Provides a default value for a column when none is specified.
- UNIQUE Constraint: Ensures that all values in a column are different.
- CHECK Constraint: Makes sure that all values in a column satisfy certain criteria.
- Primary Key Constraint: Used to uniquely identify a row in the table.
- Foreign Key Constraint: Used to ensure referential integrity of the data.
40)difference between union and unionall ?
41)what is the difference between primary key and unique key?
44)does a uniquekey contains 2 null values ?
Yes..There is no restriction of having NULL values in column defined as UNIQUE. So you can have as many NULL values as there are rows in the table.
create table test (id varchar2(10) unique)
/
insert into test values (null)
/
insert into test values (null)
/
insert into test values (null)
above statements can be executed without any error.
A Unique key constraint column accepts as many no of nulls as it can.
45)why do we use indexs?
46)* How to use a interface having 100 methods? but we want to use only 2 methods?
Derive an abstract class from that interface and implement only as many no of methods as you require and declare rest of the methods as abstract.
Derive an abstract class from that interface and implement only as many no of methods as you require and declare rest of the methods as abstract.
interface MyInterface
{
void AAAA();
void BBBB();
void CCCC();
void DDDD();
}
public abstract class MyClass : MyInterface
{
public void AAAA()
{
}
public abstract void BBBB();
public abstract void CCCC();
public abstract void DDDD();
}
47)what do u mean by session state ?
48)if you write some text in a textboxes in a webpage and now if you refresh the page the text will be cleared or not? and Why ?
Data entered in textbox will not be cleared. When you enter value in textbox, it puts it into viewstate. So data will not be cleared.
-------------------- telephonic
49) what is a thread?
50)what are delegates how many are there what is the differnce?
51)
53)how will you call the main thread?
54)can we invoke the delegate without registering the event to it?
55)how can we syncronus and asyncronus threads ?
56)can we implement interface to a abetract class ?
57)how to make a thread to work in the backgroung ?
58)what does a interface contains?
59)what is the dif b/w interface and abstract class ?
60)how can we use a view to update the table? write syntax ?
61)what do u mean by normalization ?
62)what is shadowing(vb.net) Hiding(C#)?
Re-define the implementation of a method in base class in derived class.
63)what do u mean by acceptchanges?
When you have call the AcceptChanges method on dataset, all changes in dataset are retained and every row state has been changed to Unchanged state.
64) if change the data in a grid and call default view into a dataview does
the row contains original or updated version of the row ?
65)how can we make a class non inheritable ?
sealed
66)can we declare a delegate in the interface?
No..
67)what are the difference between sp and udf ?
http://dotnetnotepad.blogspot.com/2010/09/difference-bw-stored-proc-and-function.html
68)can we use udfs in sps ?
Yes...
69)how will control the syncronization of threads ?
70)what are the main c# changes in .net2.0 and 3.5 ?
http://www.developer.com/print.php/3561756
71)what do u mean by encapsulation ?
72)what do u mean by abstraction ?
73)what is the difference between list and array list ?
Arraylist: Arraylist can accept any type of data. Internally it converts them as objects. So When you try to retrieve data, which is in the form of object, that should be un-boxed. Here boxing and un boxing is happen.
List: List is a strongly typed one and no boxing and unboxing is required as it is strongly typed.
74)what do u mean by finalizer ?
75)what is garbage collection?
76)can we have a error handling in stored procedure ?
77)what does a connection string consists of ?
Subscribe to:
Posts (Atom)