<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Development - Web Development Tutorial for Developer&#039;s, Asp.net Tutorial, PHP Development, Wordpress Integration &#187; ASP.NET</title>
	<atom:link href="http://www.solutions4ever.net/category/asp-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.solutions4ever.net</link>
	<description>Web Development Solutions Provider</description>
	<lastBuildDate>Fri, 03 Sep 2010 11:45:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Make PNG transparency work in Internet Explorer</title>
		<link>http://www.solutions4ever.net/2010/05/make-png-transparency-work-in-internet-explorer/</link>
		<comments>http://www.solutions4ever.net/2010/05/make-png-transparency-work-in-internet-explorer/#comments</comments>
		<pubDate>Fri, 28 May 2010 10:51:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.solutions4ever.net/?p=183</guid>
		<description><![CDATA[
<p>Create a container to store your image. In this case I use a &#60;div&#62;.
Create your &#60;div&#62; inside your &#60;body&#62;, just like this.</p>
<p>&#60;body&#62; &#60;div&#62;&#60;/div&#62; &#60;/body&#62;</p>
<p>Next, create a &#60;style&#62; if you dont have one. Make sure they are between your &#60;head&#62; &#60;/head&#62;. Put the following css inside.</p>
<p>&#60;style&#62;
body {background-color:#000}
div.flower {background:url(flower-transparent.png) no-repeat; height:100px; width:100px}
&#60;/style&#62;</p>
<p>The  ... <a href="http://www.solutions4ever.net/2010/05/make-png-transparency-work-in-internet-explorer/" class="expert-read-more" >Read More</a>]]></description>
			<content:encoded><![CDATA[<div id="TixyyLink">
<p>Create a container to store your image. In this case I use a &lt;div&gt;.<br />
Create your &lt;div&gt; inside your &lt;body&gt;, just like this.</p>
<p>&lt;body&gt; &lt;div&gt;&lt;/div&gt; &lt;/body&gt;</p>
<p>Next, create a &lt;style&gt; if you dont have one. Make sure they are between your &lt;head&gt; &lt;/head&gt;. Put the following css inside.</p>
<p>&lt;style&gt;<br />
body {background-color:#000}<br />
div.flower {background:url(flower-transparent.png) no-repeat; height:100px; width:100px}<br />
&lt;/style&gt;</p>
<p>The CSS codes above displays your PNG image in a &lt;div&gt;. Works fine for Mozilla Firefox, but not for Internet Explorer. To get it working cross browser, create another set of css just for Internet Explorer right below your &lt;style&gt; &lt;/style&gt;. Insert the following codes.</p>
<p>&lt;!–[if gte IE 5]&gt;<br />
&lt;style type=&#8221;text/css&#8221;&gt;<br />
div.flower {<br />
background:none;<br />
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’flower.png’ ,sizingMethod=’crop’);<br />
}<br />
&lt;/style&gt;<br />
&lt;![endif]–&gt;</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.solutions4ever.net/2010/05/make-png-transparency-work-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Declaring string arrays</title>
		<link>http://www.solutions4ever.net/2010/03/declaring-string-arrays/</link>
		<comments>http://www.solutions4ever.net/2010/03/declaring-string-arrays/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 06:16:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.solutions4ever.net/?p=161</guid>
		<description><![CDATA[<p>First, here we observe that there are some ways to declare and instantiate a string[] array local variable. They are all equivalent in the compiled code [see note], so choose the one you think is clearest to read.</p>
~~~ Program that initializes string arrays (C#) ~~~
 
class Program
{
    static void Main()
    {
  //  ... <a href="http://www.solutions4ever.net/2010/03/declaring-string-arrays/" class="expert-read-more" >Read More</a>]]></description>
			<content:encoded><![CDATA[<p>First, here we observe that there are some ways to declare and instantiate a string[] array local variable. They are all equivalent in the compiled code [see note], so choose the one you think is clearest to read.</p>
<pre><strong>~~~ Program that initializes string arrays (C#) ~~~</strong></pre>
<pre> </pre>
<pre>class Program</pre>
<pre>{</pre>
<pre>    static void Main()</pre>
<pre>    {</pre>
<pre>  // String arrays with 3 elements:</pre>
<pre>string[] <strong>arr1</strong> = new string[] { "one", "two", "three" }; // A</pre>
<pre>string[] <strong>arr2</strong> = { "one", "two", "three" };              // B</pre>
<pre>string<strong> arr3</strong> = new string[] { "one", "two", "three" };  // C</pre>
<pre> </pre>
<pre> string[] <strong>arr4</strong> = new string[3]; // D</pre>
<pre>        arr4[0] = "one";</pre>
<pre>        arr4[1] = "two";</pre>
<pre>        arr4[2] = "three";</pre>
<pre>    }</pre>
<pre>}</pre>
<p><strong>Description.</strong> The above Main function shows four string[] arrays, each equal to the compiler. The biggest difference is that the first three arrays are declared on one line, while the fourth array is assigned in separate statements. The fourth array would permit you to test each value or insert logic as you assign it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solutions4ever.net/2010/03/declaring-string-arrays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TCPDate Server / Client</title>
		<link>http://www.solutions4ever.net/2010/02/tcpdate-server-client/</link>
		<comments>http://www.solutions4ever.net/2010/02/tcpdate-server-client/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 06:52:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.solutions4ever.net/?p=92</guid>
		<description><![CDATA[<p>This is the implementation of &#8220;System.Net.Sockets&#8221;. In this example we will learn how to use the &#8220;TCPListener&#8221; and &#8220;TCPClient&#8221; classes from the &#8220;System.Net.Sockets&#8221; namespace. </p>
<p>This example consists of two files. The &#8220;DateServer&#8221; class which uses the &#8220;TCPListener&#8221; class to accept requests from new clients. Once the client is connected with  ... <a href="http://www.solutions4ever.net/2010/02/tcpdate-server-client/" class="expert-read-more" >Read More</a>]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: Arial; font-size: x-small;">This is the implementation of &#8220;System.Net.Sockets&#8221;. In this example we will learn how to use the &#8220;TCPListener&#8221; and &#8220;TCPClient&#8221; classes from the &#8220;System.Net.Sockets&#8221; namespace. </span></p>
<p><span style="font-family: Arial; font-size: x-small;">This example consists of two files. The &#8220;DateServer&#8221; class which uses the &#8220;TCPListener&#8221; class to accept requests from new clients. Once the client is connected with the server, the server will send it the the Current Date and Time and then disconnect it, and listen for more clients.<br />
The &#8220;DateClient&#8221; class uses the &#8216;TCPClient&#8221; class. It connects to the server on the specified port and send the clients name to the server upon connection.<br />
Once connected it receives the current Date Time from the server and then disconnects from the server.</p>
<p>Execution :<br />
1) Run the DateServer.exe first to start the server .(The server by default listens for connection on port 4554).<br />
2) Run the DateClient.exe which will connect to the server and get the current date time from it.</span></p>
<p><span style="font-size: x-small;">Code:<br />
1) <em>DateServer.cs :- The Date Time Server</em></span></p>
<div>
<pre><span style="font-family: Verdana; font-size: xx-small;">namespace SaurabhNet {
 using System;
 using System.Net.Sockets;
 using System.Net ;
 using System.Threading ;
 <span style="color: #0000cc;">//Import the necessary Namespaces</span>

 <span style="color: #0000cc;">//Class which shows the implementation of the TCP Date server</span>

 public class DateServer
 {
   private TCPListener myListener ;
   private int port = 4554 ;
   <span style="color: #0000cc;">//The constructor which make the TCPListener start listening on the
   //given port.
   //It also calls a Thread on the method StartListen(). </span>
   public DateServer()
   {
    try{
<span style="color: #0000cc;">//start listing on the given port</span>
  myListener = new TCPListener(port) ;
 myListener.Start();
 Console.WriteLine("Server Ready - Listining for new Connections ...") ;
<span style="color: #0000cc;">//start the thread which calls the method 'StartListen'</span>
 Thread th = new Thread(new ThreadStart(StartListen));
  th.Start() ;
 }
  catch(Exception e)
   {
 Console.WriteLine("An Exception Occured while Listing :"+e.ToString());
    }
    }

<span style="color: #0000cc;">//main entry point of the class</span>
 public static void Main(String[] argv)
 {
  DateServer dts = new DateServer();
 }
<span style="color: #0000cc;">//This method Accepts new connection and
    //First it receives the welcome massage from the client,
    //Then it sends the Current time to the Client.</span>
    public void StartListen()
 {
 while(true)
  {
<span style="color: #0000cc;">//Accept a new connection</span>
 Socket mySocket = myListener.Accept() ;
 if(mySocket.Connected)
 {
 Console.WriteLine("Client Connected!!") ;
<span style="color: #0000cc;">//make a byte array and receive data from the client </span>
 Byte[] receive = new Byte[64] ;
 int i=mySocket.Receive(receive,receive.Length,0) ;
  char[] unwanted = {' ',' ',' '};
 string rece = System.Text.Encoding.ASCII.GetString(receive);
   Console.WriteLine(rece.TrimEnd(unwanted)) ;
<span style="color: #0000cc;">//get the current date/time and convert it to string</span>
  DateTime now = DateTime.Now;
  String strDateLine ="Server: The Date/Time Now is: "
+ now.ToShortDateString()
  + " " + now.ToShortTimeString();
<span style="color: #0000cc;">// Convert to byte array and send</span>
  Byte[] byteDateLine=
Text.Encoding.ASCII.GetBytes(strDateLine.ToCharArray());
 mySocket.Send(byteDateLine,byteDateLine.Length,0);
				}
      }
    }
  }
} </span></pre>
<p> </p>
</div>
<p><span style="font-size: x-small;">2)<em> DateClient.cs:- The Date Time Client</em></span></p>
<div>
<pre><span style="font-family: Verdana; font-size: xx-small;">namespace SaurabhNet {
  using System ;
  using System.Net.Sockets ;
  using System.Net ;
  using System.Threading ;

  <span style="color: #0000cc;">//Class which shows the implementation of the TCP Date Client</span>
  public class DateClient
  {
    <span style="color: #0000cc;">//the needed member fields</span>
    private TCPClient tcpc;
    private string name ;
    private int port=4554 ;
    private bool readData=false ;

    <span style="color: #0000cc;">//Constructor which contains all the code for the client.
    //It connects to the server and sends the clients name,
    //Then it waits and receives the date from the server</span>
    public DateClient(string name)
    {
      <span style="color: #0000cc;">//a label</span>
      tryagain :
      this.name=name ;
      try
      {
      <span style="color: #0000cc;">//connect to the "localhost" at the give port
      //if you have some other server name then you can use that
     //instead of "localhost"</span>
      tcpc =new TCPClient("localhost",port) ;
      <span style="color: #0000cc;">//get a Network stream from the server</span>
      NetworkStream nts = tcpc.GetStream() ;
      <span style="color: #0000cc;">//if the stream is writiable then write to the server</span>
      if(nts.CanWrite)
      {
        string sender = "Hi Server I am "+name ;
 Byte[] sends =
 System.Text.Encoding.ASCII.GetBytes(sender.ToCharArray());
 nts.Write(sends,0,sends.Length) ;
<span style="color: #0000cc;">//flush to stream </span>
nts.Flush() ;

<span style="color: #0000cc;">//make a loop to wait until some data is read from
 the stream</span>
	while(!readData&amp;&amp;nts.CanRead)
	{
<span style="color: #0000cc;">//if data available then read from the stream</span>
  if(nts.DataAvailable)
      {
      byte[] rcd = new byte[128];
    int i=nts.Read( rcd,0,128);
string ree = System.Text.Encoding.ASCII.GetString(rcd);
 char[] unwanted = {' ',' ',' '};
  Console.WriteLine(ree.TrimEnd(unwanted)) ;
<span style="color: #0000cc;">//Exit the loop  </span>
  readData=true ;
 }
  }
}
catch(Exception e)
{
Console.WriteLine("Could not Connect to server because "+e.ToString());
<span style="color: #0000cc;">Here an exception can be cause if the client is started before starting
//the server.
//A good way to handle such exceptions and give the client
//a chance to re-try to connect to the server</span>
Console.Write("Do you want to try Again? [y/n]: ") ;
    char check = Console.ReadLine().ToChar();
if(check=='y'|| check=='Y')
goto tryagain ;
}
}

<span style="color: #0000cc;">//Main Entry point of the client class</span>
 public static void Main(string[] argv)
 {
<span style="color: #0000cc;">//check to see if the user has entered his name
 //if not ask him if he wants to enter his name.</span>
  if(argv.Length&lt;=0)
      {
 Console.WriteLine("Usage: DataClient ") ;
 Console.Write("Would You like to enter your name now [y/n] ?") ;
 char check = Console.ReadLine().ToChar();
 if(check=='y'|| check=='Y')
      {
  Console.Write("Please enter you name :") ;
 string newname=Console.ReadLine();
   DateClient dc = new DateClient(newname) ;
   Console.WriteLine("Disconnected!!") ;
  Console.ReadLine() ;
		}
      }
      else
      {
      DateClient dc = new DateClient(argv[0]) ;
      Console.WriteLine("Disconnected!!") ;
      Console.ReadLine() ;
      }
    }
  }
}</span></pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.solutions4ever.net/2010/02/tcpdate-server-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET 301 redirect</title>
		<link>http://www.solutions4ever.net/2010/02/asp-net-301-redirect/</link>
		<comments>http://www.solutions4ever.net/2010/02/asp-net-301-redirect/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 06:51:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.solutions4ever.net/?p=90</guid>
		<description><![CDATA[<p>When moving your pages from one place to another it is very tempting to handle old inlinks by creating a simple Response.Redirect( sNewPage, true );</p>
<p>This sure will work, but this type of redirect is a 302 and is meant for temporary relocations of pages. But your pages are permanently moved  ... <a href="http://www.solutions4ever.net/2010/02/asp-net-301-redirect/" class="expert-read-more" >Read More</a>]]></description>
			<content:encoded><![CDATA[<p>When moving your pages from one place to another it is very tempting to handle old inlinks by creating a simple Response.Redirect( sNewPage, true );</p>
<p>This sure will work, but this type of redirect is a 302 and is meant for temporary relocations of pages. But your pages are permanently moved and therefore you should use a 301 Moved Permanently status code. This should preserve your search engine rankings for that particular page.</p>
<p>To solve it you could install some sort of redirect filter(ISAPI dll). I was looking into those type of solutions and found IISMods URL Rewrite Filter for IIS. </p>
<p>Such a solution is very flexible and since it is a IIS filter it is possible to rewrite URL:s for all kind of filetypes, not only for aspx pages but say images (ex http://www.solutions4ever.net/*.gif could be transferred to http://www.hello.com/test/*gif ).</p>
<p>It is however not possible for everyone to install a ISAPI filter on their website, therefore I here present a solution on how you can achieve 301 redirects with pure ASP.NET code instead.</p>
<p>  In your old page you can write code such as</p>
<p>private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
 Response.Status = &#8220;301 Moved Permanently&#8221;;<br />
 Response.AddHeader(&#8220;Location&#8221;,&#8221;http://www.solutions4ever.net&#8221;);<br />
}</p>
<p>For me who wanted to redirect all calls to http://solutions4ever.net/articles/articles27.aspx to http://www.solutions4ever.net/articles/articles27.aspx<span style="color: #000000;"> </span> took and didn&#8217;t have to think about pictures, cause they were &#8220;base&#8221; linked with the application took the idea one step further.</p>
<p>I created a new web application to install on kbmentor.aspcode.net. Basically it only contains a global.asax which handles Application_BeginRequest like this:</p>
<p>  protected void Application_BeginRequest(Object sender, EventArgs e)<br />
  {<br />
   string sOldPath = HttpContext.Current.Request.Path.ToLower();<br />
   </p>
<p>   string sPage = &#8220;http://www.solutions4ever.net/articles/&#8221; + sOldPath;<br />
   Response.Clear();<br />
   Response.Status = &#8220;301 Moved Permanently&#8221;;<br />
   Response.AddHeader(&#8220;Location&#8221;,sPage);<br />
   Response.End();<br />
  }</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solutions4ever.net/2010/02/asp-net-301-redirect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# quations &#8211; answers</title>
		<link>http://www.solutions4ever.net/2010/02/c-quations-answers/</link>
		<comments>http://www.solutions4ever.net/2010/02/c-quations-answers/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 06:50:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.solutions4ever.net/?p=88</guid>
		<description><![CDATA[Good for preparation and general self-testing, but too specific for the actual job interview. This was sent in by a job applicant getting ready to step into the .NET field in India.

Are private class-level variables inherited? - Yes, but they are not accessible, so looking at it you can honestly  ... <a href="http://www.solutions4ever.net/2010/02/c-quations-answers/" class="expert-read-more" >Read More</a>]]></description>
			<content:encoded><![CDATA[<div>Good for preparation and general self-testing, but too specific for the actual job interview. This was sent in by a job applicant getting ready to step into the .NET field in India.</div>
<ol type="1">
<li><strong>Are private class-level variables inherited? </strong>- Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are.</li>
<li><strong>Why does DllImport not work for me? </strong>- All methods marked with the DllImport attribute must be marked as public static extern.</li>
<li><strong>Why does my Windows application pop up a console window every time I run it? </strong>- Make sure that the target type set in the project properties setting is set to Windows Application, and not Console Application. If you’re using the command line, compile with /target:winexe, not /target:exe.</li>
<li><strong>Why do I get an error (CS1006) when trying to declare a method without specifying a return type? </strong>- If you leave off the return type on a method declaration, the compiler thinks you are trying to declare a constructor. So if you are trying to declare a method that returns nothing, use void. The following is an example: // This results in a CS1006 error public static staticMethod (mainStatic obj) // This will work as wanted public static void staticMethod (mainStatic obj)</li>
<li><strong>Why do I get a syntax error when trying to declare a variable called checked? </strong>- The word checked is a keyword in C#.</li>
<li><strong>Why do I get a security exception when I try to run my C# app? </strong>- Some security exceptions are thrown if you are working on a network share. There are some parts of the frameworks that will not run if being run off a share (roaming profile, mapped drives, etc.). To see if this is what’s happening, just move the executable over to your local drive and see if it runs without the exceptions. One of the common exceptions thrown under these conditions is System.Security.SecurityException. To get around this, you can change your security policy for the intranet zone, code group 1.2, (the zone that running off shared folders falls into) by using the caspol.exe tool.</li>
<li><strong>Why do I get a <em>CS5001: does not have an entry point defined</em> error when compiling? </strong>- The most common problem is that you used a lowercase ‘m’ when defining the Main method. The correct way to implement the entry point is as follows: class test { static void Main(string[] args) {} }</li>
<li><strong>What optimizations does the C# compiler perform when you use the /optimize+ compiler option? </strong>- The following is a response from a developer on the C# compiler team: We get rid of unused locals (i.e., locals that are never read, even if assigned). We get rid of unreachable code. We get rid of try-catch with an empty try. We get rid of try-finally with an empty try. We get rid of try-finally with an empty finally. We optimize branches over branches: gotoif A, lab1 goto lab2: lab1: turns into: gotoif !A, lab2 lab1: We optimize branches to ret, branches to next instruction, and branches to branches.</li>
<li><strong>What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)? </strong>- The syntax for calling another constructor is as follows: class B { B(int i) { } } class C : B { C() : base(5) // call base constructor B(5) { } C(int i) : this() // call C() { } public static void Main() {} }</li>
<li><strong>What is the equivalent to regsvr32 and regsvr32 /u a file in .NET development? </strong>- Try using RegAsm.exe. Search MSDN on <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfassemblyregistrationtoolregasmexe.asp">Assembly Registration Tool</a>.</li>
<li><strong>What is the difference between a struct and a class in C#? </strong>- From language spec: The list of similarities between classes and structs is as follows. Longstructs can implement interfaces and can have the same kinds of members as classes. Structs differ from classes in several important ways; however, structs are value types rather than reference types, and inheritance is not supported for structs. Struct values are stored on the stack or in-line. Careful programmers can sometimes enhance performance through judicious use of structs. For example, the use of a struct rather than a class for a Point can make a large difference in the number of memory allocations performed at runtime. The program below creates and initializes an array of 100 points. With Point implemented as a class, 101 separate objects are instantiated-one for the array and one each for the 100 elements.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.solutions4ever.net/2010/02/c-quations-answers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dot Net Interview Quations 6</title>
		<link>http://www.solutions4ever.net/2010/02/dot-net-interview-quations-6/</link>
		<comments>http://www.solutions4ever.net/2010/02/dot-net-interview-quations-6/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 06:50:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.solutions4ever.net/?p=86</guid>
		<description><![CDATA[What is Serialization in .NET? 
Anwer1
The serialization is the process of converting the objects into stream of bytes.
they or used for transport the objects(via remoting) and persist objects(via files and databases)
<p>Answer2
When developing smaller applications that do not have a database (or other formal storage mechanism) or data that doesn’t need  ... <a href="http://www.solutions4ever.net/2010/02/dot-net-interview-quations-6/" class="expert-read-more" >Read More</a>]]></description>
			<content:encoded><![CDATA[<div><strong>What is Serialization in .NET? </strong><br />
Anwer1<br />
The serialization is the process of converting the objects into stream of bytes.<br />
they or used for transport the objects(via remoting) and persist objects(via files and databases)</div>
<p>Answer2<br />
When developing smaller applications that do not have a database (or other formal storage mechanism) or data that doesn’t need to be stored in a database (such as the state of a web application), you often still would like to save the data for later retrieval. There are many ways to do this, but many of them are subject to a lot of extra code (work) and extra time spent debugging. With .NET, there is now an easy way to add this functionality to your code with only a few lines of easily tested code. This easy way is called serialization.</p>
<p>Serialization is the process of storing an object, including all of its public and private fields, to a stream. Deserialization is the opposite – restoring an object’s field values from a stream. The stream is generally in the form of a FileStream, but does not have to be. It could be a memory stream or any other object that is of type IO.Stream. The format can be anything from XML to binary to SOAP.</p>
<div><strong>What’s the use of System.Diagnostics.Process class? </strong><br />
By using System.Diagnostics.Process class, we can provide access to the files which are presented in the local and remote system.<br />
Example: System.Diagnostics.Process(”c:\mlaks\example.txt”) — local file<br />
System.Diagnostics.Process(”http://www.mlaks.com\example.txt”) — remote file</div>
<div><strong>What are the authentication methods in .NET?</strong><br />
Abstract class: This class has abstract methods (no body). This class cannot be instantiated. One needs to provide the implementation of the methods by overriding them in the derived class. No Multiple Inheritance.<br />
Interfaces: Interface class contains all abstract methods which are public by default. All of these methods must be implemented in the derived class. One can inherit from from more than one interface thus provides for Multiple Inheritance.</div>
<div><strong>re-clarification of object based: </strong><br />
VB6 DOES support polymorphism and interface inheritance. It also supports the “Implements” keyword. What is not supported in vb6 is implementation inheritance.<br />
Also, from above, vb6 DOES “provides access to third-party controls like COM, DCOM ” That is not anything new in .NET.</div>
<div><strong>How to achieve Polymorphism in VB.Net? </strong><br />
We can achieve polymarphism in .Net i.e Compile time polymarphism and Runtime polymarphism. Compiletime Polymarphism achieved by method overloading. Runtime polymarphism achieved by Early Binding or Late Binding. Provide the function pointer to the object at compile time called as Early Binding.<br />
provide the function pointer to the object at runtime called as Late Binding<br />
class emp having the method display()<br />
class dept having the method display()</div>
<p>create objects as in the main function<br />
// Early binding<br />
dim obj as new emp<br />
dim ob as new dept</p>
<p>obj.display()-to call the display method of emp class<br />
ob.display-to call the display method of the dept class<br />
// Late binding</p>
<p>create object in the main class as<br />
object obj<br />
obj=new emp<br />
obj.display()-to call the display of emp class<br />
obj=new dept<br />
obj.display()-to call the display of dept class</p>
<div><strong>Difference between Class And Interface </strong><br />
Class is logical representation of object. It is collection of data and related sub procedures with defination.<br />
Interface is also a class containg methods which is not having any definations.<br />
Class does not support multiple inheritance. But interface can support.</div>
<div><strong>What doesu mean by .NET framework? </strong><br />
The .NET Framework is an environment for building, deploying, and running Web Services and other applications. It consists of three main parts: the Common Language Runtime, the Framework classes, and ASP.NET</div>
<div><strong>What is assembly? </strong><br />
It is a single deployable unit that contains all the information abt the implimentation of classes , stuctures and interfaces</div>
<div><strong>What is namespaces? </strong><br />
It is a logical group of related classes and interfaces and that can be used byany language targeting the .net framework.</div>
<div><span style="text-decoration: underline;">.NET framework programming interview questions </span><br />
<strong><br />
.NET framework overview</strong><br />
1. Has own class libraries. System is the main namespace and all other namespaces are subsets of this.<br />
2. It has CLR(Common language runtime, Common type system, common language specification)<br />
3. All the types are part of CTS and Object is the base class for all the types.<br />
4. If a language said to be .net complaint, it should be compatible with CTS and CLS.<br />
5. All the code compiled into an intermediate language by the .Net language compiler, which is nothing but an assembly.<br />
6. During runtime, JIT of CLR picks the IL code and converts into PE machine code and from there it processes the request.<br />
7. CTS, CLS, CLR<br />
8. Garbage Collection<br />
9. Dispose, finalize, suppress finalize, Idispose interface<br />
10. Assemblies, Namespace: Assembly is a collection of class/namespaces. An assembly contains Manifest, Metadata, Resource files, IL code<br />
11. Com interoperability, adding references, web references<br />
12. Database connectivity and providers</div>
<p>Application Domain<br />
1. Class modifiers: public, private, friend, protected, protected friend, mustinherit, NotInheritable<br />
2. Method modifiers: public, private<br />
3. Overridable<br />
4. Shadows<br />
5. Overloadable<br />
6. Overrides<br />
7. Overloads<br />
8. Set/Get Property<br />
9. IIF<br />
10. Inheritance<br />
11. Polymorphism<br />
12. Delegates<br />
13. Events<br />
14. Reflection<br />
15. Boxing<br />
16. UnBoxing</p>
<p>ASP.Net<br />
1. Web Controls: Data grid (templates, sorting, paging, bound columns, unbound columns, data binding), Data list, repeater controls<br />
2. HTML Controls<br />
3. Code behind pages, system.web.ui.page base class<br />
4. Web.config: App settings, identity (impersonate), authentication (windows, forms, anonymous, passport), authorization<br />
5. Databind.eval<br />
6. Trace, Debug<br />
7. Output cache<br />
8. Session management<br />
9. Application, Session<br />
10. Global.asax httpapplication<br />
11. User controls, custom controls, custom rendered controls (postback event, postdatachanged event) usercontrol is the base class<br />
12. Directives</p>
<p>ADO.Net<br />
1. Command object (ExecuteNonquery, ExecuteReader, ExecuteXMLReader, ExecuteScalar)<br />
2. DataAdapter object (Fill)<br />
3. Dataset (collection of tables)<br />
4. CommandBuiler object<br />
5. Transaction Object<br />
6. Isolation levels</p>
<p><script type="text/javascript">// <![CDATA[
 google_ad_client = "pub-1795426627440279"; /* Solutions4ever_middler_link */ google_ad_slot = "8169630353"; google_ad_width = 468; google_ad_height = 15;
// ]]&gt;</script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script><script type="text/javascript">// <![CDATA[
 google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad);
// ]]&gt;</script><ins></ins></p>
]]></content:encoded>
			<wfw:commentRss>http://www.solutions4ever.net/2010/02/dot-net-interview-quations-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dot Net Interview Quations 5</title>
		<link>http://www.solutions4ever.net/2010/02/dot-net-interview-quations-5/</link>
		<comments>http://www.solutions4ever.net/2010/02/dot-net-interview-quations-5/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 06:48:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.solutions4ever.net/?p=84</guid>
		<description><![CDATA[I am constantly writing the drawing procedures with System.Drawing.Graphics, but having to use the try and dispose blocks is too time-consuming with Graphics objects. Can I automate this? 
Yes, the code</p>
<p>System.Drawing.Graphics canvas = new System.Drawing.Graphics();
try
{
//some code
}
finally
canvas.Dispose();</p>
<p>is functionally equivalent to</p>
<p>using (System.Drawing.Graphics canvas = new System.Drawing.Graphics())
{
//some code
} //canvas.Dispose() gets called automatically</p>
How do  ... <a href="http://www.solutions4ever.net/2010/02/dot-net-interview-quations-5/" class="expert-read-more" >Read More</a>]]></description>
			<content:encoded><![CDATA[<div><strong>I am constantly writing the drawing procedures with System.Drawing.Graphics, but having to use the try and dispose blocks is too time-consuming with Graphics objects. Can I automate this? </strong><br />
Yes, the code</p>
<p>System.Drawing.Graphics canvas = new System.Drawing.Graphics();<br />
try<br />
{<br />
//some code<br />
}<br />
finally<br />
canvas.Dispose();</p>
<p>is functionally equivalent to</p>
<p>using (System.Drawing.Graphics canvas = new System.Drawing.Graphics())<br />
{<br />
//some code<br />
} //canvas.Dispose() gets called automatically</p></div>
<div><strong>How do you trigger the Paint event in System.Drawing? </strong><br />
Invalidate the current form, the OS will take care of repainting. The Update method forces the repaint.</div>
<div><strong>With these events, why wouldn’t Microsoft combine Invalidate and Paint, so that you wouldn’t have to tell it to repaint, and then to force it to repaint? </strong><br />
Painting is the slowest thing the OS does, so usually telling it to repaint, but not forcing it allows for the process to take place in the background.</div>
<div><strong>How can you assign an RGB color to a System.Drawing.Color object? </strong><br />
Call the static method FromArgb of this class and pass it the RGB values.</div>
<div><strong>What class does Icon derive from? Isn’t it just a Bitmap with a wrapper name around it?</strong><br />
No, Icon lives in System.Drawing namespace. It’s not a Bitmap by default, and is treated separately by .NET. However, you can use ToBitmap method to get a valid Bitmap object from a valid Icon object.</div>
<div><strong>Before in my VB app I would just load the icons from DLL. How can I load the icons provided by .NET dynamically? </strong><br />
By using System.Drawing.SystemIcons class, for example System.Drawing.SystemIcons.Warning produces an Icon with a warning sign in it.</div>
<div><strong>When displaying fonts, what’s the difference between pixels, points and ems? </strong><br />
A pixel is the lowest-resolution dot the computer monitor supports. Its size depends on user’s settings and monitor size. A point is always 1/72 of an inch. An em is the number of pixels that it takes to display the letter M.</div>
<div><strong>What is the difference between VB 6 and VB.NET? </strong><br />
Answer1<br />
VB</p>
<p>1,Object-based Language<br />
2,Doesnot support Threading<br />
3,Not powerful Exception handling mechanism<br />
4,Doesnot having support for the console based applications<br />
5,Cannot use more than one version of com objects in vb application called DLL error<br />
6,Doesnot support for the Disconnected data source.</p>
<p>VB.Net</p>
<p>1,Object-oriented Language<br />
2,supports Threading<br />
3,powerful Exception handling mechanism<br />
4,having support for the console based applications<br />
5,More than one version of dll is supported<br />
6,supports the Disconnected data source by using Dataset class</p>
<p>Answer2<br />
VB:<br />
1. Object-based language<br />
2. Does not support inheritance<br />
3. ADO.Net does not give support for disconnected data architecture<br />
4. No interoperability function<br />
5. No support for threading</p>
<p>VB.Net<br />
1. Object-Oriented Programming lanugage<br />
2. ADO.Net gives support for disconnected data architecture<br />
3. It provides interoperability<br />
4. It uses managed code<br />
5. supports threading<br />
6. provides access to third-party controls like COM, DCOM</p>
<p>Answer2<br />
1.The concept of the complete flow of execution of a program from start to finish: Visual Basic hides this aspect of programs from you, so that the only elements of a Visual Basic program you code are the event handlers and any methods in class modules. C# makes the complete program available to you as source code. The reason for this has to do with the fact that C# can be seen, philosophically, as next-generation C++. The roots of C++ go back to the 1960s and predate windowed user interfaces and sophisticated operating systems. C++ evolved as a low-level, closeto- the-machine, all-purpose language. To write GUI applications with C++ meant that you had to invoke the system calls to create and interact with the windowed forms. C# has been designed to build on this tradition while simplifying and modernizing C++, to combine the low-level performance benefits of C++ with the ease of coding in Visual Basic. Visual Basic, on the other hand, is designed specifically for rapid application development of Windows GUI applications. For this reason, in Visual Basic all the GUI boilerplate code is hidden, and all the Visual Basic programmer implements are the event handlers. In C# on the other hand, this boilerplate code is exposed as part of your source code.<br />
2. Classes and inheritance: C# is a genuine object-oriented language, unlike Visual Basic, requiring all code to be a part of a class. It also includes extensive support for implementation inheritance. Indeed, most well-designed C# programs will be very much designed around this form of inheritance, which is completely absent in Visual Basic.</p></div>
<div><strong>What are the authentication methods in .NET?</strong><strong><br />
</strong>There are 4 types of authentications.<br />
1.WINDOWS AUTHENTICATION<br />
2.FORMS AUTHENTICATION<br />
3.PASSPORT AUTHENTICATION<br />
4.NONE/CUSTOM AUTHENTICATION</p>
<p>The authentication option for the ASP.NET application is specified by using the tag in the Web.config file, as shown below:<br />
other authentication options<br />
1. WINDOWS AUTHENTICATION Schemes<br />
I. Integrated Windows authentication<br />
II. Basic and basic with SSL authentication<br />
III. Digest authentication<br />
IV. Client Certificate authentication</p>
<p>2. FORMS AUTHENTICATION<br />
You, as a Web application developer, are supposed to develop the Web page and authenticate the user by checking the provided user ID and password against some user database</p>
<p>3.PASSPORT AUTHENTICATION<br />
A centralized service provided by Microsoft, offers a single logon point for clients. Unauthenticated users are redirected to the Passport site</p>
<p>4 NONE/CUSTOM AUTHENTICATION:<br />
If we don’t want ASP.NET to perform any authentication, we can set the authentication mode to “none”. The reason behind this decision could be: We don’t want to authenticate our users, and our Web site is open for all to use. We want to provide our own custom authentication</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.solutions4ever.net/2010/02/dot-net-interview-quations-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dot Net Interview Quations 4</title>
		<link>http://www.solutions4ever.net/2010/02/dot-net-interview-quations-4/</link>
		<comments>http://www.solutions4ever.net/2010/02/dot-net-interview-quations-4/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 06:47:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.solutions4ever.net/?p=82</guid>
		<description><![CDATA[What are possible implementations of distributed applications in .NET? 
.NET Remoting and ASP.NET Web Services. If we talk about the Framework Class Library, noteworthy classes are in System.Runtime.Remoting and System.Web.Services.
What are the consideration in deciding to use .NET Remoting or ASP.NET Web Services? 
Remoting is a more efficient communication exchange  ... <a href="http://www.solutions4ever.net/2010/02/dot-net-interview-quations-4/" class="expert-read-more" >Read More</a>]]></description>
			<content:encoded><![CDATA[<div><strong>What are possible implementations of distributed applications in .NET? </strong><br />
.NET Remoting and ASP.NET Web Services. If we talk about the Framework Class Library, noteworthy classes are in System.Runtime.Remoting and System.Web.Services.</div>
<div><strong>What are the consideration in deciding to use .NET Remoting or ASP.NET Web Services? </strong><br />
Remoting is a more efficient communication exchange when you can control both ends of the application involved in the communication process. Web Services provide an open-protocol-based exchange of information. Web Services are best when you need to communicate with an external organization or another (non-.NET) technology.</div>
<div><strong>What’s a proxy of the server object in .NET Remoting? </strong><br />
It’s a fake copy of the server object that resides on the client side and behaves as if it was the server. It handles the communication between real server object and the client object. This process is also known as marshaling.</div>
<div><strong>What are remotable objects in .NET Remoting? </strong><br />
Remotable objects are the objects that can be marshaled across the application domains. You can marshal by value, where a deep copy of the object is created and then passed to the receiver. You can also marshal by reference, where just a reference to an existing object is passed.</div>
<div><strong>What are channels in .NET Remoting? </strong><br />
Channels represent the objects that transfer the other serialized objects from one application domain to another and from one computer to another, as well as one process to another on the same box. A channel must exist before an object can be transferred.</div>
<div><strong>What security measures exist for .NET Remoting in System.Runtime.Remoting? </strong><br />
None. Security should be taken care of at the application level. Cryptography and other security techniques can be applied at application or server level.</div>
<div><strong>What is a formatter? </strong><br />
A formatter is an object that is responsible for encoding and serializing data into messages on one end, and deserializing and decoding messages into data on the other end.</div>
<div><strong>Choosing between HTTP and TCP for protocols and Binary and SOAP for formatters, what are the trade-offs? </strong><br />
Binary over TCP is the most effiecient, SOAP over HTTP is the most interoperable.</div>
<div><strong>What’s SingleCall activation mode used for? </strong><br />
If the server object is instantiated for responding to just one single request, the request should be made in SingleCall mode.</div>
<div><strong>What’s Singleton activation mode? </strong><br />
A single object is instantiated regardless of the number of clients accessing it. Lifetime of this object is determined by lifetime lease.</div>
<div><strong>How do you define the lease of the object? </strong><br />
By implementing ILease interface when writing the class code.</div>
<div><strong>Can you configure a .NET Remoting object via XML file? </strong><br />
Yes, via machine.config and application level .config file (or web.config in ASP.NET). Application-level XML settings take precedence over machine.config.</div>
<div><strong>How can you automatically generate interface for the remotable object in .NET with Microsoft tools? </strong><br />
Use the Soapsuds tool.</div>
<div><strong>What is Delegation? </strong><br />
A delegate acts like a strongly type function pointer. Delegates can invoke the methods that they reference without making explicit calls to those methods.<br />
Delegate is an entity that is entrusted with the task of representation, assign or passing on information. In code sense, it means a Delegate is entrusted with a Method to report information back to it when a certain task (which the Method expects) is accomplished outside the Method&#8217;s class.</div>
<div><strong>What is &#8220;Microsoft Intermediate Language&#8221; (MSIL)?</strong><strong><br />
</strong>A .NET programming language (C#, VB.NET, J# etc.) does not compile into executable code; instead it compiles into an intermediate code called Microsoft Intermediate Language (MSIL). As a programmer one need not worry about the syntax of MSIL &#8211; since our source code in automatically converted to MSIL. The MSIL code is then send to the CLR (Common Language Runtime) that converts the code to machine language, which is, then run on the host machine. MSIL is similar to Java Byte code. MSIL is the CPU-independent instruction set into which .NET Framework programs are compiled. It contains instructions for loading, storing, initializing, and calling methods on objects. Combined with metadata and the common type system, MSIL allows for true cross- language integration Prior to execution, MSIL is converted to machine code. It is not interpreted.</div>
<div><strong>Differences between Datagrid, Datalist and Repeater? </strong><br />
1. Datagrid has paging while Datalist doesnt.<br />
2. Datalist has a property called repeat. Direction = vertical/horizontal. (This is of great help in designing layouts). This is not there in Datagrid.<br />
3. A repeater is used when more intimate control over html generation is required.<br />
4. When only checkboxes/radiobuttons are repeatedly served then a checkboxlist or radiobuttonlist are used as they involve fewer overheads than a Datagrid.<br />
The Repeater repeats a chunk of HTML you write, it has the least functionality of the three. DataList is the next step up from a Repeater; accept you have very little control over the HTML that the control renders. DataList is the first of the three controls that allow you Repeat-Columns horizontally or vertically. Finally, the DataGrid is the motherload. However, instead of working on a row-by-row basis, you’re working on a column-by-column basis. DataGrid caters to sorting and has basic paging for your disposal. Again you have little contro, over the HTML. NOTE: DataList and DataGrid both render as HTML tables by default. Out of the 3 controls, I use the Repeater the most due to its flexibility w/ HTML. Creating a Pagination scheme isn&#8217;t that hard, so I rarely if ever use a DataGrid.<br />
Occasionally I like using a DataList because it allows me to easily list out my records in rows of three for instance.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.solutions4ever.net/2010/02/dot-net-interview-quations-4/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dot Net Interview Quations 3</title>
		<link>http://www.solutions4ever.net/2010/02/dot-net-interview-quations-3/</link>
		<comments>http://www.solutions4ever.net/2010/02/dot-net-interview-quations-3/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 06:46:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.solutions4ever.net/?p=80</guid>
		<description><![CDATA[Using COM Component in .Net ?
As most of you know that .Net does not encourage the development of COM components and provides a different solution to making reusable components through Assemblies. But, there are a lot of COM components present which our .Net application might need to use. Fortunately, .Net  ... <a href="http://www.solutions4ever.net/2010/02/dot-net-interview-quations-3/" class="expert-read-more" >Read More</a>]]></description>
			<content:encoded><![CDATA[<div><strong>Using COM Component in .Net ?</strong><br />
As most of you know that .Net does not encourage the development of COM components and provides a different solution to making reusable components through Assemblies. But, there are a lot of COM components present which our .Net application might need to use. Fortunately, .Net provides an extremely simple approach to achieve this. This is achieved by using ‘Wrapper Classes’ and ‘Proxy Components’. .Net wraps the COM component into .Net assembly technically called ‘Runtime Callable Wrapper’ or RCW. Then u can call and use your COM component just as a .Net (or C#, if u are using C#) Assembly.</div>
<div><strong>What is an assembly? </strong><br />
An assembly is the primary building block of a .NET Framework application. It is a collection of functionality that is built, versioned, and deployed as a single implementation unit (as one or more files). All managed types and resources are marked either as accessible only within their implementation unit, or as accessible by code outside that unit. .NET Assembly contains all the metadata about the modules, types, and other elements it contains in the form of a manifest. The CLR loves assemblies because differing programming languages are just perfect for creating certain kinds of applications. For example, COBOL stands for Common Business-Oriented Language because it’s tailor-made for creating business apps. However, it’s not much good for creating drafting programs. Regardless of what language you used to create your modules, they can all work together within one Portable Executable Assembly. There’s a hierarchy to the structure of .NET code. That hierarchy is Assembly &#8211; &gt; Module -&gt; Type -&gt; Method.&#8221; Assemblies can be static or dynamic. Static assemblies can include .NET Framework types (interfaces and classes), as well as resources for the assembly (bitmaps, JPEG files, resource files, and so on). Static assemblies are stored on disk in portable executable (PE) files. You can also use the .NET Framework to create dynamic assemblies, which are run directly from memory and are not saved to disk before execution. You can save dynamic assemblies to disk after they have executed.</div>
<div><strong>What is a Web Service? </strong><br />
A web service is a software component that exposes itself through the open communication channels of the Internet. Applications running on remote machines, on potentially different platforms, can access these components in a language and platform-independent manner. A Web Service is a group of functions, packaged together for use in a common framework throughout a network.</div>
<div><strong>webFarm Vs webGardens </strong><br />
A web farm is a multi-server scenario. So we may have a server in each state of US. If the load on one server is in excess then the other servers step in to bear the brunt.<br />
How they bear it is based on various models.<br />
1. RoundRobin. (All servers share load equally)<br />
2. NLB (economical)<br />
3. HLB (expensive but can scale up to 8192 servers)<br />
4. Hybrid (of 2 and 3).<br />
5. CLB (Component load balancer).<br />
A web garden is a multi-processor setup. i.e., a single server (not like the multi server above).<br />
How to implement webfarms in .Net:<br />
Go to web.config and Here for mode = you have 4 options.<br />
a) Say mode=inproc (non web farm but fast when you have very few customers).<br />
b) Say mode=StateServer (for webfarm)<br />
c) Say mode=SqlServer (for webfarm)<br />
Whether to use option b or c depends on situation. StateServer is faster but SqlServer is more reliable and used for mission critical applications.<br />
How to use webgardens in .Net:<br />
Go to web.config and Change the false to true. You have one more attribute that is related to webgarden in the same tag called cpuMask.</div>
<div><strong>What is the difference between a namespace and assembly name?</strong><strong><br />
</strong>A namespace is a logical naming scheme for types in which a simple type name, such as MyType, is preceded with a dot-separated hierarchical name. Such a naming scheme is completely under control of the developer. For example, types MyCompany.FileAccess.A and MyCompany.FileAccess.B might be logically expected to have functionally related to file access. The .NET Framework uses a hierarchical naming scheme for grouping types into logical categories of related functionality, such as the ASP.NET application framework, or remoting functionality. Design tools can make use of namespaces to make it easier for developers to browse and reference types in their code. The concept of a namespace is not related to that of an assembly. A single assembly may contain types whose hierarchical names have different namespace roots, and a logical namespace root may span multiple assemblies. In the .NET Framework, a namespace is a logical design-time naming convenience, whereas an assembly establishes the name scope for types at run time.</div>
<div><strong>What’s a Windows process? </strong><br />
It’s an application that’s running and had been allocated memory.</div>
<div><strong>What’s typical about a Windows process in regards to memory allocation? </strong><br />
Each process is allocated its own block of available RAM space, no process can access another process’ code or data. If the process crashes, it dies alone without taking the entire OS or a bunch of other applications down.</div>
<div><strong>Explain what relationship is between a Process, Application Domain, and Application? </strong><br />
Each process is allocated its own block of available RAM space, no process can access another process’ code or data. If the process crashes, it dies alone without taking the entire OS or a bunch of other applications down.<br />
A process is an instance of a running application. An application is an executable on the hard drive or network. There can be numerous processes launched of the same application (5 copies of Word running), but 1 process can run just 1 application.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.solutions4ever.net/2010/02/dot-net-interview-quations-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dot Net Interview Quations 2</title>
		<link>http://www.solutions4ever.net/2010/02/dot-net-interview-quations-2/</link>
		<comments>http://www.solutions4ever.net/2010/02/dot-net-interview-quations-2/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 06:45:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.solutions4ever.net/?p=77</guid>
		<description><![CDATA[What are Attributes?
Attributes are declarative tags in code that insert additional metadata into an assembly. There exist two types of attributes in the .NET Framework: Predefined attributes such as AssemblyVersion, which already exist and are accessed through the Runtime Classes; and custom attributes, which you write yourself by extending the  ... <a href="http://www.solutions4ever.net/2010/02/dot-net-interview-quations-2/" class="expert-read-more" >Read More</a>]]></description>
			<content:encoded><![CDATA[<div><strong>What are Attributes?</strong><strong><br />
</strong>Attributes are declarative tags in code that insert additional metadata into an assembly. There exist two types of attributes in the .NET Framework: Predefined attributes such as AssemblyVersion, which already exist and are accessed through the Runtime Classes; and custom attributes, which you write yourself by extending the System.Attribute class.</div>
<div><strong>What are the Types of Assemblies? </strong><br />
Assemblies are of two types:<br />
1. Private Assemblies<br />
2. Shared Assemblies<br />
Private Assemblies: The assembly is intended only for one application. The files of that assembly must be placed in the same folder as the application or in a sub folder. No other application will be able to make a call to this assembly. The advantage of having a private assembly is that, it makes naming the assembly very easy, since the developer need not worry about name clashes with other assemblies. As long as the assembly has a unique name within the concerned application, there won&#8217;t be any problems.<br />
Shared Assemblies: If the assembly is to be made into a Shared Assembly, then the naming conventions are very strict since it has to be unique across the entire system. The naming conventions should also take care of newer versions of the component being shipped. These are accomplished by giving the assembly a Shared Name. Then the assembly is placed in the global assembly cache, which is a folder in the file system reserved for shared assemblies.</div>
<div><strong>What is an Intermediate language? </strong><br />
Assemblies are made up of IL code modules and the metadata that describes them. Although programs may be compiled via an IDE or the command line, in fact, they are simply translated into IL, not machine code. The actual machine code is not generated until the function that requires it is called. This is the just-in-time, or JIT, compilation feature of .NET. JIT compilation happens at runtime for a variety of reasons, one of the most ambitious being Microsoft&#8217;s desire for cross-platform .NET adoption. If a CLR is built for another operating system (UNIX or Mac), the same assemblies will run in addition to the Microsoft platforms. The hope is that .NET assemblies are write-once-run-anywhere applications. This is a .NET feature that works behind-the-scenes, ensuring that developers are not limited to writing applications for one single line of products. No one has demonstrated whether or not this promise will ever truly materialize.</div>
<p>CTS/CLS</p>
<p>The MSIL Instruction Set Specification is included with the .NET SDK, along with the IL Assembly Language Programmers Reference. If a developer wants to write custom .NET programming languages, these are the necessary specifications and syntax. The CTS and CLS define the types and syntaxes that every .NET language needs to embrace. An application may not expose these features, but it must consider them when communicating through IL.</p>
<div>ASP.NET Authentication Providers and IIS Security</div>
<p>ASP.NET implements authentication using authentication providers, which are code modules that verify credentials and implement other security functionality such as cookie generation. ASP.NET supports the following three authentication providers:</p>
<p>Forms Authentication: Using this provider causes unauthenticated requests to be redirected to a specified HTML form using client side redirection. The user can then supply logon credentials, and post the form back to the server. If the application authenticates the request (using application-specific logic), ASP.NET issues a cookie that contains the credentials or a key for reacquiring the client identity. Subsequent requests are issued with the cookie in the request headers, which means that subsequent authentications are unnecessary.</p>
<p>Passport Authentication: This is a centralized authentication service provided by Microsoft that offers a single logon facility and membership services for participating sites. ASP.NET, in conjunction with the Microsoft® Passport software development kit (SDK), provides similar functionality as Forms Authentication to Passport users.</p>
<p>Windows Authentication: This provider utilizes the authentication capabilities of IIS. After IIS completes its authentication, ASP.NET uses the authenticated identity&#8217;s token to authorize access.</p>
<p>To enable a specified authentication provider for an ASP.NET application, you must create an entry in the application&#8217;s configuration file as follows:<br />
// web.config file</p>
<div><strong>What is the difference between ASP and ASP.NET? </strong><br />
ASP is interpreted. ASP.NET Compiled event base programming.<br />
Control events for text button can be handled at client javascript only. Since we have server controls events can handle at server side.<br />
More error handling.</div>
<p>ASP .NET has better language support, a large set of new controls and XML based components, and better user authentication.</p>
<p>ASP .NET provides increased performance by running compiled code.</p>
<p>ASP .NET code is not fully backward compatible with ASP.</p>
<p>ASP .NET also contains a new set of object oriented input controls, like programmable list boxes, validation controls. A new data grid control supports sorting, data paging, and everything you expect from a dataset control. The first request for an ASP.NET page on the server will compile the ASP .NET code and keep a cached copy in memory. The result of this is greatly increased performance.</p>
<p>ASP .NET is not fully compatible with earlier versions of ASP, so most of the old ASP code will need some changes to run under ASP .NET. To overcome this problem,</p>
<p>ASP .NET uses a new file extension &#8220;.aspx&#8221;. This will make ASP .NET applications able to run side by side with standard ASP applications on the same server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solutions4ever.net/2010/02/dot-net-interview-quations-2/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
	</channel>
</rss>
