Advanced c# and .NET Interview Questions and Answers Part 8

By // 1 comment:
1. ) What is a DiffGram Explain ?                                                                                              
  • A DiffGram is an XML format that is used to identify current and original versions of data elements.
  •  When sending and retrieving a DataSet from an XML Web service, the DiffGram format is implicitly used.
  • The DataSet uses the DiffGram format to load and persist its contents, and to serialize its contents for transport across a network connection. When a DataSet is written as a DiffGram, it populates the DiffGram with all the necessary information to accurately recreate the contents, though not the schema, of the DataSet, including column values from both the Original and Current row versions, row error information, and row order. 
2. ) How to use  DiffGram in xml web services ?                                                                 
  There are following way to use DiffGram in xml web Services.
<?xml version="1.0"?>
<diffgr:diffgram
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<DataInstance>
</DataInstance>

<diffgr:before>
</diffgr:before>

<diffgr:errors>
</diffgr:errors>
</diffgr:diffgram>

Descriptions:-
The DiffGram Format is divided into three sections as given below:-
1.) <DataInstance>
The name of this element, Data Instance, is used for explanation purposes in this documentation. A DataInstance element represents a DataSet or a row of a DataTable. Instead of Data Instance, the element would contain the name of the DataSet or DataTable. This block of the DiffGram format contains the current data, whether it has been modified or not. An element, or row, that has been modified is identified with the diffgr: has Changes annotation. 
2.) <diffgr:before
This block of the DiffGram format contains the original version of a row. Elements in this block are matched to elements in the DataInstance block using the diffgr:id annotation
3.) <diffgr:errors>
This block of the DiffGram format contains error information for a particular row in the DataInstance block. Elements in this block are matched to elements in the DataInstance block using the diffgr:id annotation. 
3. ) Where are the IIS log files stored ?                                                                                   
C:\WINDOWS\system32\Logfiles\W3SVC1
               OR
C:\winnt\system32\LogFiles\W3SVC1

4. ) What are the different IIS authentication modes in IIS 6.0 ?                                
There are different variety of authentication schemes of IIS.
  • Anonymous (enabled by default) authentication
  • Basic authentication
  • Digest authentication
  • Integrated Windows authentication (enabled by default) 
  • Client Certificate Mapping 
5. ) In which process does IIS (.exe file) runs ?                                                                   
inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI filter aspnet_isapi.dll takes care of it by passing the request to the actual worker process aspnet_wp.exe. 
6. ) What are the IIS isolation Levels ?                                                                                    
There are three isolation levels of IIS 5.0 .
  • Low(IIS Process)
  • Medium(pooled)
  • High(isolated)
7. ) How do I upload a file from my ASP.NET page ?                                                         
ReadDetails

8. ) How to send an email message from  ASP.NET page ?                                              
ReadDetails...

9. ) Can I pass SOAP messages through remoting?                                                            
Yes.
10. ) What is CAO and SAO Explain?                                                                                        
CAO means client activated Objects and SAO means Server activated objects.
  • Client Activated objects are those remote objects whose Lifetime is directly Controlled by the client. This is in direct contrast to SAO. Where the server, not the client has complete control over the lifetime of the objects. 
  • Client activated objects are instantiated on the server as soon as the client request the object to be created. Unlike as SAO a CAO doesn’t delay the object creation until the first method is called on the object. (In SAO the object is instantiated when the client calls the method on the object) 
11. ) What is singleton and singlecall Explain?                                                                     
  • Singleton types never have more than one instance at any one time. If an instance exists, all client requests are serviced by that instance.
  • Single Call types always have one instance per client request. The next method invocation will be serviced by a different server instance, even if the previous instance has not yet been recycled by the system. 
12. ) Are Web Services a replacement for other distributed computing platforms? 
No. Web Services is just a new way of looking at existing implementation platforms.

13. ) In webservice,Suppose we have to display 20 rows from a table who is best Dataset or DataReader ?
A WebService supports only Dataset. So Dataset is used,not DataReader.

Learn More .NET Interview Questions and Answers for Job Seekers
3

Readonly and Constant members in C# with Example

By // No comments:
1.) Read-only Field:-
The readonly keyword is  a modifier that you can use fields.When a field declaration includes a readonly modifier,assignments to the fields introduced by the declaration can only occur as part of the declaration or in a construction in the same class.You can learn constructor concepts more details.
You can assign a value to a readonly field only in the following way.
  • Variable can be initialized at declaration time.
           Ex. Public readonly int p=8;
  • For an instance field ,in the instance constructors of the class that contains the field declaration.
                                                                              OR
  • For a static field ,in the static constructor of the class that contains the field declaration .
  • You can also pass a readonly field as an out or ref parameter.
3

Advanced c# and .NET Interview Questions and Answers Part 7

By // No comments:
1.) How Garbage collector (GC) works in .NET ?                                                                 
In .NET,this class method influence when an object is garbage collected and when resources allocated by an object are released. Properties in this class provide information about the total amount of memory available in the system and the generation, or age category, of memory allocated to an object. Periodically, the garbage collector performs garbage collection to reclaim memory allocated to objects for which there are no valid references. Garbage collection happens automatically when a request for memory cannot be satisfied using available free memory. An application can force garbage collection using the Collect method.
There are following steps in Garbage collection as given below. 
  • The garbage collector searches for managed objects that are referenced in managed code. 
  • The garbage collector attempts to finalize objects that are not referenced. 
  • The garbage collector frees objects that are not referenced and reclaims their memory. 
3

How to use Gravatar images on your asp.net web forms easily

By // No comments:
Introduction:- The Gravatar control is an asp.net control that enables you to use gravatar images on your asp.net web pages.This control is very simple to use.You have to just set some Gravatar control's properties like Email, size,Rating DefaultImageBehavior, DefaultImage etc.For this, First you have to Register on http://www.gravatar.com .After that upload your required  images which you want to render on your website or blogs.You will get an URL link for every image.Here we will display gravatar images using help of gravatar control.
Before using this concepts you have to Install Ajax toolkit on your visual studio.
There are some properties of Gravatar control as given below:-
  1. Email :-This is a required property,You have an email associated with gravatar.
  2. Size:- This is helpful to render the customize size of images on web page.
  3. Rating:- This is helpful to display the acceptable rating of image.
  4. DefaultImageBehavior:-This property is helpful to display the image when a gravatar is not associated with an email account.There are some possible options as given below:-
  • MysteryMan:-This is helpful to display the same image of an anonymous profile of a man(a MysteryMan) for all unrecognized email.
  • Identicon:- This is helpful to generate different geometric pattern for each unrecognized email.
  • Wavatar:- This is helpful to generate a different face of image for unrecognized email.
  • MonsterId:-A different image of a monster is generated for each unrecognized email.
  • Retro:- This helpful to generate 8 bit arcade-style face for each unrecognized email.
     5.  DefaultImage:- This is required a URL of the image.This image will be displayed,if               the gravatar image can not be displayed because of unacceptable rating or the email                     account is not associated with gravatar.com.
3

How to Display Area Chart Graph on Asp.Net Website easily

By // No comments:
Hi Friend, Today we will learn "How to Draw a Graph of Area Chart on asp.net web page".Here we will calculate the production of the Wheat and Rice in different years in India. This is very simple ,you have to just focus on below concept.I have already draw many charts ,you can learn it from below links as given below.

Before implementing this concepts you have to Install Ajax Toolkit on your visual studio first.
There are some properties of Area chart graph as given below:-
3

How to Display Bubble Chart on ASP.NET Website using Ajax Technology

By // No comments:
Hi Friend, Today we will learn about Bubble chart concepts in ASP.NET.Here we will display the Students increased % marks in differnet subjects using Bubble chart.Previously i have already explained some charts also as given below:-
Before implementing this concepts you have to Install Ajax Toolkit on your visual studio first.
There are some properties of Bubble chart graph as given below:-
  • ChartHeight :- This is used to customize the Height of Bubble chart.
  • ChartWidth :- This is used to customize the Width of Bubble chart.
  • ChartTitle :-  This is used to set the title of the chart.
  • ChartTitleColor:-This is used to set the font color of the chart title.
  • BaseLineColor :-This is helpful to set the color of the base line of the chart.
  • XAxisLineColor:-This is used to set the color of the X Axis line of the chart. 
  • YAxisLineColor:-This is used to set the color of the Y Axis line of the chart. 
  • XAxisLine :- This is used to set the interval size for the X axis line of the chart.
  • YAxisLine :- This is used to set the interval size for the Y axis line of the chart.
  • BubbleSizes :-This is used to set the number of different sizes of the bubbles.
There are some BubbleChartValue Properties as given below:-
3
Powered by Blogger.