Master C# Logo banner
Welcome to MasterCSharp.com - Master C#, the easy way... - by Saurabh Nandu

 


ASP.NET FAQ

Add Comment
 

 
<script language="JavaScript"> function display(Ans) { var change ="document.all."+Ans+".style.display"; if(eval(change+"== 'none'")) {eval(change +"= 'inline'");} else if(eval(change+"== 'inline'")){eval(change+"= 'none'") ;} } </script> <div onclick="display('a1')" style="cursor: hand"><b>1) Is ASP.NET and ASP+ the same?</b></div> <div id=a1 style="display:inline">Yes! ASP+ and ASP.NET refer to the same thing. First ASP.NET was called ASP+ since its a upgrade to ASP. It was also called ASP.NET since its a part of the .NET platform. But later on ASP+ was causing a lot of confusion hence it was decided to call it as ASP.NET.<br></div><br> <div onclick="display('a2')" style="cursor: hand"><b>2) Is ASP.NET a upgrade to ASP?</b></div> <div id=a2 style="display:inline">Yes, ASP.NET is a major upgrade over ASP. It does have backward support for ASP, but ASP.NET is better managed, well developed and best of all <i>Compiled</i>! So no more slow interpreted scripting, in ASP.NET you use any of the .NET managed languages like C#, VB.NET, JScript.NET even COBOL.NET to write your ASP.NET pages.<br></div><br> <div onclick="display('a3')" style="cursor: hand"><b>3) Should all ASP programmers learn ASP.NET?</b></div> <div id=a3 style="display:inline">This depends on what kind of ASP programmer you are. One thing is sure that ASP.NET will replace ASP in the coming years, but&nbsp; it will at least take a year for that to happen. Till that time ASP will surely be a more popular choice.<br></div><br> <div onclick="display('a4')" style="cursor: hand"><b>4) Does ASP.NET need the .NET Platform?</b></div> <div id=a4 style="display:inline">ASP.NET derives its power from the .NET Platform and Services. Hence you need to install the .NET Platform for your ASP.NET applications. There is a separate <a class="wbox" target="_blank" href="http://download.microsoft.com/download/.netframesdk/Redist/1.0/W98NT42KMeXP/EN-US/dotnetredist.exe"> .NET redistributable runtime</a> (20 MB) available that can be installed on production web servers.</div><br> <div onclick="display('a5')" style="cursor: hand"><b>5) I am a Web Server Admin, How do I install support for ASP.NET on my server?</b></div> <div id=a5 style="display:inline">You will have to install the <a class="wbox" target="_blank" href="http://download.microsoft.com/download/.netframesdk/Redist/1.0/W98NT42KMeXP/EN-US/dotnetredist.exe"> .NET redistributable runtime</a> (20 MB) on production web servers.<br></div><br> <div onclick="display('a6')" style="cursor: hand"><b>6 I want to use a assembly (Dll) made by me on my page, where do I place the Dll library file?</b></div> <div id=a6 style="display:inline">According to the ASP.NET specification you have to create a &quot;/bin&quot; directory inside the Virtual Directory which hosts your application and copy the &quot;Dll&quot; file in this &quot;/bin&quot; directory. For Example: you have a virtual directory called &quot;myapplication&quot; then create a sub-directory within it called &quot;bin&quot;. Then you can copy your custom assemblies and code-behind files to the &quot;bin&quot; directory.<br></div><br> <div onclick="display('a7')" style="cursor: hand"><b>7 Do I need to register the Managed Dll uploaded to the web server? Do I have to re-start the web server incase I need to update my previous assembly Dll?</b></div> <div id=a7 style="display:inline">All such worries are gone with .NET! To deploy/install a Managed Dll on your server all you need to do is XCopy the Dll to the 'bin' directory (which resides within your Virtual Directory) and that's it! Your Dll is installed. In case you want to update a previously written assembly, just overwrite it by XCopy and your ASP.NET application will automatically sense the new version of your assembly and start using the updated assemblies without any server re-start!&nbsp;&nbsp;<br></div><br> <div onclick="display('a8')" style="cursor: hand"><b>8 How is it possible to update my assemblies on the server without a server re-start?</b></div> <div id=a8 style="display:inline">If you knew a bit about the windows file system, you would know that when a file is in use by a application the operating system locks it down, so no one can change or delete the file. The same applies to the .NET Assemblies also! To overcome this problem the ASP.NET design team designed a mechanism where, when the ASP.NET application first requests a new assembly, a shadow-copy of that assembly is made and then the shadow-copy is used by the ASP.NET runtime. Hence the original file never gets locked, its the duplicate copy which is locked by the application; so you can overwrite the original file without needing to re-start the web server.<br> Once you update the assembly on the server with a new one, the ASP.NET runtime senses it and makes a copy of the new assembly. All new client requests are now served from the new assembly. This way ASP.NET achieves a graceful upgrade without any additional downtime!<br></div><br> <div onclick="display('a9')" style="cursor: hand"><b>9 What is the difference between User Controls and Custom Controls?</b></div> <div id=a9 style="display:inline">There is a small difference between the two. User Controls are basically text files with the extension '.ascx' which enables you to make GUI re-usable controls. Since its a text file, it generally contains a mixture of HTML and scripting. You can edit User Controls in an editor and they are also called as <b>Pagelets</b>. They are also called as Include files in steroids!<br> On the other hand Custom Controls reside in compiled ( Dll ) assemblies. They are non-GUI but can emit HTML GUI at runtime. Example of Custom Controls would be the sever controls which come bundled with the .NET SDK like DataGrid, Repeater, DataList etc. Custom Controls are always compiled into Dll's and hence require good programming knowledge. The purpose of Custom Controls too is to create re-usable units of code.<br></div><br> <div onclick="display('a10')" style="cursor: hand"><b>10 What is Code Behind?</b></div> <div id=a10 style="display:inline">Speaking in a strict sense the concept of codebehind is native to Visual Studio.NET and has nothing to do with the ASP.NET API. But speaking loosely, ASP.NET allows you to separate your code and user interface (UI) into Dll's and '.aspx' pages respectively. This way the programmers and the designers can work separately without spoiling or interfering in each others work on the same page. Since the code is separate from the main file its called as Code-Behind. The codebehind attribute is native to Visual Studio.NET, but since there is no other term to define the code and presentation separation, the word code-behind is used by all developers.<br></div><br> <div onclick="display('a11')" style="cursor: hand"><b>11 Can ASP.NET applications run on a web server other than IIS?</b></div> <div id=a11 style="display:inline">This is possible, since all the code is now essentially compiled unlike the ASP Scripting there is no need for ASP.NET to depend on IIS. Unfortunately at present there are no other web servers capable of running ASP.NET.&nbsp;<br></div><br> <div onclick="display('a12')" style="cursor: hand"><b>12 Can ASP.NET applications run without a Web Server?</b></div> <div id=a12 style="display:inline">This too is possible! You can run ASP.NET applications right from a CD, just as you would run any other normal application, without a web server! Since the ASP.NET framework depends strongly on the .NET Platform rather than IIS you can write your own HTTP handlers that will run your application. Unfortunately at present there are no examples on it.<br></div><br> <div onclick="display('a13')" style="cursor: hand"><b>13 Which Windows Operating Systems support ASP.NET?</b></div> <div id=a13 style="display:inline">Currently the ASP.NET runtime distributed through the .NET SDK only supports Windows 2000 (any flavor), Windows XP Professional and the Windows .NET Server. Other versions of Windows are not currently supported.<br></div><br> <script language="JavaScript" > var ua = window.navigator.userAgent; var msie = ua.indexOf ( "MSIE " ); if ( msie > 0 ) { for( var i = 1; i < 14 ; i++ ) { var temp = "a" + i ; display( temp ); } } </script>

Comments

Add Comment