Overblog Follow this blog
Administration Create my blog
October 30 2010 7 30 /10 /October /2010 16:30

Asp.Net Interview Question Part 3

Get Interview tutorials and videos on .NET 3.5, 4.0, Pessimistic, Optimistic, Locking, SQL Server, CAS, Security, WCF, SharePoint, Azure, OOPS and many more on www.questpond.com

 


(I) Do session use cookies?

(I)How can we force all the validation control to run?

(B)How can we check if all the validation control are valid and proper?

(A) If client side validation is enabled in your Web page, does that mean server side code is not run.

(A)Which JavaScript file is referenced for validating the validators at the client side?

(B)How to disable client side script in validators?

(A)How can I show the entire validation error message in a message box on the client side?

(B)You find that one of your validations is very complicated and does not fit in any of the validators, what will you do?

(B) How can we kill a user session?

(I) How do you upload a file in ASP.NET?

(I) How do I send email message from ASP.NET?

(A)What are different IIS isolation levels?

(A)ASP used STA threading model, what is the threading model used for ASP.NET.

(A)What is the use of <%@ page aspcompat=true %> attribute?

(B) Explain the differences between Server-side and Client-side code?

(I)Can you explain Forms authentication in detail?

(A)How do I sign out in forms authentication?

(A)If cookies are not enabled at browser end does form Authentication work?

(A)How to use a checkbox in a data grid?

(I)What are the steps to create a windows service in VB.NET?

(A) What is the difference between “Web farms” and “Web garden”?

(B) What is the main difference between Grid layout and Flow Layout?

(I) What’s the difference between trace and debug in ASP.NET?

(A) How do you enable tracing in on an ASP.NET page?

(B) Which namespace is needed to implement debug and trace ?

(A) Can you explain the concept of trace listener?

(I) What are trace switches?

Introduction

 

In this section we will touch base on one of important concepts in ASP. Net. You can download my .NET Interview Question PDF from http://www.questpond.com/SampleDotNetInterviewQuestionBook.zip .

I have also put all these design patterns in a video format and uploaded on http://www.questpond.com/FreeDesign1.htm . You can visit http://www.questpond.com and download the complete architecture interview questions PDF which covers SOA , UML , Design patterns , Togaf , OOPs etc.

Happy job hunting......

(I) Do session use cookies?


Twist:- How can we make session to not to use cookies ?
Left to the user, you will enjoy to find this answer.

(I)How can we force all the validation control to run?


Page.Validate

(B)How can we check if all the validation control are valid and proper?


Using the Page.IsValid () property you can check whether all the validation are done.

(A) If client side validation is enabled in your Web page, does that mean server side code is not run.


When client side validation is enabled server emit’s JavaScript code for the custom validators. However, note that does not mean that server side checks on custom validators do not execute. It does this redundant check two times, as some of the validators do not support client side scripting.

(A)Which JavaScript file is referenced for validating the validators at the client side?


WebUIValidation.js JavaScript file installed at “aspnet_client” root IIS directory is used to validate the validation controls at the client side

(B)How to disable client side script in validators?


Set ‘EnableClientScript’ to false.

(A)How can I show the entire validation error message in a message box on the client side?


In validation summary set “ShowMessageBox” to true.

(B)You find that one of your validations is very complicated and does not fit in any of the validators, what will you do?


Best is to go for CustomValidators. Below is a sample code for a custom validator, which checks that a textbox should not have zero value
<asp:CustomValidator id="CustomValidator1" runat="server"
ErrorMessage="Number not divisible by Zero"
ControlToValidate="txtNumber"
OnServerValidate="ServerValidate"
ClientValidationFunction="CheckZero" /><br>
Input:
<asp:TextBox id="txtNumber" runat="server" />
<script language="javascript">
<!--function CheckZero(source, args) {
int val = parseInt(args.Value, 10);
if (value==0) {
args.
IsValid = false;
}
}
// -->
</script>

(I)What exactly happens when ASPX page is requested from a browser?


Note: - Here the interviewer is expecting complete flow of how an ASPX page is processed with respect to IIS and ASP.NET engine.
Following are the steps which occur when we request a ASPX page :-
The browser sends the request to the webserver. Let us assume that the webserver at the other end is IIS.
Once IIS receives the request he looks on which engine can serve this request.When we mean engine means the DLL who can parse this page or compile and send a response back to browser. Which request to map to is decided by file extension of the page requested.
Depending on file extension following are some mapping
• .aspx, for ASP.NET Web pages,
• .asmx, for ASP.NET Web services,
• .config, for ASP.NET configuration files,
• .ashx, for custom ASP.NET HTTP handlers,
• .rem, for remoting resources
You can also configure the extension mapping to which engine can route by using the IIS engine.



Figure: - 7.1 following screen shows some IIS mappings

 

Example an ASP page will be sent to old classic ASP.DLL to compile. While .ASPX pages will be routed to ASP.NET engine for compilation.

• As this book mainly will target ASP.NET we will look in to how ASP.NET pages that is ASPX pages generation sequence occurs. Once IIS passes the request to ASP.NET engine page has to go through two section HTTP module section and HTTP handler section. Both these section have there own work to be done in order that the page is properly compiled and sent to the IIS. HTTP modules inspect the incoming request and depending on that, they can change the internal workflow of the request. HTTP handler actually compiles the page and generates output. If you see your machine.config file you will see following section of HTTP modules

<httpModules>
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule" />
<add name="Session" type="System.Web.SessionState.SessionStateModule" />
<add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule" />
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" />
<add name="PassportAuthentication" type="System.Web.Security.PassportAuthenticationModule" />
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" />
<add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule" />
<add name="ErrorHandlerModule" type="System.Web.Mobile.ErrorHandlerModule,
System.Web.Mobile, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpModules>


The above mapping will show which Namespace handles which functionality. Example FormsAthuentication is handled by “System. Web.
Security.FormsAuthenticationModule”. If you look at the web.config, section HTTP module is where authentication and authorization happens.

Ok now the HTTP handler is where the actual compilation takes place and the output is generated. Following is a paste from HTTP handler section of WEB.CONFIG file.

<httpHandlers>
<add verb="*" path="*.vjsproj" type="System.Web.HttpForbiddenHandler" />
<add verb="*" path="*.java" type="System.Web.HttpForbiddenHandler" />
<add verb="*" path="*.jsl" type="System.Web.HttpForbiddenHandler" />
<add verb="*" path="trace.axd" type="System.Web.Handlers.TraceHandler" />
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory" />
<add verb="*" path="*.ashx" type="System.Web.UI.SimpleHandlerFactory" />
...
</httpHandlers>

• Depending on the File extension handler decides which Namespace will generate the output. Example all .ASPX extension files will be compiled by System.Web.UI.PageHandlerFactory
• Once the file is compiled it will be send back again to the HTTP modules and from there to IIS and then to the browser.



Figure: - 7.2 IIS flow from various sections.

(B) How can we kill a user session?


Session abandon

(I) How do you upload a file in ASP.NET?


I will leave this to the readers … Just a hint we have to use System.Web.HttpPostedFile class.

(I) How do I send email message from ASP.NET?


ASP.NET provides two namespace SystemWEB.mailmessage class and System.Web.Mail.Smtpmail class. Just a small homework creates a Asp.NET project and send a email at shiv_koirala@yahoo.com. Do not Spam.

(A)What are different IIS isolation levels?


IIS has three level of isolation:-
LOW (IIS process):- In this main IIS, process, and ASP.NET application run in same process. So if any one crashes the other is also affected. Example let us say (well this is not possible) I have hosted yahoo, hotmail .amazon and goggle on a single PC. So all application and the IIS process runs on the same process. In case any website crashes, it affects every one.

Figure: - 7.3 LOW IIS process scenario


Medium (Pooled):- In Medium pooled scenario, the IIS, and web application run in different process. Therefore, in this case there are two processes process1 and process2. In process1, the IIS process is running and in process2, we have all Web application running

Figure: - 7.4 Medium pooled scenario

High (Isolated):-In high isolated scenario every process is running is there own process. In below figure there are five processes and every one handling individual application. This consumes heavy memory but has highest reliability.

Figure: - 7.5 High isolation scenario



(A)ASP used STA threading model, what is the threading model used for ASP.NET.


ASP.NET uses MTA threading model.

(A)What is the use of <%@ page aspcompat=true %> attribute?


This attribute works like a compatibility option. As mentioned before ASP worked in STA model and ASP.NET works in MTA model, but what if your ASP.NET application is using a VB COM component. In order that VB COM runs properly in ASP.NET threading model, we have to set attribute. After defining the ASPCOMPAT directive attribute ASP.NET pages runs in STA model thus building the compatibility between ASP.NET and old COM components that does not support MTA model.

(B) Explain the differences between Server-side and Client-side code?


Server side code is executed at the server side on IIS in ASP.NET framework, while client side code is executed on the browser.

(I)Can you explain Forms authentication in detail?


In old ASP if you where said to create a login page and do authentication you have to do hell lot of custom coding. Now in ASP.NET that has made easy by introducing Forms authentication. So let us see in detail what form authentication is.
Forms authentication uses a ticket cookie to see that user is authenticated or not. That means when user is authenticated first time a cookie is set to tell that this user is authenticated. If the cookies expire then Forms authentication mechanism sends the user to the login page.

Following are the steps, which defines steps for Forms authentication:-

• Configure Web.config file with forms authentication. As shown below in the config file you can see we have give the cookie name and loginurl page.

<configuration>
<system.web>
<!-- Other settings omitted. -->
<authentication mode="Forms">
<forms name="logincookies"
loginUrl="login.aspx"
protection="All"
timeout="30"
path="/" />
</authentication>
</system.web>
</configuration>


• Remove anonymous access to the IIS web application, following are changes done to web.config file.

<configuration>
<system.web>
<!-- Other settings omitted. -->
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>

• Create the login page, which will accept user information. You will have create your login page that is the Login.aspx, which will actually take the user data.
• Finally a small coding in the login button.
Let us assume that the login page has two textboxes TX name and txtapssword.
Also, import System.Web.Security and put the following code in login button of the page.
If Page.IsValid Then
If FormsAuthentication.Authenticate(txtName.Text, txtPassword.Text) Then
FormsAuthentication.RedirectFromLoginPage(txtName.Text, False)
Else
lblStatus.Text = "Error not proper user"
End If
End If

(A)How do I sign out in forms authentication?


FormsAuthentication.Signout ()

(A)If cookies are not enabled at browser end does form Authentication work?


No, it does not work.

(A)How to use a checkbox in a data grid?


Twist: - How can I track event in checkbox, which is one of the columns of a data grid?

Note: - This is normally asked when the interviewer want to see that have you really worked practically on a project.


Following are the steps to be done:-
• In ASPX page you have to add Item template tag in data grid.

<ItemTemplate>
<asp:CheckBox id="CheckBox1" runat="server" AutoPostBack="True" OnCheckedChanged="Check_Clicked"></asp:CheckBox>
</ItemTemplate>


If you look at the Item template, we have “OnCheckChanged” event. This “OnCheckChanged” event has “Check Clicked” subroutine is actually in behind code. Note this method, which is in behind code, should either be “protected” or “public”
Following below is the subroutine, which defines the method

Protected Sub Check Clicked (By Val sender As Object, By Val e As EventArgs)
‘Do something
End Sub

The above steps should be defined in short to the interviewer, which will give a quick feeling of your practical experience with ASP.NET’

(I)What are the steps to create a windows service in VB.NET?


Windows Services are long-running executable applications that run in its own Windows session, which then has the ability to start automatically when the computer boots and also can be manually paused, stopped or even restarted.
Following are the steps to create a service:-
Create a project of type “Windows Service”.

Figure 7.6:- Create project for Windows Service


• If you see, the class created it is automatically inheriting from “System.ServiceProcess.ServiceBase”.
• You can override the following events provided by service and write your custom code. All the three main events can be used that is Start, stop and continue.


protected override void OnStart(string[] args)
{
}
protected override void OnStop()
{
}
protected override void OnContinue()
{
}


Now to install the service you need to do run the install util exe.

InstallUtil <Project Path>\BIN\MyNewService.exe

(A) What is the difference between “Web farms” and “Web garden”?


“Web farms” are used to have some redundancy to minimize failures. It consists of two or more web server of the same configuration and they stream the same kind of contents. When any request comes there is switching / routing logic, which decides which web server from the farm, handles the request. For instance, we have two servers “Server1” and “Server2” which have the same configuration and content. Therefore, there is a special switch, which stands in between these two servers and the users and routes the request accordingly.

Figure 7.7: - Web Farm in action


Above figure explains in detail how web farm work. You can see there is a router in between which takes a request and sees which one of the server is least loaded and forwards the request to that server. Therefore, for request1 it route is server1, for request2 it routes server2, for request3 it routes to server3 and final request4 is routed to server4. So you can see because we have web farm at place server1 and server2 are loaded with two request each rather than one server loading to full. One more advantage of using this kind of architecture is if one of the servers goes down we can still run with the other server thus having 24x7 uptime.

The routing logic can be a number of different options:-

• Round robin: Each node gets a request sent to it “in turn”. Therefore, server1 gets a request, then server2 again, then server1, then server2 again. As shown in the above figure.

• Least Active: Whichever node show to have the lowest number of current connects gets new connects sent to it. This is good to help keep the load balanced between the server nodes.

• Fastest Reply: Whichever node replies faster is the one that gets new requests. This is also a good option - especially if there are nodes that might not be “equal” in performance. If one performs better than the other, then send more requests there rather than which is moving slowly?

Before we try to understand what a web garden is let’s try to understand how IIS handles processes. All requests to IIS are routed to “aspnet_wp.exe” for IIS 5.0 and “w3wp.exe” for IIS 6.0. In normal case i.e. with out web garden, we have one worker process instance (“aspnet_wp.exe” / “w3wp.exe”) across all requests. This one instance of worker process uses the CPU processor as directed by the operating system.

Figure 7.8: - with out Web Garden


However, when we enable web garden for a web server it creates different instances of the worker process and each of these worker process runs on different CPU. You can see in the below diagram we have different worker process instances created which run on different CPU’s.



Figure 7.9: - With Web Garden



In short, we can define a model in which multiple processes run on multiple CPUs in a single server machine are termed as Web garden.

(A) How do we configure “Web Garden”?


“Web garden” can be configured by using process model settings in “machine.config” or “Web.config” file. The configuration section is named <process Model> and is shown in
The following example. The process model is enabled by default (enable=”true”). Below is the snippet from config file.

<process Model
enable=”true”
timeout=”infinite”
idle Timeout=”infinite”
shutdown Timeout=”0:00:05"
requestLimit=”infinite”
requestQueueLimit=”5000"
memoryLimit=”80"
webGarden=”false”
cpuMask=”12"
userName=””
password=””
logLevel=”errors”
clientConnectedCheck=”0:00:05"
/>

 From the above process model section for web garden, we are concerned with only two attributes “web garden” and “cpuMask”.
Web Garden: - Controls CPU affinity. True indicates that processes should be affinities to the corresponding CPU. The default is False.
CpuMask:- Specifies which processors on a multiprocessor server are eligible to run ASP.NET processes. The cpuMask value specifies a bit pattern that indicates the CPUs eligible to run ASP.NET threads. ASP.NET launches one worker process for each eligible CPU. If web Garden is set to false, cpuMask is ignored and only one worker process will run regardless of the number of processors in the machine. If web Garden is set to true, ASP.NET launches one worker process for each CPU that corresponds to a set bit in cpuMask. The default value of cpuMask is 0xffffffff.
Below are detail steps of how to implement web garden
• Click Start and then click Run.
• Type calc.exe and then click OK.
• Go to View menu, click Scientific.
• Go to View menu, click Binary.
• Use zero and one to specify the processors ASP.NET can or cannot use.
Use one for the processor that you want to use for ASP.NET. Use 0 for the processor that you do not want to use for ASP.NET. For example, if you want to use the first two processors for ASP.NET of a four-processor computer, type 1100.
• On the View menu, click Decimal. Note the decimal number.
• Open the Web.config or machine.config file in a text editor such as Notepad. The Web.config file is located in the folder where the application is saved.
• In the Web.config file, add the process Model configuration element under the System. Web element. Before adding <process Model> to Web.config file, the user has to make sure that the allow Definition attribute in the <process Model> section of the Web.config file is set to everywhere.
• Add and then set the web Garden attribute of the process Model element to True.
• Add and then set the cpuMask attribute of the process Model element to the result that is determined in your calculation.
Do not preface the number with zerox because the result of the calculation is a decimal number. The following example demonstrates the process Model element that is configured to enable only the first two processors of a four-processor computer.

<processModel
enable=”true”
webGarden=”true”
cpuMask=”12" />


Save the Web.config file. The ASP.NET application automatically restarts and uses only the specified processors.

(B) What is the main difference between Grid layout and Flow Layout?


Grid Layout provides absolute positioning for controls placed on the page. Developers that have their roots in rich-client development environments like Visual Basic will find it easier to develop their pages using absolute positioning, because they can place items exactly where they want them. On the other hand, Flow Layout positions items down the page like traditional HTML. Experienced Web developers favor this approach because it results in pages that are compatible with a wider range of browsers.
If you look in to the HTML code created by absolute positioning you can notice lot of DIV tags. While in Flow layout, you can see more of using HTML table to position elements, which is compatible with wide range of browsers.

(I) What’s the difference between trace and debug in ASP.NET?


Debug and trace enables you to monitor the application for errors and exception with out VS.NET IDE. In Debug mode compiler inserts some debugging code inside the executable. As the debugging code is the part of the executable they run on the same thread where the code runs and they do not given you the exact efficiency of the code ( as they run on the same thread). So for every full executable DLL you will see a debug file also as shown in figure ‘Debug Mode’.

Figure 7.10 : - Debug mode


Trace works in both debug as well as release mode. The main advantage of using trace over debug is to do performance analysis which can not be done by debug. Trace runs on a different thread thus it does not impact the main code thread.

Note: - There is also a fundamental difference in thinking when we want to use trace and when want to debug. Tracing is a process about getting information regarding program's execution. On the other hand debugging is about finding errors in the code.

(A) How do you enable tracing in on an ASP.NET page?


To enable tracing on an ASP.NET page we need to put the ‘trace’ attribute to true on the page attribute as shown in figure ‘Tracing in Action’ ( Its numbered as 1 in the figure). In the behind code we can use the trace object to put tracing like one we have shown on the page load numbered as (4). We have used the ‘trace.write’ to display our tracing. You can also see the trace data which is circled. 2 and 3 show the actual data. You can see how trace shows in details the tracing information for a page with events and time period for execution. If you make the ‘trace’ as false you will only see the actual display i.e. ‘This is the actual data’. So you can enable and disable trace with out actually compiling and uploading new DLL’s on production environment.

Figure 7.11 : - Tracing in Action



The above sample enables tracing only at page level. To enable tracing on application level we need to modify the ‘web.config’ file and put the ‘trace’ tag with ‘enabled=true’.

<trace enabled="true" requestLimit="10" pageOutput="false" localOnly="true" />

(B) Which namespace is needed to implement debug and trace ?


Debug and trace class belongs to ‘System.Diagnostic’ namespace.

(A) Can you explain the concept of trace listener?


‘Tracelistener’ are objects that get tracing information from the trace class and they output the data to some medium. For instance you can see from the figure ‘TraceListener’ how it listens to the trace object and outputs the same to UI, File or a windows event log. There are three different types of ‘tracelistener’ first is the ‘defaulttracelistener’ (this outputs the data to UI), second is ‘textwritertracelistener’ (this outputs to a file) and the final one is ‘Eventlogtracelistener’ which outputs the same to a windows event log.

Figure 7.12 : - TraceListener



Below is a code snippet for ‘textwritertracelistener’ and ‘eventlogtracelistener’. Using ‘textwritertracelistener’ we have forwarded the trace’s to ‘ErrorLog.txt’ file and in the second snippet we have used the ‘Eventlogtracelistener’ to forward the trace’s to windows event log.

Figure 7.13 :- Tracelistener in action


(I) What are trace switches?


Trace switches helps us to control and govern the tracing behavior of a project. There are two types of trace switches ‘BooleanSwitch’ and ‘TraceSwitch’. BooleanSwitch, as the name says, is a kind of on/off switch which can be either enabled (true) or disabled (false).

Figure 7.14 :- Trace switches


‘TraceSwitch’ on the other hand offers more options rather than simple true/false like ‘BooleanSwitch’. Tracing is enabled for a TraceSwitch object using the Level property. When we set the Level property of a switch to a particular level, it includes all levels from the indicated level down. For example, if you set a TraceSwitch's Level property to TraceLevel.Info, then all the lower levels, from TraceLevel.Error to TraceLevel.Warning, will be taken in to account. Below are the various levels in ‘TraceSwitch’ object.
Off à Outputs no messages to Trace Listeners
Error à Outputs only error messages to Trace Listeners
Warning à Outputs error and warning messages to Trace Listeners
Info à Outputs informational, warning and error messages to Trace Listeners
Verbose à Outputs all messages to Trace Listeners

TraceSwitch objSwitch = new TraceSwitch("TraceWarningandError", "Error in trace") ;
objSwitch.Level = TraceLevel.Warning ;

Other Interview question PDF's

.NET Interview Question PDF

Project Management interview questions

Download Networking Interview Questions

Download Software Testing Interview Questions

Download Sql Server Interview Questions

Download C# and ASP .Net Projects

Download Java Interview Questions

Download Software Architecture Interview Questions



 

 

Repost 0
Published by questpond.over-blog.com
write a comment
October 29 2010 6 29 /10 /October /2010 18:57

19 Practical Points to be remembered while working on project/software Company
Get Interview tutorials and videos on .NET 3.5, 4.0,Project, SQL Server, CAS, Security, WCF, SharePoint, Azure, OOPS and many more on www.questpond.com

 

Introduction

This article will talk about some important points we should note while working with tight dead line project. I am sure every one has some or other important points to share while working with software companies and projects. Do put your points here I will consolidate and make nice list, which will help the software professional community.

I have been writing and recording lot of architecture related videos on design patterns, UML , estimation and C# projects. You can see the sample videos at http://www.questpond.com/FreeDesign1.htm  .

There is life outside projects….your life and your family. Love your work but not your project or the company. Many developers after a certain amount of time become possessive about the project and the company. Try to come on time and go on time. So that you do not get saturated and work on the project for a longer time and effectively.

Do not try be a hero in the project. Because heroes also have to go through all hardships. So believe in equal load distribution which is not only good for the project but also for you on long run.

Every project has parasite developers. In short every project has developers who constantly take help from others thus bringing down productivity. Yes its is possible that those are your friends , but remember one thing do not give fish to the needy teach him how to fish. If you are project manager you should analyze such kind of developers and ask for replacement and if you are a developer avoid doing their work from start to finish. Yes give them hint but do not do complete coding for them.

Do not make projects your learning ground. Customer’s pay heavy for making software do not make it a learning ground. In many projects developers try to implement new technologies in mid of the project just by hearing jargons.

Do not treat your project people as a resource. Project managers have these jargon of thinking every one as a resource. Thats bookish thinking. Any one working in a project is finally a human with emotions. The time you consider them as resource they will consider you as resource.

Try to freeze your requirements before the start of the project. In practical scenarios it is very difficult to control the end customer. But if you can atleast control the changes that will make the project more comfortable. The best way to control changes is by taking official sign offs or non-official sign offs from the end Customer.


Test, Test and Test. That’s the key to success for any software project.

Do not hide your defects. Developers are the best guys who know where the code will crash. Do not hide it , analyze and fix it. Do not cheat and leave the same till it goes to the end client.

Avoid ego issues during project. Many times in project developers and managers get stuck up with ego issues. Sometimes moving back makes the project move further.

Tackle bigger problems of the project first. The best way to complete any project is to start those screens which are used by the customer more often. For instance every project has non-frequent masters code them later and start the transaction screens first. Many time developers end up doing nitty gritty work and forget the bigger part of the project.

Do not talk about stars. Every project starts with talking about stars but later end up somewhere else. Developers talk about concept of OOP’s , full database normalization , design patterns etc etc. These fundamentals are important but it should not end up with only jargons. Some times practical deadlines makes it impossible to implement these features. Keep yourself flexible and compromise with quality when you have deadlines…..believe me its not a sin if customer is giving you unreasonable deadlines.

Maintaining a right project hierarchy is very important i.e. the A model. In A model you have one senior person at the top , project manager , team leader , senior developers and then juniors. The right proportion of people from each grade is important. On any level if you have too much concentration you will have ego issue and promotion issues.


Make yourself visible. If you think you have done something good show it , advertise it , make it visible. Will help you during your assesment.

Avoid getting in to project politics. Peace of mind is the most important thing. Getting in to egos and politics will only complicate things.

If you are working on maintenance project upgrade yourself time to time.

In case you are maintaining some other Developers code do not criticize the code. Who knows in what circumstances was the project made.

If you are project manager in the project do not make it a compulsory rule that you will never touch coding. Remember juniors respect their seniors if they sit with them for development and know their difficulties.

If any resource is working on a project for more than a year his performance comes down. Prepare a proper KT plan and bring in new resources and roll the old resources off for some better prospects.

Avoid unnecessary meetings.

 

Repost 0
Published by questpond.over-blog.com
write a comment
October 29 2010 6 29 /10 /October /2010 18:55

Get Interview tutorials and videos on .NET 3.5, 4.0, ADO.NET, SQL Server, CAS, Security, WCF, SharePoint, Azure, OOPS and many more on www.questpond.com

 


(B) How do we use stored procedure in ADO.NET and how do we provide parameters to the stored procedures?

(B) How can we force the connection object to close after my data reader is closed?

(B) I want to force the data reader to return only schema of the data store rather than data.

(B) How can we fine-tune the command object when we are expecting a single row?

(B)What are the various methods provided by the dataset object to generate XML?

(B) How can we save all data from dataset?

(B) How can we check that some changes have been made to dataset since it was loaded?

(B) How can we add/remove row is in “Data Table” object of “Dataset”?

(B) What is basic use of “Data View”?

(B) What is the difference between “Dataset” and “Data Reader” ?

(B) How can we load multiple tables in a Dataset?

(B) How can we add relation between tables in a Dataset?

(B) What is the use of Command Builder?

(B) What’s difference between “Optimistic” and “Pessimistic” locking ?

(A) How many ways are there to implement locking in ADO.NET?

(A)How can we perform transactions in .NET?

(I) What is difference between Dataset? Clone and Dataset. Copy?

(A) Can you explain the difference between an ADO.NET Dataset and an ADO Record set?

(A) Explain in detail the fundamental of connection pooling?

(A)What is Maximum Pool Size in ADO.NET Connection String?

(A)How to enable and disable connection pooling?

(I) What extra features does ADO.Net 2.0 have ?

Introduction

 

In this section we will touch base on one of important concepts in ADO.Net. You can download my .NET Interview Question PDF from http://www.questpond.com/SampleDotNetInterviewQuestionBook.zip .

I have also put all these design patterns in a video format and uploaded on http://www.questpond.com/FreeDesign1.htm . You can visit http://www.questpond.com and download the complete architecture interview questions PDF which covers SOA , UML , Design patterns , Togaf , OOPs etc.

Happy job hunting......

(B) How do we use stored procedure in ADO.NET and how do we provide parameters to the stored procedures?


ADO.NET provides the SqlCommand object, which provides the functionality of executing stored procedures.

Note :- Sample code is provided in folder “WindowsSqlClientCommand”. There are two stored procedures created in same database “Employees” which was created for the previous question.


CREATE PROCEDURE SelectByEmployee @FirstName nvarchar(200) AS
Select FirstName from Employees where FirstName like @FirstName + '%'
CREATE PROCEDURE SelectEmployee AS
Select FirstName from Employees

If txtEmployeeName.Text.Length = 0 Then
objCommand = New SqlCommand(“SelectEmployee”)
Else
objCommand = New SqlCommand(“SelectByEmployee”)
objCommand.Parameters.Add(“@FirstName”, Data.SqlDbType.NVarChar, 200)
objCommand.Parameters.Item(“@FirstName”).Value = txtEmployeeName.Text.Trim()
End If

 In the above sample, not much has been changed only that the SQL is moved to the stored procedures. There are two stored procedures one is “Select Employee” which selects all the employees and the other is “SelectByEmployee” which returns employee name starting with a specific character. As you can see to provide parameters to the stored procedures, we are using the parameter object of the command object. In such question interviewer expects two simple answers one is that we use command object to execute stored procedures and the parameter object to provide parameter to the stored procedure. Above sample is provided only for getting the actual feel of it. Be short be nice and get a job.

(B) How can we force the connection object to close after my data reader is closed?


Command method Execute reader takes a parameter called as Command Behavior where in we can specify saying close connection automatically after the Data reader is close.

PobjDataReader = pobjCommand.ExecuteReader (CommandBehavior.CloseConnection)

(B) I want to force the data reader to return only schema of the data store rather than data.


PobjDataReader = pobjCommand.ExecuteReader (CommandBehavior.SchemaOnly)

(B) How can we fine-tune the command object when we are expecting a single row?


Again, CommandBehaviour enumeration provides two values Single Result and Single Row. If you are expecting a single value then pass “CommandBehaviour.SingleResult” and the query is optimized accordingly, if you are expecting single row then pass “CommandBehaviour.SingleRow” and query is optimized according to single row.

(B) Which is the best place to store connection string in .NET projects?


Config files are the best places to store connection strings. If it is a web-based application “Web.config” file will be used and if it is a windows application “App.config” files will be used.

(B) What are the steps involved to fill a dataset?


Twist: - How can we use data adapter to fill a dataset?

Sample code is provided in “WindowsDataSetSample” folder in CD.”LoadData” has all the implementation of connecting and loading to dataset. This dataset is finally bind to a List Box. Below is the sample code.


Private Sub LoadData()
Dim strConnectionString As String
strConnectionString = AppSettings.Item(“ConnectionString”)
Dim objConn As New SqlConnection(strConnectionString)
objConn.Open()
Dim objCommand As New SqlCommand(“Select FirstName from Employees”)
objCommand.Connection = objConn
Dim objDataAdapter As New SqlDataAdapter()
objDataAdapter.SelectCommand = objCommand
Dim objDataSet As New DataSet
End Sub


In such type of questions interviewer is looking from practical angle, that have you worked with dataset and datadapters. Let me try to explain the above code first and then we move to what steps should be told during interview.

Dim objConn As New SqlConnection(strConnectionString)
objConn.Open()

 First step is to open the connection. Again, note the connection string is loaded from config file.

Dim objCommand As New SqlCommand(“Select FirstName from Employees”)
objCommand.Connection = objConn


Second step is to create a command object with appropriate SQL and set the connection object to this command.

Dim objDataAdapter As New SqlDataAdapter()
objDataAdapter.SelectCommand = objCommand


Third steps is to create the Adapter object and pass the command object to the adapter object.

objDataAdapter.Fill(objDataSet)

 Fourth step is to load the dataset using the “Fill” method of the data adapter.

lstData.DataSource = objDataSet.Tables(0).DefaultView
lstData.DisplayMember = “FirstName”
lstData.ValueMember = “FirstName”


Fifth step is to bind to the loaded dataset with the GUI. At this moment sample has list box as the UI. Binding of the UI is done by using Default View of the dataset. Just to revise every dataset has tables and every table has views. In this sample, we have only loaded one table i.e. Employees table so we are referring that with an index of zero.
Just say all the five steps during interview and you will see the smile on the interviewer’s face and appointment letter in your hand.

(B)What are the various methods provided by the dataset object to generate XML?


Note:- XML is one of the most important leap between classic ADO and ADO.NET. So this question is normally asked more generally how can we convert any data to XML format. Best answer is convert in to dataset and use the below methods.

• ReadXML
Read’s a XML document in to Dataset.
• GetXML
This is a function, which returns the string containing XML document.
• Writexml
This writes a XML data to disk.

(B) How can we save all data from dataset?


Dataset has “Accept Changes” method, which commits all the changes since last time “Accept changes” has been executed.

Note :- This book does not have any sample of Acceptchanges. We leave that to readers as homework sample. But yes from interview aspect that will be enough.

(B) How can we check that some changes have been made to dataset since it was loaded?


Twist: - How can we cancel all changes done in dataset?

Twist: - How do we get values, which are changed, in a dataset?

For tracking down changes, Dataset has two methods, which comes as rescue “Get Changes “and “Has Changes”.
Get Changes


Returns dataset, which are changed since it, was loaded, or since Accept changes was executed.
Has Changes

Or abandon all changes since the dataset was loaded use “Reject Changes This property indicates that has any changes been made since the dataset was loaded or accept changes method was executed.
Note:- One of the most misunderstood things about these properties is that it tracks the changes of actual database. That is a fundamental mistake; actually the changes are related to only changes with dataset and have nothing to with changes happening in actual database. As dataset are disconnected and do not know anything about the changes happening in actual database.

(B) How can we add/remove row is in “Data Table” object of “Dataset”?


“Data table” provides “NewRow” method to add new row to “Data Table”. “Data Table” has “DataRowCollection” object that has all rows in a “Data Table” object. Following are the methods provided by “DataRowCollection” object:-

Add

Adds a new row in Data Table
Remove

It removes a “Data Row” object from “Data Table”
Remove At

It removes a “Data Row” object from “Data Table” depending on index position of the “Data Table”.

(B) What is basic use of “Data View”?


“Data View” represents a complete table or can be small section of rows depending on some criteria. It is best used for sorting and finding data with in “data table”.
Data view has the following methods:-
Find

It takes an array of values and returns the index of the row.
Find Row

This also takes array of values but returns a collection of “Data Row”.
If we want to manipulate data of “Data Table” object create “Data View” (Using the “Default View” we can create “Data View” object) of the “Data Table” object and use the following functionalities:-
Add New

Adds a new row to the “Data View” object.
Delete

Deletes the specified row from “Data View” object.

(B) What is the difference between “Dataset” and “Data Reader” ?


Twist: - Why is Dataset slower than Data Reader is?Fourth point is the answer to the twist.

Note:- This is my best question and we expect everyone to answer it. It is asked almost 99% in all companies....Basic very Basic cram it.

Following are the major differences between “Dataset” and “Data Reader”:-
• “Dataset” is a disconnected architecture, while “Data Reader” has live connection while reading data. If we want to cache data and pass to a different tier “Dataset” forms the best choice and it has decent XML support.

• When application needs to access data from more than one table “Dataset” forms the best choice.

• If we need to move back while reading records, “data reader” does not support this functionality.

• However, one of the biggest drawbacks of Dataset is speed. As “Dataset” carry considerable overhead because of relations, multiple table’s etc speed is slower than “Data Reader”. Always try to use “Data Reader” wherever possible, as it is meant especially for speed performance.

(B) How can we load multiple tables in a Dataset?


objCommand.CommandText = "Table1"
objDataAdapter.Fill(objDataSet, "Table1")
objCommand.CommandText = "Table2"
objDataAdapter.Fill(objDataSet, "Table2")

Above is a sample code, which shows how to load multiple “Data Table” objects in one “Dataset” object. Sample code shows two tables “Table1” and “Table2” in object ObjDataSet.

lstdata.DataSource = objDataSet.Tables("Table1").DefaultView
In order to refer “Table1” Data Table, use Tables collection of Datasets and the Default view object will give you the necessary output.

(B) How can we add relation between tables in a Dataset?


Dim objRelation As DataRelation
objRelation=New
DataRelation("CustomerAddresses",objDataSet.Tables("Customer").Columns("Custid")
,objDataSet.Tables("Addresses").Columns("Custid_fk"))
objDataSet.Relations.Add(objRelation)

Relations can be added between “Data Table” objects using the “Data Relation” object. Above sample, code is trying to build a relationship between “Customer” and “Addresses” “Data table” using “Customer Addresses” “Data Relation” object.

(B) What is the use of Command Builder?


Command Builder builds “Parameter” objects automatically. Below is a simple code, which uses command builder to load its parameter objects.

Dim pobjCommandBuilder As New OleDbCommandBuilder(pobjDataAdapter)
pobjCommandBuilder.DeriveParameters(pobjCommand)

Be careful while using “Derive Parameters” method as it needs an extra trip to the Data store, which can be very inefficient

(B) What’s difference between “Optimistic” and “Pessimistic” locking ?


In pessimistic locking when user wants to update data it locks the record and till then no one can update data. Other user’s can only view the data when there is pessimistic locking.
In optimistic locking multiple users can open the same record for updating, thus increase maximum concurrency. Record is only locked when updating the record. This is the most preferred way of locking practically. Now a days in browser based application it is very common and having pessimistic locking is not a practical solution.

(A) How many ways are there to implement locking in ADO.NET?


Following are the ways to implement locking using ADO.NET:-
• When we call “Update” method of Data Adapter it handles locking internally. If the Dataset values are not matching with current data in Database, it raises concurrency exception error. We can easily trap this error using Try. Catch block and raise appropriate error message to the user.
• Define a Date time stamp field in the table. When actually you are firing the UPDATE SQL statements, compare the current timestamp with one existing in the database. Below is a sample SQL which checks for timestamp before updating and any mismatch in timestamp it will not update the records. This I the best practice used by industries for locking.

Update table1 set field1=@test where Last Timestamp=@Current Timestamp

• Check for original values stored in SQL SERVER and actual changed values. In stored procedure check before updating that the old data is same as the current Example in the below shown SQL before updating field1 we check that is the old field1 value same. If not then some one else has updated and necessary action has to be taken.

Update table1 set field1=@test where field1 = @oldfield1value
Locking can be handled at ADO.NET side or at SQL SERVER side i.e. in stored procedures. For more details of how to implementing locking in SQL SERVER read “What are different locks in SQL SERVER?” in SQL SERVER chapter.

(A)How can we perform transactions in .NET?


The most common sequence of steps that would be performed while developing a transactional application is as follows:

• Open a database connection using the Open method of the connection object.
• Begin a transaction using the Begin Transaction method of the connection object. This method provides us with a transaction object that we will use later to commit or rollback the transaction. Note that changes caused by any queries executed before calling the Begin Transaction method will be committed to the database immediately after they execute. Set the Transaction property of the command object to the above mentioned transaction object.
• Execute the SQL commands using the command object. We may use oneormorecommand objects for this purpose, as long as the Transaction property of all the objects is set to a valid transaction object.
• Commit or roll back the transaction using the Commit or Rollback method of the transaction object.
• Close the database connection.

(I) What is difference between Dataset? Clone and Dataset. Copy?


Clone: - It only copies structure, does not copy data.
Copy: - Copies both structure and data.

(A) Can you explain the difference between an ADO.NET Dataset and an ADO Record set?


There two main basic differences between record set and dataset:-
• With dataset you an retrieve data from two databases like oracle and sql server and merge them in one dataset , with record set this is not possible
• All representation of Dataset is using XML while record set uses COM.
• Record set cannot be transmitted on HTTP while Dataset can be.

(A) Explain in detail the fundamental of connection pooling?


When a connection is opened first time, a connection pool is created and is based on the exact match of the connection string given to create the connection object. Connection pooling only works if the connection string is the same. If the connection string is different, then a new connection will be opened, and connection pooling will not be used.

Figure 9.5: - Connection Pooling action.

Let us try to explain the same pictorially. In the above figure, you can see there are three requests “Request1”, “Request2”, and “Request3”. “Request1” and “Request3” have same connection string so no new connection object is created for “Request3” as the connection string is same. They share the same object “ConObject1”. However, new object “ConObject2” is created for “Request2” as the connection string is different.

Note: - The difference between the connection string is that one has “User id=sa” and other has “User id=Testing”.

(A)What is Maximum Pool Size in ADO.NET Connection String?


Maximum pool size decides the maximum number of connection objects to be pooled. If the maximum pool size is reached and there is no usable connection available the request is queued until connections are released back in to pool. So it’s always a good habit to call the close or dispose method of the connection as soon as you have finished work with the connection object.

(A)How to enable and disable connection pooling?


For .NET it is enabled by default but if you want to just make sure set Pooling=true in the connection string. To disable connection pooling set Pooling=false in connection string if it is an ADO.NET Connection. If it is an OLEDBConnection object set OLE DB Services=-4 in the connection string.

(I) What extra features does ADO.Net 2.0 have ?


Bulk Copy Operation
Bulk copying of data from a data source to another data source is a newly added feature in ADO.NET 2.0. ADO.NET inrtoduces bulk copy classes which provide fastest way to transfer\ data from once source to the other. Each ADO.NET data provider has bulk copy classes. For example, in SQL .NET data provider, the bulk copy operation is handled by SqlBulkCopy class, which can read a DataSet, DataTable, DataReader, or XML objects.
Data Paging
A new method is introduced ExecutePageReader which takes three parameters - CommandBehavior, startIndex, and pageSize. So if you want to get rows ony from 10 - 20, you can simply call this method with start index as 10 and page size as 10.
Batch Update
If you want to update large number of data on set ADO.NET 2.0 provides UpdateBatchSize property, which allows you to set number of rows to be updated in a batch. This increases the performance dramatically as round trip to the server is minimized.
Load and Save Methods
In previous version of ADO.NET, only DataSet had Load and Save methods. The Load method can load data from objects such as XML into a DataSet object and Save method saves the data to a persistent media. Now DataTable also supports these two methods. You can also load a DataReader object into a DataTable by using the Load method.
New Data Controls
In toolbox you can see three new controls - DataGridView, DataConnector, and DataNavigator.
DataReader's New Execute Methods
Some new execute methods introduced are ExecutePageReader, ExecuteResultSet, and ExecuteRow.

Other Interview question PDF's

.NET Interview Question PDF

 

Project Management interview questions

Download Networking Interview Questions

Download Software Testing Interview Questions

Download Sql Server Interview Questions

Download C# and ASP .Net Projects

Download Java Interview Questions

Download Software Architecture Interview Questions

Download Excel Question and Answers

 

Repost 0
Published by questpond.over-blog.com
write a comment
October 29 2010 6 29 /10 /October /2010 15:21

Six Sigma Interview Questions
Get Interview tutorials and videos on .NET 3.5, 4.0, Six,Sigma,ASP.NET  SQL Server, CAS, Security, WCF, SharePoint, Azure, OOPS and many more on www.questpond.com

 

Six Sigma

Introduction

I know many will not like my interview questions article. Some may think its bad for various reasons and some may think its good for quick revision. Again I repeat you do not get jobs by reading interview question and answers , but yes it definitely serves as a quick reference. So looking at the good part I continue my Interview questions and answers series. This time I will be writing from process point of view. Six sigma is a getting good recognition in the market and I am sure many professionals are asked questions on the same. So below is a quick revision which will give you a decent understanding of Six sigma from interview point of view.

 You can visit my website www.questpond.com for many such interview questions.

 

Project Management interview questions

(B) What is six sigma?


Sigma is a statistical measure of variation in a process. We say a process has achieved six sigma if the quality is 3.4 DPMO (Defect per Million opportunities). It’s a problem solving methodology that can be applied to a process to eliminate the root cause of defects and costs associated with the same.

Figure: - Six Sigma.


(I) Can you explain the different methodology for execution and design process in SIX sigma?


The main focus of SIX sigma is on reducing defects and variations in the processes.DMAIC and DMADV are the models used in most SIX sigma initiatives. DMADV is model for designing process while DMAIC is for improving the process.

DMADV model has the below five steps:-

• Define: - Determine the project goals and the requirements of customers (external and internal).
• Measure: - Assess customer needs and specifications.
• Analyze: - Examine process options to meet customer requirements.
• Design: - Develop the process to meet the customer requirements.
• Verify: - Check the design to ensure that it’s meeting customer requirements

DMAIC model has the below five steps:-

• Define the projects, the goals, and the deliverables to customers (internal and external). Describe and quantify both the defect and the expected improvement.
• Measure the current performance of the process. Validate data to make sure it is credible and set the baselines.
• Analyze and determine the root cause(s) of the defects. Narrow the causal factors to the vital few.
• Improve the process to eliminate defects. Optimize the vital few and their interrelationships.
• Control the performance of the process. Lock down the gains.




Figure: - Methodology in SIX Sigma

 

Figure: - DMAIC and DMADV


(I) What does executive leaders, champions, Master Black belt, green belts and black belts mean?


SIX sigma is not only about techniques, tools and statistics, but the main thing depends upon people. In SIX sigma there five key players:-

• Executive leaders
• Champions
• Master black belt
• Black belts
• Green belts
Let’s try to understand all the role of players step by step.

 

Executive leaders: - They are the main person who actually decides that we need to do SIX sigma. They promote it throughout organization and ensure commitment of the organization in SIX sigma. Executive leaders are the guys who are mainly either CEO or from the board of directors. So in short they are the guys who fund the SIX sigma initiative. They should believe that SIX sigma will improve the organization process and that they will succeed. They should be determined that they ensure resources get proper training on SIX sigma, understand how it will benefit the organization and track the metrics.

Champions: - Champion is a normally a senior manager of the company. He promotes SIX sigma mainly between the business users. He understand SIX sigma thoroughly , serves as a coach and mentor , selects project , decides objectives , dedicates resource to black belts and removes obstacles which come across black belt players. Historically Champions always fight for a cause. In SIX sigma they fight to remove black belt hurdles.

Master Black-Belt: - This role requires highest level of technical capability in SIX sigma. Normally organizations that are just starting up with SIX sigma will not have the same. So normally outsiders are recruited for the same. The main role of Master Black belt is to train, mentor and guide. He helps the executive leaders in selecting candidates, right project, teach the basic and train resources. They regularly meet with black belt and green belt training and mentor them.

Black-Belt: - Black belt leads a team on a selected project which has to be show cased for SIX sigma. They are mainly responsible to find out variations and see how these variations can be minimized. Mast black belt basically selects a project and train resources, but black belt are the guys who actually implement it. Black belt normally works in projects as team leads or project manager. They are central to SIX sigma as they are actually implementing SIX sigma in the organization.

Green Belt: - Green belt assist black belt in their functional areas. They are mainly in projects and work part time on SIX sigma implementation. They apply SIX sigma methodologies to solve problems and improve process at the bottom level. They have just enough knowledge of SIX sigma and they help to define the base of SIX sigma implementation in the organization. They assist black belt in SIX sigma implementation actually.

Figure: - SIX key players


(I) What are the different kinds of variations used in six sigma?


Variation is the basis of six sigma. It defines how much changes are happening in an output of a process. So if a process is improved then this should reduce variations. In six sigma we identify variations in the process, control them and reduce or eliminate defects. Now let’s understand how we can measure variations.

There are four basic ways of measuring variations Mean, Median, Mode and Range. Let’s understand each of these variations in more depth for better analysis.

Figure: - Different variations in Six sigma
 

Mean: - In mean the variations are measured and compared using math’s averaging techniques. For instance you can see the below figure which shows two weekly measures of how many computers are manufactured. So for that we have tracked two weeks one we have named as Week 1 and the other as Week 2. So to calculate variation by using mean we calculate the mean of week1 and week2. You can see from the calculations below we have got 5.083 for week and 2.85 for week2. So we have a variation of 2.23.


Figure: - Measuring variations by using Mean


Median: - Median value is a mid point in our range of data. Mid point can be found out using by finding the difference between highest and lowest value then divide it by two and finally add the lowest value to the same. For instance for the below figure in week1 we have 4 as the lowest value and 7 as the highest value. So first we subtract the lowest value from the highest value i.e. 7 -4. Then we divide it by two and add the lowest value. So for week1 the median is 5.5 and for week2 the median is 2.9. So the variation is 5.5 – 2.9.

 

Figure: - Median for calculating variations


Range: - Range is nothing but spread of value for a particular data range. In short it is the difference between highest and lowest values in particular data range. For instance you can see for recorded computer data of two week we have found out the range values by subtracting the highest value from the lowest.


Figure: - Range for calculating variations


Mode: - Mode is nothing but the most occurred values in a data range. For instance in our computer manufacturing data range 4 is the most occurred value in Week1 and 3 is the most occurred value in week 2. So the variation is 1 between these data ranges.

Figure: - Mode for calculating variations



(A) Can you explain the concept of standard deviation?


The most accurate method of quantifying variation is by using standard deviation. It indicates the degree of variation in a set of measurement or a process by measuring the average spread of data around the mean. It’s but complicated than the deviation process discussed in the previous question, but it does give accurate information.

Note: - To understand standard deviation we will be going through a bit of maths so please co-operate and keep your head cool. In the below steps we will go step by step and understand how we can implement standard deviation.

Below is the formula for Standard deviation. “σ“ symbol stands for standard deviation. X is the observed values; X (with the top bar) is the arithmetic mean and n is the number of observations. The formulae must be looking complicated by but let’s break up in to steps and understand it better.

 

Figure: - Standard deviation formulae


The first step is to calculate the mean. This can be calculated by adding all the observed values and dividing the same by the number of observed values.



Figure: - Step 1 Standard deviation


The second step is to subtract the average from each observation, square them and then sum them. Because we square them we will not get negative values. Below figure indicates the same in very detail manner.



Figure: - Step 2 Standard deviation



In the third step we divide the same with the number of observations as shown the figure.

 

Figure: - Step 3 Standard deviation


In the final step we take the square root which gives the standard deviation.

 

Figure: - Step 4 standard deviation


Note: - Below are some questions which we have not answered and left it as an exercise to the readers. We will definitely try to cover the same in the coming second edition.


(B) Can you explain the concept of fish bone/ Ishikawa diagram?


There are situations where we need to analyze what caused the failure or problem in a project. Fish bone or Ishikawa diagram is one of the important concept which can help you list down your root cause of the problem. Fish bone was conceptualized by Ishikawa, so in the honor of its inventor this concept was named as Ishikawa diagram. Inputs to conduct a fish bone diagram comes from discussion and brain storming with people who were involved in the project. Below figure shows how the structure of the Ishikawa diagram is.
Below is a sample fish bone diagram. The main bone is the problem which we need to address and to know what caused the failure. For instance the below fish bone is constructed to know what caused the project failure. To know this cause we have taken four main bones as inputs Finance, Process, People and Tools. For instance on the people front there are many resignations à this was caused because there was no job satisfaction à this was caused because the project was a maintenance project. In the same way causes are analyzed on the Tools front also. In tools à No tools were used in the project à because no resource had enough knowledge about the same à this happened because of lack of planning. In process front the process was adhoc àthis was because of tight dead lines à this was caused because marketing people over promised and did not negotiate properly with the end customer.

Now once the diagram is drawn the end bones of the fish bone signify the main cause of project failure. From the below diagram here’s a list:-

• No training was provided for the resources regarding tool.
• Marketing people over promised with customer which lead to tight dead lines.
• Resources resigned because it’s a maintenance project.

Figure: - Fish bone / Ishikawa diagram
 

(B) What is Pareto principle?


Pareto principle also paraphrased as 80/20 principle is simple effective problem tackling way in management. It says that 20% of your problems lead to other 80 % of problems. So rather than concentrating on the 80% of problem if you concentrate on 20% of problems you can save lot of trouble. So in Pareto you analyze the problems and only concentrate on 20% of your vital problems.

If you look at the above fish bone diagram we have discussed all the root problem is due to only three reasons:-
• No tools are used.
• No process is defines.
• Many resignations.

So if we tackle these problems we can solve all the other problems.

(A) Can you explain QFD?

(A) Can you explain FMEA?

(A) Can you explain X bar charts?

(A) Can you explain Flow charting and brain storming?

Other Interview question PDF's

Repost 0
Published by questpond.over-blog.com
write a comment
October 29 2010 6 29 /10 /October /2010 14:59

Asp.Net Interview Question Part 1
Get Interview tutorials and videos on .NET 3.5, 4.0, Pessimistic, Optimistic, Locking, SQL Server, CAS, Security, WCF, SharePoint, Azure, OOPS and many more on www.questpond.com

 

ASP. NET


(B) What’ is the sequence in which ASP.NET events are processed?

(B) In which event are the controls fully loaded?

(B) How does ASP.NET maintain state in between subsequent request?

(A) What is event bubbling?

(B) How do we assign page specific attributes?

(A) How do we ensure view state is not tampered?

(B) What is the use of @ Register directives?

(B) What is the use of Smart Navigation property?

(B) What is AppSetting Section in “Web.Config” file?

(B) Where is View State information stored?

(I) what is the use of @ Output Cache directive in ASP.NET.

(B) How can we create custom controls in ASP.NET?

(B) How many types of validation controls are provided by ASP.NET?

(B) Can you explain “AutoPostBack”?

(B) How can you enable automatic paging in Data Grid?

(B) What is the use of “GLOBAL.ASAX” file?

(B) What is the difference between “Web.config” and “Machine.Config”?

(B) What is a SESSION and APPLICATION object?

 

 

Introduction

In this section we will touch base on one of important concepts in ASP. Net. You can download my .NET Interview Question PDF from http://www.questpond.com/SampleDotNetInterviewQuestionBook.zip .

I have also put all these design patterns in a video format and uploaded on http://www.questpond.com/FreeDesign1.htm . You can visit http://www.questpond.com and download the complete architecture interview questions PDF which covers SOA , UML , Design patterns , Togaf , OOPs etc.

Happy job hunting......

(B) What’ is the sequence in which ASP.NET events are processed?

Following is the sequence in which the events occur:-
• Page_Init.
• Page Load.
• Control events
• Page- Unload event.
Page_init event only occurs when first time the page is started, but Page Load occurs in subsequent request of the page.

(B) In which event are the controls fully loaded?


Page load event guarantees that all controls are fully loaded. Controls are also accessed in Page_Init events but you will see that view state is not fully loaded during this event.5
(B) How can we identify that the Page is Post Back?
Page object has an “IsPostBack” property, which can be checked to know that is the page posted back.

(B) How does ASP.NET maintain state in between subsequent request?


Refer caching chapter.

(A) What is event bubbling?


Server controls like Data grid, Data List, and Repeater can have other child controls inside them. Example Data Grid can have combo box inside data grid. These child control do not raise there events by themselves, rather they pass the event to the container parent (which can be a data grid, data list, repeater), which passed to the page as “ItemCommand” event. As the child control send events to parent it is termed as event bubbling.

(B) How do we assign page specific attributes?

Page attributes are specified using the @Page directive.

(A) How do we ensure view state is not tampered?


Using the @Page directive and setting ‘EnableViewStateMac’ property to True.

(B) What is the use of @ Register directives?


@Register directive informs the compiler of any custom server control added to the page.

(B) What is the use of Smart Navigation property?


It’s a feature provided by ASP. NET to prevent flickering and redrawing when the page is posted back.

Note:- This is only supported for IE browser. Project is who have browser compatibility as requirements have to think some other ways of avoiding flickering.

(B) What is AppSetting Section in “Web.Config” file?


Web.config file defines configuration for a web project. Using “AppSetting” section, we can define user-defined values. Example below defined is “Connection String” section, which will be used through out the project for database connection.

<Configuration>
<appSettings>
<add key="ConnectionString" value="server=xyz;pwd=www;database=testing" />
</appSettings>

(B) Where is View State information stored?


In HTML Hidden Fields.

(I) what is the use of @ Output Cache directive in ASP.NET.


It is used for caching. See more for Caching chapter.

(B) How can we create custom controls in ASP.NET?


User controls are created using .ASCX in ASP.NET. After .ASCX file is created you need to two things in order that the ASCX can be used in project:.


• Register the ASCX control in page using the <percentage@ Register directive.Example


<%@ Register tag prefix="Accounting" Tag name="footer" Src="Footer.ascx" %>


• Now to use the above accounting footer in page you can use the below directive.


<Accounting: footer runat="server" />

(B) How many types of validation controls are provided by ASP.NET?


There are six main types of validation controls:-

RequiredFieldValidator

It checks whether the control have any value. It is used when you want the control should not be empty.

RangeValidator

It checks if the value in validated control is in that specific range. Example TxtCustomerCode should not be more than eight lengths.

CompareValidator

It checks that the value in controls should match some specific value. Example Textbox TxtPie should be equal to 3.14.

RegularExpressionValidator

When we want the control, value should match with a specific regular expression.

CustomValidator

It is used to define User Defined validation.
Validation Summary
It displays summary of all current validation errors on an ASP.NET page.

Note: - It is rare that some one will ask step by step all the validation controls. Rather they will ask for what type of validation which validator will be used. Example in one of the interviews i was asked how will you display summary of all errors in the validation control...just uttered one word Validation summary.

(B) Can you explain “AutoPostBack”?


If we want the control to automatically post back in case of any event, we will need to check this attribute as true. Example on a Combo Box change we need to send the event immediately to the server side then set the “AutoPostBack” attribute to true.

(B) How can you enable automatic paging in Data Grid?


Following are the points to be done in order to enable paging in Data grid:-
• Set the “Allow Paging” to true.
• In PageIndexChanged event set the current page index clicked.

Note: - The answers are very short, if you have implemented practically its just a revision. If you are fresher, just make sample code using Datagrid and try to implement this functionality.

(B) What is the use of “GLOBAL.ASAX” file?


It allows to execute ASP.NET application level events and setting application-level variables.

(B) What is the difference between “Web.config” and “Machine.Config”?


“Web.config” files apply settings to each web application, while “Machine.config” file apply settings to all ASP.NET applications.

(B) What is a SESSION and APPLICATION object?


Session object store information between HTTP requests for a particular user, while application object are global across users.

Other Interview question PDF's

.NET Interview Question PDF

Project Management interview questions

Download Networking Interview Questions

Download Software Testing Interview Questions

Download Sql Server Interview Questions

Download C# and ASP .Net Projects

Download Java Interview Questions

Download Software Architecture Interview Questions

Download Excel Question and Answers

 

 

Repost 0
Published by questpond.over-blog.com
write a comment
October 28 2010 5 28 /10 /October /2010 16:36

Ado Dot Net Interview Question Part 1
Get Interview tutorials and videos on .NET 3.5, 4.0, Pessimistic, Optimistic, Locking, SQL Server, CAS, Security, WCF, SharePoint, Azure, OOPS and many more on www.questpond.com


(B) What is the namespace in which .NET has the data functionality class?

(B) Can you give an overview of ADO.NET architecture?

(B) What are the two fundamental objects in ADO.NET?

(B) What is difference between dataset and data reader?

(I) What are major difference between classic ADO and ADO.NET?

(B) What is the use of connection object?

(B) What is the use of command objects?

(B)What is the use of data adapter?

(B)What are basic methods of Data adapter?

(B) What is Dataset object?

(B) What are the various objects in Dataset?

(B) How can we connect to Microsoft Access, FoxPro, and Oracle etc?

(B) How do we connect to SQL SERVER, which namespace do we use?

Introduction

In this section we will touch base on one of important concepts in .Net Caching. You can download my .NET Interview Question PDF from http://www.questpond.com/SampleDotNetInterviewQuestionBook.zip .

I have also put all these design patterns in a video format and uploaded on http://www.questpond.com/FreeDesign1.htm . You can visit http://www.questpond.com and download the complete architecture interview questions PDF which covers SOA , UML , Design patterns , Togaf , OOPs etc.

Happy job hunting......

(B) What is the namespace in which .NET has the data functionality class?

Following are the namespaces provided by .NET for data management:-

 System. Data  


This contains the basic objects used for accessing and storing relational data, such as DataSet, DataTable, and Data Relation. Each of these is independent of the type of data source and the way we connect to it.


System.Data.OleDB



It contains the objects that we use to connect to a data source via an OLE-DB provider, such as OleDbConnection, OleDbCommand, etc. These objects inherit from the common base classes, and so have the same properties, methods, and events as the SqlClient equivalents.

System.Data.SqlClient:



This contains the objects that we use to connect to a data source via the Tabular Data Stream (TDS) interface of Microsoft SQL Server (only). This can generally provide better performance as it removes some of the intermediate layers required by an OLE-DB connection.

System.XML



This Contains the basic objects required to create, read, store, write, and manipulate XML documents according to W3C recommendations.

(B) Can you give an overview of ADO.NET architecture?


The most important section in ADO.NET architecture is “Data Provider”. Data Provider provides access to data source (SQL SERVER, ACCESS, ORACLE).In short it provides object to achieve functionalities like opening and closing connection, retrieve data, and update data. In the below figure, you can see the four main sections of a data provider:-

• Connection
• Command object (This is the responsible object to use stored procedures)
• Data Adapter (This object acts as a bridge between data store and dataset)
• Data reader (This object reads data from data store in forward only mode).
• Dataset object represents disconnected and cached data. If you see the diagram, it is not in direct connection with the data store (SQL SERVER,

ORACLE etc) rather it talks with Data adapter, who is responsible for filling the dataset. Dataset can have one or more Data table and relations.

Figure: - 9.1 ADO.NET Architecture


• Data View” object is used to sort and filter data in Data table.



Note:- This is one of the favorite questions in .NET. Just paste the picture in your mind and during interview try to refer that image.

(B) What are the two fundamental objects in ADO.NET?


Data reader and Dataset are the two fundamental objects in ADO.NET.


(B) What is difference between dataset and data reader?


Following are some major differences between dataset and data reader:-
• Data Reader provides forward-only and read-only access to data, while the Dataset object can hold more than one table (in other words more than one row set) from the same data source as well as the relationships between them.
• Dataset is a disconnected architecture while data reader is connected architecture.
• Dataset can persist contents while data reader cannot persist contents, they are forward only.


(I) What are major difference between classic ADO and ADO.NET?


Following are some major differences between both :-
• In ADO we have recordset and in ADO.NET we have dataset.• In recordset we can only have one table. If we want to accommodate more than one tables we need to do inner join and fill the recordset. Dataset can have multiple tables.
• All data persist in XML as compared to classic ADO where data persisted in Binary format also.

(B) What is the use of connection object?


They are used to connect a data to a Command object.
• An OleDbConnection object is used with an OLE-DB provider
• A SqlConnection object uses Tabular Data Services (TDS) with MS SQL Server

(B) What is the use of command objects?


They are used to connect connection object to Data reader or dataset. Following are the methods provided by command object:-

• ExecuteNonQuery: -

Executes the command defined in the Command Text property against the connection defined in the Connection property for a query that does not return any row (an UPDATE, DELETE, or INSERT). Returns an Integer indicating the number of rows affected by the query.

• ExecuteReader: -

Executes the command defined in the Command Text property against the connection defined in the Connection property. Returns a "reader" object that is connected to the resulting row set within the database, allowing the rows to be retrieved.

• ExecuteScalar: -

Executes the command defined in the Command Text property against the connection defined in the Connection property. Returns only single value (effectively the first column of the first row of the resulting row set any other returned columns and rows are discarded. It is fast and efficient when only a "singleton" value is required

(B)What is the use of data adapter?


These objects connect one or more Command objects to a Dataset object. They provide logic that would get data from the data store and populates the tables in the Dataset, or pushes the changes in the Dataset back into the data store.
• An OleDbDataAdapter object is used with an OLE-DB provider
• A SqlDataAdapter object uses Tabular Data Services with MS SQL Server.

(B)What are basic methods of Data adapter?


There are three most commonly used methods of Data adapter:-

Fill: -

Executes the Select Command to fill the Dataset object with data from the data source. It an also be used to update (refresh) an existing table in a Dataset with changes made to the data in the original data source if there is a primary key in the table in the Dataset.

FillSchema :-

Uses the SelectCommand to extract just the schema for a table from the data source, and creates an empty table in the DataSet object with all the corresponding constraints.Update:- Calls the respective InsertCommand, UpdateCommand, or DeleteCommand for each inserted, updated,or deleted row in the DataSet so as to update the original data source with the changes made to the content of the DataSet. This is a little like the UpdateBatch method provided by the ADO Recordset object, but in the DataSet it can be used to update more than one table.

(B) What is Dataset object?


The Dataset provides the basis for disconnected storage and manipulation of relational data. We fill it from a data store, work with it while disconnected from that data store, then reconnect and flush changes back to the data store if required.

(B) What are the various objects in Dataset?


Dataset has a collection of Data Table object within the Tables collection. Each Data Table object contains a collection of Data Row objects and a collection of Data Column objects. There are also collections for the primary keys, constraints, and default values used in this table, which is called as constraint collection, and the parent and child relationships between the tables. Finally, there is a Default View object for each table. This is used to create a Data View object based on the table, so that the data can be searched, filtered, or otherwise manipulated while displaying the data.

Note: - Look back again to the main diagram for ADO.NET architecture for visualizing this answer in pictorial form.

(B) How can we connect to Microsoft Access, FoxPro, and Oracle etc?


Microsoft provides System.Data.OleDb namespace to communicate with databases like success , Oracle etc. In short, any OLE DB-Compliant database can be connected using System.Data.OldDb namespace.

Note :- Small sample of OLEDB is provided in “WindowsAppOleDb” which uses “Nwind.mdb” in bin directory to display data in Listbox.


Private Sub loadData()
Dim strPath As String
strPath = AppDomain.CurrentDomain.BaseDirectory
Dim objOLEDBCon As New OleDbConnection(“Provider=Microsoft.Jet.OLEDB.4.0;Data Source =” & strPath & “Nwind.mdb”)
Dim objOLEDBCommand As OleDbCommand
Dim objOLEDBReader As OleDbDataReader
Try

objOLEDBCommand = New OleDbCommand(“Select FirstName from Employees”)
objOLEDBCon.Open()
objOLEDBCommand.Connection = objOLEDBCon

objOLEDBReader = objOLEDBCommand.ExecuteReader()
Do While objOLEDBReader.Read()
lstNorthwinds.Items.Add(objOLEDBReader.GetString(0))
Loop
Catch ex As Exception
Throw ex
Finally
objOLEDBCon.Close()
End Try

End Sub



The main heart is the “Load data ()” method which actually loads the data in list box.

Note:- This source code has the connectionstring hard coded in the program itself which is not a good programming practice. For windows application the best place to store connectionstring is “App.config”. Also note that “AppDomain.CurrentDomain.BaseDirectory” function gives the current path of the running exe which is “BIN” and the MDB file is in that directory. Also note that the final block which executes irrespective that there is error or not. Thus ensuring that all the connection to the datastore is freed. Its best practice to put all clean up statements in finally block thus ensuring that the resources are deallocated properly.

(B) How do we connect to SQL SERVER, which namespace do we use?


Below is the code, after the code we will try to understand the same in a more detailed manner. For this sample, we will also need a SQL Table setup, which I have imported, using the DTS wizard.

Private Sub LoadData()
‘ note :- with and end with makes your code more readable
Dim strConnectionString As String
Dim objConnection As New SqlConnection
Dim objCommand As New SqlCommand
Dim objReader As SqlDataReader
Try
‘ this gets the connectionstring from the app.config file.
‘ note if this gives error see where the MDB file is stored in your pc and point to thastrConnectionString = AppSettings.Item(“ConnectionString”)
‘ take the connectiostring and initialize the connection object
With objConnection
.ConnectionString = strConnectionString
.Open()
End With
objCommand = New SqlCommand(“Select FirstName from Employees”)
With objCommand
.Connection = objConnection
objReader = .ExecuteReader()
End With
‘ looping through the reader to fill the list box
Do While objReader.Read()
lstData.Items.Add(objReader.Item(“FirstName”))
Loop
Catch ex As Exception
Throw ex
Finally
objConnection.Close()
End Try


<appSettings>
<add key=”Connectionstring” value=”Server=ERMBOM1-IT2;User ID=sa;Database=Employees”/>
</appSettings>

Note:- The above code is provided in CD in folder WindowsAppSqlClient”. Comments in the code do explain a lot but we will again iterate through the whole code later. “LoadData” is the main method which loads the data from SQL SERVER. Before running this code you have to install SQL SERVER in your machine. As we are dealing with SQLCLIENT we need to setup database in SQL SERVER. For this sample I have imported access “Nwind.mdb” in “SampleAccessDatabase” folder in CD in to SQlSERVER. Depending on computer you will also have to change the connectionstring in Web.config file.

For setting up the sample SQL table, we can use the DTS import wizard to import the table. See the below figure which is using data source as Microsoft Access. While importing the database author had, give the database name as “Employees”.

Figure: - 9.2 Loading “Nwind.mdb” in SQL SERVER for the sample

Figure :- 9.3 Load only the Employee table.

To make it simple we will only import the employee table as that is the only thing needed in our sample code.

Figure: - 9.4 View of loaded Employee table



Now from interview point of view definitely you are not going to say the whole source code, which is given in the book. Interviewer expects only the broader answer of what are the steps needed to connect to SQL SERVER. For fundamental sake author has explained the whole source code. In short, you have to explain the “Load Data” method in broader way. Following are the steps to connect to SQL SERVER:-

• First imports the namespace “System.Data.SqlClient”.
• Create a connection object as shown in “Load Data” method.

With objConnection
.Connection String = strConnectionString
.Open ()
End With


• Create the command object with the SQL. Also, assign the created connection object to command object and execute the reader.
ObjCommand = New SqlCommand (“Select First Name from Employees”)

With objCommand
.Connection = objConnection
Breeder = .Execute Reader ()
End With

• Finally loop through the reader and fill the list box. If old VB programmers are expecting the move next command it is replaced by Read () which returns true if there is any data to be read. If the .Read () return is false that means that it’s end of data reader and there is no more data to be read.



Do while objReader.Read ()
lstData.Items.Add (objReader.Item (“First Name”))
Loop

• Do not forget to close the connection object.

Note:- In “LoadData” you will see that connectionstring is stored in Web.config file and is loaded using “AppSettings.Item(“ConnectionString”)”. While running this sample live on your database do not forget to change this connectionstring accordingly to your machine name and SQL SERVER or else the source code will not run.

Other Interview question PDF's

.NET Interview Question PDF

Project Management interview questions

Download Networking Interview Questions

Download Software Testing Interview Questions

Download Sql Server Interview Questions

Download C# and ASP .Net Projects

Download Java Interview Questions

Download Software Architecture Interview Questions

Download Excel Question and Answers

 

 

Repost 0
Published by questpond.over-blog.com
write a comment
October 28 2010 5 28 /10 /October /2010 16:19

Caching Interview Questions Part 1
Get Interview tutorials and videos on .NET 3.5, 4.0, Caching, SQL Server, CAS, Security, WCF, SharePoint, Azure, OOPS and many more on www.questpond.com

 


(B) What is an application object?

(I) what is the difference between Cache object and application object?

(I) How can get access to cache object?

(A) What are dependencies in cache and types of dependencies?

(A) Can you show a simple code showing file dependency in cache?

(A) What is Cache Callback in Cache?

(A) What is scavenging?

(B) What are different types of caching using cache object of ASP. NET?

(B) How can you cache different version of same page using ASP. NET cache object?

(A) How will implement Page Fragment Caching?

(B) Can you compare ASP. NET sessions with classic ASP?

(B) Which are the various modes of storing ASP.NET session?

(A) Is Session End event supported in all session modes?

(A) What are the steps to configure State Server Mode?

(A) What are the steps to configure State Server Mode?

(A) What are the steps to configure SQL Server mode?

(A) Where do you specify session state mode in ASP.NET?

(B) What are the other ways you can maintain state?

(B) What are benefits and Limitation of using Hidden fields?

(B) What is View State?

(A) Does the performance for view state vary according to User controls?

(B) What are benefits and Limitation of using View state for state management?

(B) How can you use Hidden frames to cache client data ?

(I) What are benefits and limitations of using Hidden frames?

(I) What are benefits and limitations of using Cookies?

(I) What is Query String and What are benefits and limitations of using Query Strings?

(I) How do we access view state value of this page in the next page ?

(I) Can we post and access view state in another application?

(I) What is SQL Cache Dependency in ASP.NET 2.0?

Introduction

 

In this section we will touch base on one of important concepts in .Net Caching. You can download my .NET Interview Question PDF from http://www.questpond.com/SampleDotNetInterviewQuestionBook.zip .

I have also put all these design patterns in a video format and uploaded on http://www.questpond.com/FreeDesign1.htm . You can visit http://www.questpond.com and download the complete architecture interview questions PDF which covers SOA , UML , Design patterns , Togaf , OOPs etc.

Happy job hunting......

(B) What is an application object?


Application object can be used in situation where we want data to be shared across users globally.

(I) what is the difference between Cache object and application object?


The main difference between the Cache and Application objects is that the Cache object provides cache-specific features, such as dependencies and expiration policies.

(I) How can get access to cache object?


The Cache object is defined in the ‘System.Web.Caching’ namespace. You can get a reference to the Cache object by using the Cache property of the Http Context class in the ‘System.Web’ namespace or by using the Cache property of the Page object.

(A) What are dependencies in cache and types of dependencies?


When you add an item to the cache, you can define dependency relationships that can force that item to be removed from the cache under specific activities of dependencies. Example if the cache object is dependent on file and when the file data changes you want the cache object to be update. Following are the supported dependency:-
• File dependency: - Allows you to invalidate a specific cache item when a disk based file or files change.
• Time-based expiration: - Allows you to invalidate a specific cache item depending on predefined time.
• Key dependency:- Allows you to invalidate a specific cache item depending when another cached item changes.

(A) Can you show a simple code showing file dependency in cache?

Partial Class Default_aspx

Public Sub display Announcement()
Dim announcement As String

If Cache(“announcement”) Is Nothing Then
Dim file As New _
System.IO.StreamReader _
(Server.MapPath(“announcement.txt”))
announcement = file.ReadToEnd
file. Close()
Dim depends As New _
System.Web.Caching.CacheDependency _
(Server.MapPath(“announcement.txt”))
Cache.Insert(“announcement”, announcement, depends)
End If
Response.Write(CType(Cache(“announcement”), String))
End Sub

Private Sub Page_Init(ByVal sender As Object, By Val e As System.EventArgs) Handles Me. nit
display Announcement()
End Sub
End Class

Note:- Above source code can be obtained from CD in “CacheSample” folder.”Announcement.txt” is in the same folder which you can play around to see the results.

 Above given method display Announcement() displays banner text from Announcement.txt file which is lying in application path of the web directory. Above method, first checks whether the Cache object is nothing, if the cache object is nothing then it moves further to load the cache data from the file. Whenever the file data changes the cache object is removed and set to nothing.

(A) What is Cache Callback in Cache?


Cache object is dependent on its dependencies example file based, time based etc...Cache items remove the object when cache dependencies change.ASP.NET provides capability to execute a callback method when that item is removed from cache.

(A) What is scavenging?


When server running your ASP. NET application runs low on memory resources, items are removed from cache depending on cache item priority. Cache item priority is set when you add item to cache. By setting the cache item priority controls, the items scavenging are removed according to priority.

(B) What are different types of caching using cache object of ASP. NET?


You can use two types of output caching to cache information that is to be transmitted to and displayed in a Web browser:
• Page Output Caching
Page output caching adds the response of page to cache object. Later when page is requested page is displayed from cache rather than creating the page object and displaying it. Page output caching is good if the site is fairly static.
• Page Fragment Caching
If parts of the page are changing, you can wrap the static sections as user controls and cache the user controls using page fragment caching.

(B) How can you cache different version of same page using ASP. NET cache object?


Output cache functionality is achieved by using “OutputCache” attribute on ASP. NET page header. Below is the syntax

<%@ Output Cache Duration="20" Location="Server" Vary By Param="state" Vary By Custom="minor version" Vary By Header="Accept-Language"%>

 • Vary By Param: - Caches different version depending on input parameters send through HTTP POST/GET.
• Vary By Header: - Caches different version depending on the contents of the page header.
• Vary By Custom: -Lets you customize the way the cache handles page variations by declaring the attribute and overriding the Get Vary By Custom String handler.
• Vary By Control: -Caches different versions of a user control based on the value of properties of ASP objects in the control.

(A) How will implement Page Fragment Caching?


Page fragment caching involves the caching of a fragment of the page, rather than the entire page. When portions of the page are need to be dynamically created for each user request this is best method as compared to page caching. You can wrap Web Forms user control and cache the control so that these portions of the page do not need to be recreated each time.

(B) Can you compare ASP. NET sessions with classic ASP?


ASP. NET session caches per user session state. It basically uses “HttpSessionState” class.
Following are the limitations in classic ASP sessions:-
• ASP session state is dependent on IIS process very heavily. So if IIS restarts ASP session variables are also recycled.ASP.NET session can be independent of the hosting environment thus ASP. NET session can be maintained even if IIS reboots.
• ASP session state has no inherent solution to work with Web Farms.ASP.NET session can be stored in state server and SQL SERVER which can support multiple server.
• ASP session only functions when browser supports cookies.ASP.NET session can be used with browser side cookies or independent of it.

(B) Which are the various modes of storing ASP.NET session?


In Proc: - In this mode Session, state is stored in the memory space of the Aspnet_wp.exe process. This is the default setting. If the IIS reboots or web application restarts then session state is lost.
State Server:-In this mode Session state is serialized and stored in a separate process (Aspnet_state.exe); therefore, the state can be stored on a separate computer (a state server).
SQL SERVER: - In this mode Session, state is serialized and stored in a SQL Server database.
Session state can be specified in <session State> element of application configuration file. Using State Server and SQL SERVER session state can be shared across web farms but note this comes at speed cost as ASP. NET needs to serialize and desterilize data over network repeatedly.

(A) Is Session End event supported in all session modes?


Session End event occurs only in “Inproc mode”. “State Server” and “SQL SERVER” do not have Session End event.

(A) What are the steps to configure State Server Mode?


Following are the things to remember so that State Server Mode works properly:-
• State Server mode session data is stored in a different process so you must ensure that your objects are serializable.
• <machine Key> elements in Web.config should be identical across all servers. So this ensures that encryption format is same across all computers.
• IIS meta base (\LM\W3SVC\2) must be identical across all servers in that farm.

(A) What are the steps to configure SQL Server mode?


Following are the things to remember so that SQL SERVER Mode works properly:-
• SQL SERVER mode session data is stored in a different process so you must ensure that your objects are serializable.
• IIS met abase (\LM\W3SVC\2) must be identical across all servers in that farm.
• By default Session objects are stored in “Temped”, you can configure it store outside “TempDB” by running Microsoft provided SQL script.

Note:- “TempDB” database is re-created after SQL SERVER computer reboot.If you want to maintain session state with every reboot best is to run SQL Script and store session objects outside “TempDB” database.

(A) Where do you specify session state mode in ASP.NET?


<sessionState mode=”SQLServer”
stateConnectionString=”tcpip=192.168.1.1:42424"
sqlConnectionString=”data source=192.168.1.1; Integrated Security=SSPI”
cookieless=”false”
timeout=”20"
/>
Above is sample session state mode specified for SQL SERVER.

(B) What are the other ways you can maintain state?


Other than session variables, you can use the following technique to store state:
• Hidden fields
• View state
• Hidden frames
• Cookies
• Query strings

(B) What are benefits and Limitation of using Hidden fields?


Following are the benefits of using Hidden fields:-
• They are simple to implement.
• As data is cached on client side, they work with Web Farms.
• All browsers support hidden field.
• No server resources are required.
Following are limitations of Hidden field:-
• They can be tampered creating a security hole.
• Page performance decreases if you store large data, as the data are stored in pages itself.
• Hidden fields do not support rich structures as HTML hidden fields are only single valued. Then you have to work around with delimiters etc to handle complex structures.
Below is how you will actually implement hidden field in a project

<input id="Hidden Value" type="hidden" value="Initial Value" run at="server" NAME="Hidden Value">

(B) What is View State?


View state is a built-in structure for automatically retaining values amongst the multiple requests for the same page. The view state is internally maintained as a hidden field on the page but is hashed, providing greater security than developer-implemented hidden fields do.

 

(A) Does the performance for view state vary according to User controls?


Performance of view state varies depending on the type of server control to which it is applied. Label, Text Box, Check Box, Radio Button, and Hyper Link are server controls that perform well with View State. Drop Down List, List Box, Data Grid, and Data List suffer from poor performance because of their size and the large amounts of data making roundtrips to the server.

(B) What are benefits and Limitation of using View state for state management?


Following are the benefits of using View state:-
• No server resources are required because state is in a structure in the page code.
• Simplicity.
• States are retained automatically.
• The values in view state are hashed, compressed, and encoded, thus representing a higher state of security than hidden fields.
• View state is good for caching data in Web frame configurations because the data is cached on the client.
Following are limitation of using View state:-
• Page loading and posting performance decreases when large values are stored because view state is stored in the page.
• Although view state stores data in a hashed format, it can still be tampered because it is stored in a hidden field on the page. The information in

the hidden field can also be seen if the page output source is viewed directly, creating a potential security risk.
Below is sample of storing values in view state.

this. View State ["Enter Time"] = Date Time. Now. To String();

(B) How can you use Hidden frames to cache client data ?


This technique is implemented by creating a Hidden frame in page which will contain your data to be cached.
<FRAMESET cols="100%,*,*">
<FRAMESET rows="100%">
<FRAME src="data_of_frame1.html"></FRAMESET>
<FRAME src="data_of_hidden_frame. html">
<FRAME src="data_of_hidden_frame.html" frame border="0" no resize scrolling="yes">
</FRAMESET>

Above is a sample of hidden frames where the first frame “data_of_frame1.html” is visible and the remaining frames are hidden by giving whole col section to first frame. 100 % is allocated to first frame and remaining frames thus remain hidden.

(I) What are benefits and limitations of using Hidden frames?


Following are the benefits of using hidden frames:
• You can cache more than one data field.
• The ability to cache and access data items stored in different hidden forms.
• The ability to access JS crept ® variable values stored in different frames if they come from the same site.
The limitations of using hidden frames are:
• Hidden frames are not supported on all browsers.
• Hidden frames data can be tampered thus creating security hole.

(I) What are benefits and limitations of using Cookies?


Following are benefits of using cookies for state management:-
• No server resources are required as they are stored in client.
• They are light weight and simple to use

Following are limitation of using cookies:-
• Most browsers place a 4096-byte limit on the size of a cookie, although support for 8192-byte cookies is becoming more common in the new

browser and client-device versions available today.
• Some users disable their browser or client device’s ability to receive cookies, thereby limiting the use of cookies.
• Cookies can be tampered and thus creating a security hole.
• Cookies can expire thus leading to inconsistency.
Below is sample code of implementing cookies

Request. Cookies. Add (New Http Cookie (“name”, “user1”))

(I) What is Query String and What are benefits and limitations of using Query Strings?


A query string is information sent to the server appended to the end of a page URL.

Following are the benefits of using query string for state management:-
• No server resources are required. The query string containing in the HTTP requests for a specific URL.
• All browsers support query strings.

Following are limitations of query string:-
• Query string data is directly visible to user thus leading to security problems.-
• Most browsers and client devices impose a 255-character limit on URL length.
Below is a sample “Login” query string passed in URL http://www.querystring.com/login.asp?login=testing.
This query string data can then be requested later by using Request.QueryString(“login”).

(I) What is Absolute and Sliding expiration?


Absolute Expiration allows you to specify the duration of the cache, starting from the time the cache is activated. The following example shows that the cache has a cache dependency specified, as well as an expiration time of one minute.

Cache. Insert ("announcement", announcement, depends, _
DateTime.Now.AddMinutes(1), Nothing)

Sliding Expiration specifies that the cache will expire if a request is not made within a specified duration. Sliding expiration policy is useful whenever you have a large number of items that need to be cached, because this policy enables you to keep only the most frequently accessed items in memory. For example, the following code specifies that the cache will have a sliding duration of one minute. If a request is made 59 seconds after the cache is accessed, the validity of the cache would be reset to another minute:

Cache.Insert("announcement", announcement, depends, _
Date Time. Max Value, _
TimeSpan.FromMinutes(1))

(I) What is cross page posting?


Note :- This is a new feature in ASP. NET 2.0

 By default, button controls in ASP. NET pages post back to the same page that contains the button, where you can write an event handler for the post. In most cases this is the desired behavior, but occasionally you will also want to be able to post to another page in your application. The Server. Transfer method can be used to move between pages, however the URL does not change. Instead, the cross page-posting feature in ASP .NET 2.0 allows you to fire a normal post back to a different page in the application. In the target page, you can then access the values of server controls in the source page that initiated the post back.
To use cross page posting, you can set the PostBackUrl property of a Button, Link Button or Image Button control, which specifies the target page. In the target page, you can then access the Previous Page property to retrieve values from the source page. By default, the Previous Page property is of type Page, so you must access controls using the Find Control method. You can also enable strongly-typed access to the source page by setting the @Previous Page Type directive in the target page to the virtual path or Type name of the source page.
Here is a systematic guide for implementing the cross-page post back using controls that implement the I Button Control interface.
• Create a Web Form and insert a Button control on it using the VS .NET designer.
• Set the button's PostBackUrl property to the Web Form you want to post back. For instance in this case it is "nextpage.aspx"

<asp: Button ID="Button1" run at="server"
PostBackUrl="~/nextpage.aspx" Text="Post to next page" />


When the PostBackUrl property of the I Button Control is set, the ASP .NET framework binds the corresponding HTML element to new JavaScript function named Web Form _Do Post Back With Options. The corresponding HTML rendered by the ASP .NET 2.0 will look like this:

<input type="submit" name="Button1" value="Post to Page 2" on click="java script: Web Form_ Do Post Back With Options (new Web Form_ Post Back Options("Button1", ",false”,"Page2.aspx", false, false))" id="Button1" />

(I) How do we access view state value of this page in the next page ?


View state is page specific; it contains information about controls embedded on the particular page. ASP.NET 2.0 resolves this by embedding a hidden input field name, __POST BACK. This field is embedded only when there is an IButtonControl on the page and its PostBackUrl property is set to a non-null value. This field contains the view state information of the poster page. To access the view state of the poster page, you can use the new Previous Page property of the page:

Page poster = this. Previous Page;

 Then you can find any control from the previous page and read its state:

Label poster Label = poster. find Control ("my Label");
string lbl = poster Label. Text;

This cross-page post back feature also solves the problem of posting a Form to multiple pages, because each control, in theory, can point to different post back URL.

(I) Can we post and access view state in another application?


You can post back to any page and pages in another application, too. However, if you are posting pages to another application, the PreviousPage property will return null. This is a significant restriction, as it means that if you want to use the view state, you are confined, for example, posting to pages in the same virtual directory. Even so, this is a highly acceptable addition to the functionality of ASP.NET.

(I) What is SQL Cache Dependency in ASP.NET 2.0?


SQL cache dependencies is a new feature in ASP.NET 2.0 which can automatically invalidate a cached data object (such as a Dataset) when the related data is modified in the database. So for instance if you have a dataset, which is tied up to, a database tables any changes in the database table will invalidate the cached data object which can be a dataset or a data source.

Other Interview question PDF's

.NET Interview Question PDF

 

Project Management interview questions

Download Networking Interview Questions

Download Software Testing Interview Questions

Download Sql Server Interview Questions

Download C# and ASP .Net Projects

Download Java Interview Questions

Download Software Architecture Interview Questions


 

Repost 0
Published by questpond.over-blog.com
write a comment
October 28 2010 5 28 /10 /October /2010 16:17

Get Interview tutorials and videos on .NET 3.5, 4.0, Pessimistic, Optimistic, Locking, SQL Server, CAS, Security, WCF, SharePoint, Azure, OOPS and many more on www.questpond.com


(I) How do we enable SQL Cache Dependency in ASP.NET 2.0?

(I) What is Post Cache substitution?

(I) Why do we need methods to be static for Post Cache substitution?

 

Introduction

 

In this section we will touch base on one of important concepts in .Net Caching. You can download my .NET Interview Question PDF from SampleDotNetInterviewQuestionBook .

I have also put all these design patterns in a video format and uploaded on http://www.questpond.com/FreeDesign1.htm . You can visit http://www.questpond.com and download the complete architecture interview questions PDF which covers SOA , UML , Design patterns , Togaf , OOPs etc.

Happy job hunting......

(I) How do we enable SQL Cache Dependency in ASP.NET 2.0?


Below are the broader steps to enable a SQL Cache Dependency:-
• Enable notifications for the database.
• Enable notifications for individual tables.
• Enable ASP.NET polling using “web.config” file
• Finally use the Cache dependency object in your ASP.NET code
Enable notifications for the database.
Before you can use SQL Server cache invalidation, you need to enable notifications for the database. This task is performed with the aspnet_regsql.exe command-line utility, which is located in the c:\[WinDir]\Microsoft.NET\Framework\[Version] directory.
aspnet_regsql -ed -E -d Northwind


-ed :- command-line switch
-E: - Use trusted connection
-S: - Specify server name it other than the current computer you are working on
-d: - Database Name


So now, let us try to understand what happens in the database because of “aspnet_regsql.exe”. After we execute the “aspnet_regsql -ed -E -d Northwind” command you will see one new table and four new stored procedures created.

 

 

Figure 5.1: - SQL Cache table created for notification

 

Essentially, when a change takes place, a record is written in this table. The SQL Server polling queries this table for changes.

 

Figure 5.2: - New stored procedures created

 


Just to make brief run of what the stored procedures do.


“AspNet_SqlCacheRegisterTableStoredProcedure” :- This stored procedure sets a table to support notifications. This process works by adding a notification trigger to the table, which will fire when any row is inserted, deleted, or updated.


“AspNet_SqlCacheUnRegisterTableStoredProcedure”:- This stored procedure takes a registered table and removes the notification trigger so that notifications won't be generated.


“AspNet_SqlCacheUpdateChangeIdStoredProcedure”:- The notification trigger calls this stored procedure to update the AspNet_SqlCacheTablesFor ChangeNotification table, thereby indicating that the table has changed.
Asp Net_Sql Cache Query Registered Tables Stored Procedure:- This extracts just the table names from the AspNet_SqlCacheTablesForChangeNotification table. It is used to get a quick look at all the registered tables.
AspNet_SqlCachePollingStoredProcedure:- This will get the list of changes from the AspNet_SqlCacheTablesForChangeNotification table. It is used to perform polling.

 

Enabling notification for individual tables

 
Once the necessary stored procedure and tables are created then we have to notify saying which table needs to be enabled for notifications.
That can be achieved by two ways:-

• aspnet_regsql -et -E -d Northwind -t Products
• Exec spNet_SqlCacheRegisterTableStoredProcedure 'TableName'
Registering tables for notification internally creates triggerfor the tables. For instance, for a “products” table the following trigger is created. So any modifications done to the “Products” table will update the “AspNet_SqlCacheNotification’ table.


CREATE TRIGGER

dbo.[Products_AspNet_SqlCacheNotification_Trigger] ON
[Products]
FOR INSERT, UPDATE, DELETE
AS
BEGIN
SET NOCOUNT ON
EXEC dbo.AspNet_SqlCacheUpdateChangeIdStoredProcedure
N'Products‘
END

 
“AspNet_SqlCacheTablesForChangeNotification” contains a single record for every table you're monitoring. When you make a change in the table (such as inserting, deleting or updating a record), the change Id column is incremented by 1.ASP.NET queries this table repeatedly keeps track of the most recent changed values for every table. When this value changes in a subsequent read, ASP.NET knows that the table has changed.

Figure 5.3: - Entries in the Cache notification table

 

Enable ASP.NET polling using “web.config” file
Now that all our database side is configured in order to get the SQL Cache working in the ASP.NET side we need to do some configuration in the web.config file.
We need to set two attributes in the “web.config” file:-
• Set “Enabled” attribute to true to set the caching on.
• Set the poll time attribute to the number of milliseconds between each poll
Below is the snapshot of the web.config file.

 

 

Figure 5.4:- Web.config file modifications for SQL cache

 

Finally use the Cache dependency object in your ASP.NET code
Now comes the final step to use our cache dependency with programmatic data caching, a data source control, and output caching.
For programmatic data caching, we need to create a new SqlCacheDependency and supply that to the Cache.Insert() method. In the SqlCacheDependency constructor, you supply two strings. The first is the name of the database you defined in the element in the section of the web.config file e.g: Northwind. The second is the name of the linked table e.g: Products.

 

private static void CacheProductsList(List<ClsProductItem> products)
{SqlCacheDependency sqlDependency = new SqlCacheDependency("Northwind", "Products");
HttpContext.Current.Cache.Insert("ProductsList", products, sqlDependency, DateTime.Now.AddDays(1), Cache.NoSlidingExpiration);}
private static List<ClsProductItem> GetCachedProductList()
{return HttpContext.Current.Cache["ProductsList"] as List<ClsProductItem>;}

ClsProductItem is business class, and here we are trying to cache a list of ClsProductItem instead of DataSet or DataTable.
The following method is used by an ObjectDataSource Control to retrieve List of Products

 

public static List<ClsProductItem> GetProductsList(int catId, string sortBy)
{
//Try to Get Products List from the Cache
List<ClsProductItem> products = GetCachedProductList();
if (products == null)
{
//Products List not in the cache, so query the Database layer
ClsProductsDB db = new ClsProductsDB(_connectionString);
DbDataReader reader = null;
products = new List<ClsProductItem>(80);
if (catId > 0)
{
//Return Product List from the Data Layer
reader = db.GetProductsList(catId);
}
else
{
//Return Product List from the Data Layer
reader = db.GetProductsList();
}
//Create List of Products -List if ClsProductItem-
products = BuildProductsList(reader);
reader.Close();

//Add entry to products list in the Cache
CacheProductsList(products);

}
products.Sort(new ClsProductItemComparer(sortBy));

if (sortBy.Contains("DESC")) products.Reverse();
return products;

}

To perform the same trick with output caching, you simply need to set the SqlDependency property with the database dependency name and the table name, separated by a colon:

<%@ OutputCache Duration="600" SqlDependency="Northwind:Products" VaryByParam="none" %>
The same technique works with the SqlDataSource and ObjectDataSource controls:

<asp:SqlDataSource EnableCaching="True" SqlCacheDependency="Northwind:Products" ... />
Note:- ObjectDataSource doesn't support built in caching for Custom types such as the one in our example. It only supports this feature for DataSets and DataTables.

Just to make a sample check run the SQL Server profiler and see that does the SQL actually hit the database after the first run.


(I) What is Post Cache substitution?


Post cache substitution is used when we want to cache the whole page but also need some dynamic region inside that cached page. Some examples like QuoteoftheDay, RandomPhotos, and AdRotator etc. are examples where we can implement Post Cache Substitution.
Post-cache substitution can be achieved by two means:
• Call the new Response.WriteSubstitution method, passing it a reference to the desired substitution method callback.
• Add a <asp:Substitution> control to the page at the desired location, and set its methodName attribute to the name of the callback method.

 

Figure 5.5: - “Writesubstitution” in action

 

You can see we have a static function here “GetDateToString()”. We pass the response substitution callback to the “WriteSubstitution” method. So now, when ASP.NET page framework retrieves the cached page, it automatically triggers your callback method to get the dynamic content. It then inserts your content into the cached HTML of the page. Even if your page has not been cached yet (for example, it's being rendered for the first time), ASP.NET still calls your callback in the same way to get the dynamic content. So you create a method that generates some dynamic content, and by doing so you guarantee that your method is always called, and it’s content is never cached.
Ok the above example was by using “WriteSubstitution” now lets try to see how we can do by using “<asp:substitution>” control. You can get the “<asp:substitution>” control from the editor toolbox.

 

Figure 5.6: - Substitution Control

 

Figure 5.7: - Substitution in Action

 


Below is a sample code that shows how substitution control works. We have ASPX code at the right hand side and class code at the behind code at the left hand side. We need to provide the method name in the “methodname” attribute of the substitution control.

(I) Why do we need methods to be static for Post Cache substitution?


ASP.NET should be able to call this method even when there is not an instance of your page class available. When your page is served from the cache, the page object is not created. Therefore, ASP.NET skips the page life cycle when the page is coming from cache, which means it will not create any control objects or raise any control events. If your dynamic content depends on the values of other controls, you will need to use a different technique, because these control objects will not be available to your callback

Other Interview question PDF's

.NET Interview Question PDF

Project Management interview questions

Download Networking Interview Questions

Download Software Testing Interview Questions

Download Sql Server Interview Questions

Download C# and ASP .Net Projects

Download Java Interview Questions

Download Software Architecture Interview Questions

Download Excel Question and Answers

 

 

Repost 0
Published by questpond.over-blog.com
write a comment
October 27 2010 4 27 /10 /October /2010 21:07

SOA ( Service oriented architecture Interview questions Part 1)
Get Interview tutorials and videos on .NET 3.5, 4.0, Pessimistic, Optimistic, Locking, SQL Server, CAS, Security, WCF, SharePoint, Azure, OOPS and many more on www.questpond.com




(B) What is SOA?

(I) In SOA do we need to build systems from scratch?

(I) Can you explain business layers and plumbing layers in SOA?

(I) what’s the difference between services and components?

(A) Can you describe the complete architecture of SOA?

(I) Can you explain a practical example in SOA?

(I) What are ends, contract, address, and bindings?

(I) Are web-services SOA ?

Introduction

In my previous section we had concentrated on design patterns and UML which is one of the most important fundamentals for architecture interviews. One of the other areas other than both of them which needs to be stronger for architects is understanding of SOA.

Again i repeat do not think you get an architecture position by reading interview questions. But yes there should be some kind of reference which will help you quickly revise what are the definition. Just by reading these answers you get to a position where you are aware of the fundamentals. But if you have not really worked you will surely fail with scenario based questions. So use this as a quick revision rather than a shot cut.

To give you a practical understanding i have put all these design patterns in a video format and uploaded on http://www.questpond.com/FreeDesign1.htm . You can visit http://www.questpond.com and download the complete architecture interview questions PDF which covers SOA , UML , Design patterns , Togaf , OOPs etc.

Happy job hunting......

(B) What is SOA?

SOA stands for service oriented architecture. Before we define SOA lets first define a service. In real world service is what we pay for and we get the intended service. For instance you go to a hotel and order food. Your order first goes to the counter and then it goes to the kitchen where the food is prepared and finally the waiter serves the food.


Figure: - Hotel and services


So in order to order a item from a hotel you need the three logical departments / services to work together (counter, kitchen and waiter).

In the same manner in software world these services are termed as business services. They are self contained and logical. So let’s first define a business service, SOA definition will be just an extension of the same.

Definition of business service: - It’s a logical encapsulation of self contained business functionality.

For instance figure ‘order system’ shows a simple ordering system which is achieved by different services like payment gateway, stock system and delivery system coming together. All the services are self contained and logical. They are like black boxes. In short we do not need to understand the internal details of how the business service works. For the external world it’s just a black box which takes messages and serves accordingly. For instance the ‘payment gateway’ business service takes message ‘check credit’ and gives out output does the customer have credit or not. For the ‘order system’ business service ‘payment gateway’ service is a black box.

Figure: - Order system


Now let’s revise some bullet points of SOA before we arrive to a definition of SOA.

SOA components are loosely coupled. When we say loosely coupled means every service is self contained and exist in alone logically. For instance we take the ‘payment gateway’ service and attach it to a different system.

SOA services are black boxes. In SOA services hide there inner complexities. They only interact using messages and send services depending on those messages. By visualizing services as black boxes services become more loosely coupled.

SOA service should be self defined: - SOA services should be able to define themselves.

SOA Services are maintained in a listing: - SOA services are maintained in a central repository. Applications can search the services in the central repository and use them accordingly.

SOA components can be orchestrated and linked to achieve a particular functionality. SOA services can be used/orchestrated in a plug and play manner. For instance figure ‘Orchestration’ shows two services ‘Security service’ and ‘Order processing service’. You can achieve two types of orchestrations from it one you can check the user first and then process order or vice-versa. Yes you guessed right using SOA we can manage work flow between services in a loosely coupled
fashion.

Figure: - Orchestration

So lets define SOA.

SOA is a architecture for building business applications using loosely coupled services which act like black boxes and can be orchestrated to achieve a specific functionality by linking together.

(I) In SOA do we need to build systems from scratch?


No. If you need to integrate or make an existing system as a business service, you just need to create loosely coupled wrappers which will wrap your custom systems and expose the systems functionality in generic fashion to the external world.

(I) Can you explain business layers and plumbing layers in SOA?


In SOA we can divide any architecture in two layers. The first which has direct relevance to business as it carries out business functions. The second layer is a technical layer which talks about managing computer resources like database, web server etc. This division is needed to identify a service. Consider the figure ‘Simple order system’. It has various components which interact with each other to complete the order system functionality.


Figure: - Simple order System

The simple order system can be divided in to two layers (see figure ‘business and plumbing layer’ one which is business related and second which is more technical related. You can see the plumbing layer consisting of data access layer , AJAX , yes more of technical stuff.

Figure: - Business layer and plumbing layer

(I) what’s the difference between services and components?


Services are logical grouping of components to achieve business functionality. Components are implementation approaches to make a service. The components can be in JAVA, C#, C++ but the services will be exposed in a general format like Web Services.

(A) Can you describe the complete architecture of SOA?


Figure ‘Architecture of SOA’ shows a complete view of a SOA. Please note this architecture diagram is not tied up with implementation of Microsoft, IBM etc. It’s a general architecture. Any vendor who implements SOA needs to fulfill the below SOA components. How they do it is completely their own technological implementation.

Figure: - Architecture of SOA


The main goal of SOA is to connect disparate systems. In order that these disparate system work they should messages to each other. ESB (Enterprise service bus) acts like a reliable post office which guarantees delivery of messages between systems in a loosely coupled manner. ESB is a special layer which delivers messages between applications. In the figure we have shown a huge plump pipe. It’s not hardware or some wire etc. It’s a group of components/software which helps you to send and receive messages between the disparate applications. Do not try to code your own ESB, you can think of buying one from Microsoft, IBM, Oracle, progress etc.

SOA registry is like a reference database of services. It describes what each services do, where are they located and how can they communicate. It’s a central reference of meta-data for services.

SOA workflow allows us to define work flow using the services in SOA registry. We will read more about BPM in the further questions.

Service broker reads the work flow and takes services from the SOA registry and ties them together. Service brokers are normally middleware like EAI (Enterprise application Integration) products. You can get a list of decent EAI from Sun, Microsoft, and IBM etc.

Process manager is nothing but the collection of SOA registry, SOA workflow and service broker.

SOA supervisor is traffic cop ensuring that services do not have issues. It deals mainly with performance issues of the system so that appropriate service levels are met. If any of the services have performance problems it sends messages to the proper infrastructure to fix the issue.

Note: - The above explanation is of general architecture for SOA. Any vendor (Microsoft, IBM, SUN etc) who gives solution for SOA should have the above components in some or other manner. As this is a Software architecture book, we will not be covering specific vendor implementation. We would advise the reader to map the same to their vendor products for better understanding.


(I) Can you explain a practical example in SOA?

 

(I) What are ends, contract, address, and bindings?


These three terminologies on which SOA service stands. Every service must expose one or more ends by which the service can be available to the client. End consists of three important things where, what and how:-

Contract (What)

Contract is an agreement between two or more parties. It defines the protocol how client should communicate with your service. Technically, it describes parameters and return values for a method.

Address (Where)

An Address indicates where we can find this service. Address is a URL, which points to the location of the service.

Binding (How)

Bindings determine how this end can be accessed. It determines how communications is done. For instance, you expose your service, which can be accessed using SOAP over HTTP or BINARY over TCP. So for each of these communications medium two bindings will be created.

Below figure, show the three main components of end. You can see the stock ticker is the service class, which has an end hosted on www.soa.com with HTTP and TCP binding support and using Stock Ticker interface type.

Figure: - Endpoint Architecture


Note: - You can also remember the end point by ABC where A stands for Address, B for bindings and C for Contract.


(I) Are web-services SOA ?


SOA is a thinking, it’s an architectural concept and web service is one of the technical approach to complete it. Web services are the preferred standards to achieve SOA.

• In SOA we need the services to be loosely coupled. A web service communicates using SOAP protocol which is XML based which is very loosely coupled. It answers the what part of the service.
• SOA services should be able to describe themselves.WSDL describes how we can access the service.
• SOA services are located in a directory.UDDI describes where we can get the web service. This nothing but implementation of SOA registry.

 

Other Interview question PDF's

.NET Interview Question PDF

Project Management interview questions

Download Networking Interview Questions

Download Software Testing Interview Questions

Download Sql Server Interview Questions

Download C# and ASP .Net Projects

Download Java Interview Questions

Download Software Architecture Interview Questions



 

 

Article Source

Repost 0
Published by questpond.over-blog.com
write a comment
October 27 2010 4 27 /10 /October /2010 14:49

Introduction and Goal

In this article, we will try to understand the 4 important steps to consume web services directly in Ajax. In this sample, we will create a simple customer combo box as shown in the figure below. This customer combo box will be filled by calling the web service methods directly of the customer web service.

Here’s my small gift for all my .NET friends, a complete 400 pages FAQ Ebook which covers various .NET technologies like Azure, WCF, WWF, Silverlight, WPF, SharePoint and a lot more.  

Video Tutorial

This whole article is also demonstrated in video format which you can view from here.

Introduction

Normally consumption of web services happens as shown in the below figure. The browser Ajax controls calls the ASP.NET code and the ASP.NET code consumes the web service. But there are scenarios where you would like to call the web services directly from the Ajax JavaScript functions rather than calling via the behind code. This article will demonstrate how we can achieve the same.

Step 1: Create your Customer Class 

The first step is to create the customer class as shown below. So our customer class has 4 properties on customer id, first name, address and designation.

 public class Customers { // private properties private int _intCustomerID; private string _strFirstName; private string _strAddress; private string _strDesignation; // Public property and public int CustomerID { get { return _intCustomerID; } set { _intCustomerID = value; } } public string FirstName { get { return _strFirstName; } set { _strFirstName = value; } } 

Step 2: Create your Web Service

The next step is we need to create the web service which exposes the customer class to our UI. Below is a simple web service which has encapsulated customer collection. In the constructor, we are loading some dummy data into the list of customers as shown in the below code snippet:

 [System.Web.Script.Services.ScriptService] public class Customer : System.Web.Services.WebService { // Customer collection List<Customers> listcust = new List<Customers>(); public Customer () { //Load some dummy data in to customer collection. listcust.Clear(); Customers cust = new Customers(); cust.CustomerID = 1; cust.FirstName = "Taha"; cust.Address = "Live in India"; cust.Designation = "Software Developer"; listcust.Add(cust); cust = new Customers(); cust.CustomerID = 2; cust.FirstName = "Shyam"; cust.Address = "Live in Austrailia"; cust.Designation = "Web Designer"; listcust.Add(cust); cust = new Customers(); cust.CustomerID = 3; cust.FirstName = "Khadak"; cust.Address = "Live in London"; cust.Designation = "Architect"; listcust.Add(cust); } // This function exposes all customers to the end client’ [WebMethod] public List<Customers> LoadCustomers() { return listcust; } // This function helps us to get customer object based in ID [WebMethod] public Customers LoadSingleCustomers(int _customerid) { return (Customers)listcust[_customerid-1]; } 

We are also exposing two functions through the web service, one which gives out a list of customers and another which gives out individual customer data based on customer id.

Step 3: Reference your Web Service using the asp:servicereference

Using the ‘asp:ServiceReference’, we will then point the path to the ASMX file as shown in the below code snippet. This will generate the JavaScript proxy which can be used to call the customer object.

 <asp:ScriptManager ID="ScriptManager1" runat="server"> <Services> <asp:ServiceReference Path="Customer.asmx" /> </Services> </asp:ScriptManager> 

Step 4: Call the Webservice and the JavaScript Code

Once you have defined the proxy, you can now call the ‘Customer’ proxy directly to make method calls.

 function LoadAll() { Customer.LoadCustomers(LoadCustomerToSelectOption, ErrorHandler, TimeOutHandler); } 

When you call the JavaScript proxy object, we need to provide three functions; the first function (‘LoadCustomerToSelectOption’) will be called when the web service finishes and returns data. The data will be returned in the fill variable which will then be looped and added to the customer combo box.

 function LoadCustomerToSelectOption(Fill) { var select = document.getElementById("cmbCustomers"); for (var i = 0; i < Fill.length; i++) { var value = new Option(Fill[i].FirstName, Fill[i].CustomerID); select.options.add(value); } } 

There are two more functions which are attached; one which handles error and the other which handles time out. Below are the code snippets for the same:

 function ErrorHandler(result) { var msg = result.get_exceptionType() + "\r\n"; msg += result.get_message() + "\r\n"; msg += result.get_stackTrace(); alert(msg); } function TimeOutHandler(result) { alert("Timeout :" + result); } 

History

  • 20th February, 2010: Initial post

Article Source

Repost 0
Published by questpond.over-blog.com
write a comment

Important .NET and C# interview questions and answers

.Net interview questions: - Explain why it is not preferred to use finalize for clean up?

.Net interview questions: - Show the five levels in CMMI?

.NET interview questions and answers: – Which is the best place to store connection string in .NET projects?

C# interview questions and answers: – Explain the use of Icomparable in c#?

C# interview questions: - How can we check which rows have changed since dataset was loaded?

C# interview questions and answers: - Can you write a simple c# code to display Fibonacci series?

.NET interview questions and answers: - What is difference betweenIcomparable VS Icomparer ?

C# and .NET interview question: -What is short circuiting in C#?

C# and .NET interview question: - What are symmetric and asymmetric algorithms?

Important c# and .NET interview question on object pooling and Gridview events?

.NETinterview questions and answers: – Will the finally run in this code?

How to prepare for c# and .NETinterviews?

C# and .NET Interview questions: - What is Thread.Join () in threading?

.NET Interview questions and answers: -What is serialization and deserialization in .NET?

C# and .NET interview question: - What is hashing?

c# and .NET interview question:- what connects dataset and data source ?

.Net interview questions and answers: - What is the difference between “Web.config” and “Machine.Config”?

.NET interview questions and answers: - What is TPL?

.NET Interview questions and answers: -What are different access modifiers?

.NET and c# Interview Question and answers: – If we want to update interface with new methods, what is the best practice?

 MVC ( Model view controller) interview questions and answers      

ASP.NET Application and Page Life Cycle 

12 Important FAQ’s on VSTS Testing (Unit testing, load testing, automated testing, database testing and code coverage) 

 6 important use of Partial/Mock testing

6 important uses of Delegates and Events

7 Simple Steps to Run Your First Azure Blob Program

8 Steps to Create Workflows using SharePoint Designer

Azure FAQ Part 1

C# Code Reviews using StyleCop – Detailed Article

Four real world uses of Partial classes and Partial methods

SharePoint Quick Start FAQ Part 1

SharePoint Quick Start FAQ Part 6 – Workflows, Workflows and Workflows

SharePoint Workflow Basics

 

 

 

 

MVC Interview questions videos

Viewdata,viewbag,tempdata

 

MVC asynch controllers

What is View Model in ASP.NET MVC?



ADO.NET interview questions videos



Explain ADO.NET Connection pooling

 

 

Windows Phone Application Questions Videos

 

How to create a simple windows phone application ?

 

 

MVC Interview questions and answers Article

 

(Model view controller)MVC Interview questions and answers

MVC interview questions with answers video: – What is Web API how to implement the same?

ASP.Net MVC  4 interview questions with answers: - What is Bundling and minification in Model view controller ?

MVC interview questions with answers :- Is it possible to return values instead of Actionresults?

MVC interview questions with answers :- What are the actionresults available in MVC?

MVC interview questions with answers:-Html.PartialvsHtml.RenderPartialvsHtml.RenderPage in MVC

MVC ASP.NET INTERVIEW QUESTIONS WITH ANSWERS :- WHAT IS THE DIFFERENCE BETWEEN VIEWSTATE VS VIEWDATA ?

MVC vs ASP.NET ( MVC Interview question with answers )?

How can we detect that a MVC controller is called by POST or GET ? ( ASP.NET MVC Interview questions with answers)

What are the different ways by which you will get Form Data in controller? ( MVC Interview questions with answers)

What is the difference between Presenter and Controller in MVC?(MVC interview questions with answers)

Learn MVC (Model view controller) Step by Step in 7 days – Day 4

MVC Interview questions and answers PDF

MVC interview questions with answers

ActionResult vs. View() vs. ViewResult :- MVC interview questions with answers

Explain Areas in MVC?( MVC interview questions with answers)

Can you explain the purpose of ViewModel in MVC?( ASP.NET MVC Interview questions with answers)

ASP.NET MVC interview questions: - What are Filters in MVC?

What are areas in MVC?( MVC Interview questions with answers)

Explain the concept of View Model in MVC?

Exception Handling in MVC

Explain MVC application life cycle?


100 MVC Interview question PDF download released , Enjoy


Learn Microsoft Business intelligence step by step – Day 1


Can you create TempBag just like ViewBag?( MVC Interview questions)


MVC Unit Testing Unleashed

MVC and .NET learning tutorials for components of MVC and how do you perform unit testing in MVC?

Explain MVC model binders ? ( ASP.NET MVC interview questions)

Explain the difference between layout and master pages ? (MVC Razor interview questions)

Advantages of ViewModel in MVC(Model View Controller)

Difference Between ViewResult() and ActionResult() in MVC ?

What is the difference between each version of MVC 2, 3, 4, 5 and 6? (MVC Interview Questions)

Learn ASP.NET MVC 5 Step by Step in 30 days – Day 1

Can we overload MVC controller action methods ? (MVC Polymorphism) 

Can we overload Actions / Controllers in MVC? (MVC Interview questions)

 


WCF Interview questions videos

 

overloading in WCF

WCF fault exceptions ?

 

 

 

 

WPF Interview question with answers videos

 

Why WPF and compare WPF with Winforms ?

 

 

C# Interview Questions & Answers Article

 

12 Important FAQ’s on VSTS Testing (Unit testing, load testing, automated testing, database testing and code coverage)

6 important use of Partial/Mock testing

6 important uses of Delegates and Events

7 Simple Steps to Run Your First Azure Blob Program

8 Steps to Create Workflows using SharePoint Designer

Azure FAQ Part 1

C# Code Reviews using StyleCop – Detailed Article

Four real world uses of Partial classes and Partial methods

SharePoint Quick Start FAQ Part 1

SharePoint Quick Start FAQ Part 6 – Workflows, Workflows and Workflows

SharePoint Workflow Basics

C# (Csharp) interview questions and answers: – What are indexers in .NET?

C# OOP interview questions and answers: - I do not want to implement all the interface methods?

C# design pattern (UNIT of Work Design Pattern)

C# design pattern interview questions – What is Dependency injection ?

C# interview questions and answers: - What is the difference between “==” and .Equals()?

How questions are asked in c# interviews?

C# design pattern interview question: - DI vs IOC

8 important C# Interview questions on IL code, JIT, CLR, CTS, CLS and CAS

What is the difference between Reflection and Dynamic in C#?

C# and .NET interview question: – When should we use Structure as compared to classes
?

C# REST interview questions with answers asked in Polaris Hydrebad

c# threading interview questions :- Parallel.ForEach vs Task.Factory.StartNew

C# circular dependency interview questions with answers.

C# Design pattern interview questions with answers: - How Singleton is different from Static class?

C# and .NET interview questions with answers: - How can we mark a method as deprecated?

C# INTERVIEW QUESTIONS WITH ANSWERS: - HOW TO ASSIGN MULTILINE STRING IN VISUAL STUDIO?

What is cyclomatic complexity (C# testing interview questions with answers)?

Define code coverage? (C# unit testing interview questions with answers)

Can you talk about Abstraction and Encapsulation in detail ? ( .NET, c# and OOP interview questions with answers )

Can you explain a practical example of virtual and Override? ( C# OOP interview questions with answers )

Can you explain class and object in real time scenario? ( C# and .NET OOP Interview questions with answers)

What is code digger ? ( C# visual studio interview questions with answers)

C# Lazy loading interview questions with answers

What is eager loading in c# ( C# eager loading interview questions with answers)?

Can you explain the term concurrency? (C# Interview questions with answers)

10 important C# Constructor and destructor interview questions

3 important c# Partial class interview questions with answers

Change Functionality without changing function( C# Architecture interview question with answers)?

What is ENUM and what are the benefits of using it (ENUM C# Interview Question 1)?

How can we loop through ENUM values( C# ENUM Interview questions with answers)?

What is the difference between Connection Timeout and Command Timeout?( C# ADO.NET Interview questions with answers)

How you differentiate Shadowing with Overriding? (C# overriding interview questions)

C# date and time interview question with answers

Explain the difference between early binding and late binding? ( C# interview questions with answers)

How can we restrict types in generics ?( C# generic interview questions)

What are generics, Delegates and Generic delegates ( C# interview questions)?

How can we convert JSON string in to c# object?(  C# JSON interview questions)

C# and .NET interview questions asked in TCSwalkin.

C# and .NET interview questions on Coalescing operator.

String vs string ( C# interview questions with answers)

Explain SOLID principles (C# Architecture interview questions)?

C# and .NET interview questions around Read only and Constant

C# Architecture interview questions with answers

C# Mock testing interview questions and answers: – What is Mock testing and how can we implement Mocking?

Write a simple regex for email validation? (C# interview questions with answers)


C#.NET interview questions: - What is the use of “Yield” keyword? Mention atleast one practical scenario where it can be used?

C#.NET interview questions: - What is the difference between Build Vs Rebuild Vs Clean solution menu? What is the difference “Rebuild” and if you do “Clean” + “Build”?

C# and .NET interview questions around JIT and NGEN


What is the difference between throw vs throw ex ?( C# Interview questions with answers)

C#/.NET interview questions: - What are the steps included to get a collection of records from database in C#?


Learn C# in Hindi video tutorials


QuestPond’s real life examples on Extension methods and nullable types in C#.NET


Why Microsoft has partial classes and Java does not?

 

 

 

WCF INTERVIEW QUESTIONS AND ANSWERS ARTICLE

 

 

WCF INTERVIEW QUESTIONS AND ANSWERS: - WHAT IS THE DIFFERENCE BETWEEN SERVICE ENDPOINT AND CLIENT ENDPOINT

 

WCF INTERVIEW QUESTIONS WITH ANSWERS: - WCF REST VS. WEB API

 

WCF INTERVIEW QUESTIONS WITH ANSWERS :- CAN WE HAVE METHOD OVERLOADING WHILE DEFINING WCF SERVICE OPERATIONS ?

 

WCF INTERVIEW QUESTIONS WITH ANSWERS :- WHAT IS DATACONTRACTSERIALIZER AND HOW IT’S DIFFERENT FROM XMLSERIALIZER 

What is SOA and what is WCF? ( WCF interview questions with answers)

Six important WCF interview questions with answers

6 important WCF Instancing interview questions with answers

WCF Service metadata interview questions with answers

7 WCF SOA interview questions with answers

What are the various ways of consuming WCF services?(WCF C# interview questions with answers)

What is the difference between Serialization and Encoding in WCF?( WCF interview questions with answers)

Why returning dataset or data table from WCF service is not a good practice?(WCF service interview questions with answers)

WCF transaction interview questions: - How transaction works in WCF?

WCF Transaction interview questions.

.NET WCF(Windows Communication Foundation) interview questions: - Distinguish between Web Services and Remoting | WCF and Web services

WCF interview questions: - What exactly do you mean by Single in WCF instancing? How to set and what is by default set value of instance context mode?

Explain WCF Duplex services? ( WCF Interview questions)

QuestPond: Interview Questions and Answers on learning WCF

WCF Interview Questions: - What are the different ways of doing WCF concurrency and WCF instancing?

QuestPond: Interview Questions and Answers on learning WCF (Windows Communication Foundation)

QuestPond: Interview Questions and Answers on learning WCF (Windows Communication Foundation)

QuestPond: Interview Questions and Answers on WCF(Windows Communication Foundation)

QuestPond: Interview Questions and Answers on learning WCF (Windows Communication Foundation)

QuestPond’s Interview Questions & Answers on learning data contract serializer and XML serializer

QuestPond’s Interview Questions & Answers on learning serialization events

QuestPond’s Interview Questions & Answers on learning WCF(Windows Communication Foundation)

QuestPond’s Interview Questions & Answers on WCF(Windows Communication Foundation)


QuestPond’s Interview Questions & Answers on WCF(Windows Communication Foundation)

QuestPond’s Interview Questions & Answers on WCF (Windows Communication Foundation)


QuestPond’s Interview Questions & Answers on WCF (Windows Communication Foundation)

 

 

 

WPF Interview Questions And Answers Article

 

 

6 IMPORTANT WPF AND SILVERLIGHT MULTI-THREADING INTERVIEW QUESTIONS WITH ANSWERS

 

C# WPF INTERVIEW QUESTIONS::- WHAT ARE DEPENDENCY PROPERTIES ?

 

WPF INTERVIEW QUESTIONS WITH ANSWERS: – WHAT ARE WPF CONVERTERS?

 

WPF INTERVIEW QUESTIONS ON EVENTS (TUNNELING, BUBBLING AND DIRECT)

 

What are the advantages of using WPF ( WPF interview questions with answers)?

 

Explain WPF bindings?( .Net WPF Binding interview questions)

 

WPF Interview questions with answers :-What is XAML in WPF and why do we need it?

 

What are the different kinds of controls in WPF?(C# WPF Interview questions with answers)

 

Can you explain the complete WPF object hierarchy?(WPF Interview questions with answers)

How does “UpdateSourceTrigger” affect bindings?( C# WPF interview questions with answers)

WPF Interview questions :- Which are the different namespaces and classes in WPF ?

What are resources in WPF? (C# WPF Interview questions with answers)

Explain multi binding and multivalue converters? (.NET WPF  Interview questions with answers)

Explain the difference between static and dynamicresource? (.NET WPF interview questions)

18 important WPF interview questions asked in WPF interviews.

.NET WPF(Windows Presentation Foundation) interview questions: - What is WPF? What are the advantages of WPF over Winforms?

Explain WPF relative binding / relative resource? (.NET WPF Interview questions with answers)

Explain Ancestor relative source binding in WPF ? ( WPF Interview questions with answers)

Explain the need of binding and commands?(WPF Interview questions)

Can you explain WPF command with an example? ( WPF Interview questions with answers)

Explain the need of “INotifyPropertyChanged” interface? ( C# WPF Interview questions with answers)

What is MVVM? (WPF MVVM Interview questions)

What is the importance of command and bindings in MVVM pattern? ( WPF MVVM Interview questions)

What is the difference between MVVM and 3 layer architecture? ( WPF  MVVM Interview questions with answers)

Explain delegate command? (WPF MVVM interview questions)

WPF Interview questions with answers

Explain WPF styles?(C# WPF Interview questions with answers)

Explain Multitrigger concept in WPF?( C# WPF Interview questions with answers)

How are WPF observable collections different from simple .NET collections? (.NET WPF Interview questions)

What is the difference between control templates and data templates? ( .NET WPF Interview questions)

What are various ways of doing alignment in WPF?( WPF Interview questions with answers)

 

Algorithm Interview Questions


Algorithm interview questions and answers: – Can you write code for bubble sort algorithm?

Algorithm interview questions and answers: – What is inserted sort algorithm?

SQL INTERVIEW QUESTIONS & ANSWERS ARTICLE

 

SQL Server Interview Questions & Answers Article

SQL Server interview questions and answers: - What is HID data type in SQL Server ?

SQL Server interview questions with answers: – How to get the top record without using max, top and order by keyword?

SQL Server interview questions with answers :- If you wish to store financial values which SQL Server data type is more suitable ?

SQL Server interview questions and answers: – What is the difference between Candidate Key, Primary Key, and Alternate Key

SQL Server interview questions with answers :- What are Indexes in Sql Server?

How to sort interactively using SSRS? (SQL Server reporting services interview questions)

How to do conditional formatting in SSRS? (SQL Server reporting services interview questions with answers)

WHAT IS NORMALIZATION AND EXPLAIN 1NF 2NF AND 3NF IN SIMPLE WORDS? SQL SERVER INTERVIEW QUESTIONS WITH ANSWERS

What is the difference between Stored Procedures and Function (SQL Server interview question with answers)?

 

When you will use inner join and when you will use outer join? SQL Server interview questions with answers

 

Do you know anything about Temporary procedures in SQL?( SQL Server interview questions with answers)

 

4 SQL Server interview questions with answers on TempTb

 

Are full outer join and Cross join are same? ( SQL Server interview questions with answers)

 

Delete duplicate records: - SQL Server interview questions with answers

 

4 most asked  SQL queries during SQL Serverinterview’s

 

How Temporary tables are different from normal tables and what are its types ?( SQL Server interview questions with answers)

 

SQL Server interview Questions on JOIN’s

 

SQL Server interview questions: - How can you increase SQL performance?

 

SQL Server interview questions: - What problem you face if locking is not implemented?

 

Can we insert NULL’s in to UNIQUE key ? ( SQL Server  interview questions with answers)

 

Explain Normalization?(SQL Server Interview questions with answers)

Temp variablesVS Temp tables(SQL Server interview questions)

 


 




.NET INTERVIEW QUESTIONS & ANSWERS ARTICLE

 

.NET interview questions and answers: - How to reverse a string in .NET ( DotNet)?

.NET interview questions and answers: - What is the use of Click Once?

.NET interview questions and answers: - Will the below codes create new instances?

C# and .NET interview questions with answers – What is Nuget?

Dependency injection (DI) VS Inversion of Control (IOC)

.NET interview questions with answers: - What is the difference between Reflection and Dynamic?

Five Great .NET Framework 4.5 Features

ASP.NET MVC 4 interview questions with answers: - What is the use of “AllowHTML” and “ValidateInput” attributes?

.NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala

.NET interview questions with answers: – Can we use events without delegates ?

.Net Interview question Edition 6 is available now.

.NET interview questions with answers: – What’s the difference between catch with parameter and catch without parameter?

.NET interview questions : - What is the use and difference between “IS” and “AS” keyword?

.NET interview questions with answers: - Build solution VS Rebuild solution VS Clean solution

HTML 5 interview questions with answers for LocalStorage and SessionStorage

.NET 4.0 interview questions with answers: – What are code contracts?

What are portable class libraries? ( .NET interview questions with answers)

How to loop through ENUM using C# (.NET interview questions with answers)?

What are transactions in C#? (.NET interview questions with answers)

What are ACID Properties( .NET Interview questions with answers)?

.NET interview questions: – What are the areas that need to be concentrated for senior(9+ years experience)persons in .NET technologies?

.NET interview questions: - Explain real time scenarios in Factory Pattern, Abstract Pattern, Singleton, WCF and REST services

What is the difference between IS A and Can a Relationship?( .NET Interview questions with answers)

What is the use of ENUM Flags(.NET Enum Interview question 2)?

What is the difference between .Net,C#, Asp.net, Asp.net Web Forms and Asp.net MVC and MVC?( C# and ASP.NET Interview questions)

ADO.NET interview questions: - Explain in detail the fundamental of connection pooling?

.NET interview questions: – Can you explain generics in .NET?

What are Properties and methods ? ( .NET OOP Interview questions with answers)

What’s the first step you take for implementing any of Design Pattern?( .NET  Design pattern interview questions with answers)

.NET interview questions: - What are different types of JIT?

ADO.NET Interview Question: - What are the major differences between classic ADO and ADO.NET?

.NET interview questions: – What is the difference between Reflection and Dynamic?

What is the Use of interfaces?( .NET Interview questions with answers)

.NET interview questions: - What role did you play in your project and company?

Visual studio 2012 Fakes

.NET interview questions: - So how can we clean unmanaged objects and also maintain performance?

ADO.NET Interview Questions: - What are basic methods of Data adapter?

.NET interview questions: - What are system level exceptions and application level exceptions?

.NET interview questions: - What is UML and which are the important diagrams?

.NET interview questions: - What is time out support in regex (regular expression)?

.NET interview questions: - How can we improve performance of .NET?

.NET interview questions: - Can you explain the concept of “Short Circuiting”?

.NET interview questions: - Can you explain Forms authentication in detail?

What is the difference between VAR and Dynamic keyword? ( .NET Interview questions with answers)

.NET interview questions: - What are similarities and difference between Class and structure?

Can you compare String.IsNullOrEmpty vs String.IsNullOrWhiteSpace ? ( .Net Interview questions with answers)

.NET interview questions: - Distinguish between Reflection and Dynamic?

.NET interview questions: - In which scenarios we can use serialization and when to use what binary serialization or XML serialization?

.NET interview questions: - Are there any readymade objects in .NET by which we can implement Lazy loading?

.NET interview questions: - What are different access modifiers?

ADO.NET interview questions: - Explain in detail the fundamental of connection pooling how to enable and disable connection pooling?

ADO.NET interview questions: - What is the namespace in which .NET has the data functionality class?

ADO.NET interview questions: - What are the different components in ADO.NET?

ADO.NET interview questions: - Show difference between “Optimistic” and “Pessimistic” locking and how many ways are there to implement optimistic locking in ADO.NET?

.NET interview questions: - Does code contract only do dynamic checks?

ADO.NET interview questions: - How can we fire a simple SQL Statement using ADO.NET?

.NET interview questions: - What basic steps are needed to display a simple report in crystal?

ADO.NET interview questions: - What are basic methods of Data adapter and mention the use of data adapter?

.NET interview questions: - What is UML? How many types of diagrams are there in UML?

.Net Interview Questions - What is MVC, MVP and MVVM pattern?

.NET interview questions: - How can you define a property read only for external world and writable in the same assembly?

Explain the implicit and explicit conversion of data types with examples?( .NET interview questions on data type)

.NET interview questions: - What is Reflection its implementation and practical uses?

What is downcasting and upcasting? (.NET interview questions with answers)

.NET interview questions: - How to decide on the design consideration to take a Data grid, data list or repeater?

.NET interview questions: - If we want to update interface with new methods, what is the best practice?

.NET interview questions: - How does selection sort algorithm works?

XML(.NET) interview questions: - What is XML?

.NET Interview questions: - If a validation is very complex what will you do?

.NET interview questions: - How can we stop the class from further inheriting?

XML (.NET) Interview questions :- Explain simple Walk through of XmlReader.

.NET interview questions : - How can we improve performance of .NET and show the difference between .NET 1.X, 2.0, 3.0, 3.5 and 4.0?

How to convert string to ENUM value ?( .NET interview questions with answers)

.NET architecture interview questions series: - What is mean by modeling language?

.NET architecture interview questions : - What are benefits and Limitation of using Viewstate, hidden frames and Cookies?

.NET interview questions: - What is GAC (Global Assembly Cache)?

.NET interview questions: - Explain Nuget?

.NET Testing interview questions: - What is the difference between Unit testing, Assembly testing and Regression testing?


.NET interview questions: - What is Code Access Security (CAS) and how does it work? Is CAS supported in .NET 4.0?


.NET interview questions: - What are the advantages /disadvantages of lazy loading?


.NET interview questions: - What is the use of DEBUG directive?


.NET testing interview questions: - What is Mock testing and how to implement it?


.NET interview questions: - What is the difference between DEBUG and Release?


.NET testing interview questions: - How can we UNIT test private methods using VSTS? Is it good to practice to UNIT test Private methods?


Explain 3 layer architecture ( .NET Interview questions)?


.NET interview questions : - What is a delegate and how can we create a delegate? What is a multicast delegate?


ADO.NET interview questions: - How to add/remove row is in “Data Table” object of “Dataset”? How to load multiple tables in a Dataset & adding relation between tables in a Dataset?


What is the difference between Array, ArrayList and List?( .Net Interview questions)

.NET interview questions: - How to implement DTC in .NET?
.NET interview questions: - What is an Interface and what are abstract classes

.NET interview questions: - Interface vs. abstract class

.NET interview questions: - How to implement practically Lazy loading in .NET?


.NET interview questions: - How can we handle exceptions in .NET? What if we do not catch the exception?

.NET interview questions based on Projects.


.NET interview questions: - What is shadowing? What is the difference between Shadowing and Overriding?

.NET interview questions: - All about Design Patterns in .NET


.NET interview questions: - How can we improve performance of .NET/ASP.NET/SQL Server?

.NET interview questions: - What benefits does sealed keyword provide?


.NET Architecture UML interview question


.NET interview questions: - How to maintain performance and can clean unmanaged objects?


.NET interview questions: - Explain ENUM and its benefits? What is the use of Flagsin ENUM?

.NET interview questions: - How to create a windows service using .NET?

.NET interview questions: - Explain in details about Indexer and can we have static indexer in C#?

.NET interview questions: - What is the difference between arraylist and list? Are Arraylist faster or Arrays?

.NET interview questions: - What is Native Image Generator (Ngen.exe)? Does NGEN.EXE always improve performance?

.NET OOPS interview questions: - What is OOP? What are different properties provided by Object-oriented systems?

.NET OOPS interview questions: - How abstract with only abstract method is it different from interfaces? Also mention best practice to update interface with new methods?

.NET interview questions: - What is the difference between delegate and events? Can we have return type, access modifiers and shared events?

.NET interview questions: - What is Manifest? Where is the version information stored of an assembly? Is versioning applicable to private assemblies?

.NET Generics interview questions: - Explain Generics and concept of Generic Collection in .NET?

How to learn .NET: - In parent-child relationship which constructor will fire first and in which instances you will declare a constructor private?

Basics of .NET and learning tutorials on CTS and CLS


Online resource to learn .NET on Reflection and Dynamic

Online guide to learn .NET for Object initializer in C#?

QuestPond for Freshers on IL code, JIT, CLR, CTS, CLS and CAS

QuestPond: Interview Questions and Answers on AJAX and how does it help?



ASP.NET Interview Questions & Answers Article










MVC Interview Questions And Answers Article

 

(MODEL VIEW CONTROLLER)MVC INTERVIEW QUESTIONS AND ANSWERS

 

MVC INTERVIEW QUESTIONS WITH ANSWERS VIDEO: – WHAT IS WEB API HOW TO IMPLEMENT THE SAME?

 

ASP.NET MVC  4 INTERVIEW QUESTIONS WITH ANSWERS: - WHAT IS BUNDLING AND MINIFICATION IN MODEL VIEW CONTROLLER ?

 

MVC INTERVIEW QUESTIONS WITH ANSWERS :- IS IT POSSIBLE TO RETURN VALUES INSTEAD OF ACTIONRESULTS?

 

MVC INTERVIEW QUESTIONS WITH ANSWERS :- WHAT ARE THE ACTIONRESULTS AVAILABLE IN MVC?

 

MVC INTERVIEW QUESTIONS WITH ANSWERS:-HTML.PARTIALVSHTML.RENDERPARTIALVSHTML.RENDERPAGE IN MVC

MVC VS ASP.NET ( MVC INTERVIEW QUESTION WITH ANSWERS )?

 

HOW CAN WE DETECT THAT A MVC CONTROLLER IS CALLED BY POST OR GET ? ( ASP.NET MVC INTERVIEW QUESTIONS WITH ANSWERS)

 

WHAT ARE THE DIFFERENT WAYS BY WHICH YOU WILL GET FORM DATA IN CONTROLLER? ( MVC INTERVIEW QUESTIONS WITH ANSWERS)

 

WHAT IS THE DIFFERENCE BETWEEN PRESENTER AND CONTROLLER IN MVC?(MVC INTERVIEW QUESTIONS WITH ANSWERS)

 

LEARN MVC (MODEL VIEW CONTROLLER) STEP BY STEP IN 7 DAYS – DAY 4

 

MVC Interview questions and answers PDF

 

MVC interview questions with answers

 

ActionResult vs. View() vs. ViewResult :- MVC interview questions with answers

Explain Areas in MVC?( MVC interview questions with answers)

 

Can you explain the purpose of ViewModel in MVC?( ASP.NET MVC Interview questions with answers)

ASP.NET MVC interview questions: - What are Filters in MVC?

What are areas in MVC?( MVC Interview questions with answers)

Explain the concept of View Model in MVC? 

Exception Handling in MVC

Explain MVC application life cycle?

100 MVC Interview question PDF download released , Enjoy

How can we use two (multiple) models with a single view?(MVC Interview questions)

MVC HTML.Form vs Ajax.Form – MVC interview questions with answers

Learn Microsoft Business intelligence step by step – Day 1

Can you create TempBag just like ViewBag?( MVC Interview questions)

MVC Unit Testing Unleashed

MVC and .NET learning tutorials for components of MVC and how do you perform unit testing in MVC?

Explain MVC model binders ? ( ASP.NET MVC interview questions)

Explain the difference between layout and master pages ? (MVC Razor interview questions) 


ENTITY FRAMEWORK INTERVIEW QUESTIONS ARTICLE


Windows Workflow Foundation(WWF) interview questions with answers Article

XML Interview Questions With Answers Article


Explain XML,DTD and XSL?(XML interview questions with answers)

HTML 5 Interview questions With Answers Article

HTML 5 interview questions with answers for LocalStorage and SessionStorage

 

How is the page structure of HTML 5 different from HTML 4?( HTML 5 Interview questions with answers)

 

What is datalist in HTML 5 ( ASP.NET HTML interview questions)?

 

What are the different new form element types in HTML 5?( ASP.NET HTML 5 interview questions with answers)

 

What is output element in HTML 5?( ASP.NET HTML 5 interview questions)

 

What is the difference between Canvas and SVG graphics?(ASP.NET HTML 5 interview questions with answers)

 

ASP.NET HTML 5 interview questions on SVG and Canvas

ASP.NET HTML5 interview questions with answers

What are web workers and why do we need them ?( ASP.NET HTML interview questions with answers)

 

Why do we need HTML 5 server-sent events? (ASP.NET HTML interview questions)

How can we add and remove data from local storage?(ASP.NET HTML 5 interview questions)

What is local storage concept in HTML 5? ( ASP.NET HTML 5 interview questions)

What is the difference between local storage and cookies? ( ASP.NET HTML 5 interview questions)

What is WebSQL?( ASP.Net HTML 5 interview questions)

 

What is session storage and how can you create one?( ASP.Net HTML 5 interview questions with answers)

 

What is application cache in HTML5?( ASP.NET HTML 5 interview questions with answers)

ASP.NET HTML 5 Application cache interview questions with answers

 

Explain the term cascading in style sheet ? ( CSS Interview questions)

What is difference between DIV vs SPAN in HTML ?( ASP.Net Interview questions)

HTML 5 Canvas Interview questions: - Canvas in HTML 5.

QuestPond’s interview questions and answers on HTML 5

 

Learn HTML 5 in 3 days – Day 1

 

 

 

Dotnetspider Questions And Answers Article

 

 

What is downcasting and upcasting ? ( .NET interview questions with videos)

 

What is the difference between String vs string? ( C# interview questions) ?

 

 

JAVASCRIPT INTERVIEW QUESTIONS WITH ANSWERS ARTICLE

 


3 IMPORTANT JAVASCRIPT IMPORTANT INTERVIEW QUESTION WITH ANSWERS