Sei sulla pagina 1di 3

1.Difference between trace and debug in .NET S.

No 1 Trace Debug

This class works only when your This class works only when your application build defines the application build defines the symbol symbol TRACE. DEBUG. For tracing, you have to use For tracing, you have to Trace.WriteLine statements. Debug.WriteLine statements. use

2 3

Trace class is generally used to You generally use debug classes at the trace the execution during time of development of application. deployment of the application. Trace class works in both debug Debug class works only in debug mode as well as release mode. mode. Performance analysis can be done Performance analysis cannot be done using Trace class. using Debug class. Trace runs in a thread that is Debug runs in the same thread in different from the Main Thread. which your code executes. Trace is used during Testing Phase Debug is used during Debugging and Optimization Phase of Phase different releases.

4 5 6 7

2.Difference between ASP and ASPX S.No 1 2 3 ASP ASPX

The .asp is the file extension of The .aspx is the file extension of the classic ASP page. ASP.NET page. ASP stands for Active Server ASPX is the acronym of Active Server Pages. Pages Extended. The .asp file runs under the The .aspx file runs in a separate process space of inetinfo.exe, worker process called as which is an IIS process space. aspnet_wp.exe. The .asp file can execute only in platforms of Microsoft technology. It cannot run in nonMicrosoft platforms like Apache Web Server. The .asp file can be coded in only two languages namely VBScript and Javascript. Both these languages are client side languages. The .aspx file can run on any platforms, be it Microsoft or not. Hence .aspx file can be executed in Apache Web Server as well. The .aspx file can be coded using any .NET language including VB.NET, C#. Both VB.NET and C# are Server Side Languages.

In .asp file, the executable code can be included outside a function scope where in the function is located inside the script block marked as runat=server.

In .aspx file, the executable code cannot be included outside a function scope where in the function is located inside the script block marked as runat=server.

In .asp file, a function can be In .aspx file, a function cannot be defined inside server side script defined inside server side script tags. tags. In .asp file, all the directives will In .aspx, the language directive must be placed in the pages first line be enclosed within page directive as < using <%@Page Language= %@Page Language= VB %> Jscript %> tag.

3.Difference between thread and process S.No 1 2 3 Thread Process

Threads share the address space of Processes have their own address. the process that created it. Threads have direct access to the Processes have their own copy of the data segment of its process data segment of the parent process. Threads can directly communicate Processes must use interprocess with other threads of its process communication to communicate with sibling processes. Threads have almost no overhead New threads are easily created Processes have considerable overhead New processes require duplication of the parent process.

4 5 6

Threads can exercise considerable Processes can only exercise control control over threads of the same over process child processes Changes to the main thread Changes to the parent process does not (cancellation, priority change, affect child processes. etc.) may affect the behavior of the other threads of the process

Another good reference: http://www.differencebetween.net/miscellaneous/difference-between-thread-and-process/

4.Difference between ASPX and ASCX S.No 1 ASPX ASP.NET Page extension .aspx For eg: Default.aspx uses the ASCX User Control uses the extension .ascx For eg: WebUserControl.ascx. User Control begin with a Control Directive. For eg: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs" Inherits="WebUserControl" %> use webforms in

ASP.NET Page begin with a Page Directive. For eg: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

Usercontrol code can be used in We can not webforms usercontrol.

ASP.NET Page can be viewed User Control cannot be viewed directly directly in the Browser. in the browser. User Controls are added to WebPages and we view them by requesting a web page in our browser ASP.NET page has HTML, Body User Control does not have a HTML, or Form element. Body or Form element.

And, further updates on difference between questions and answers, please visit my blog @ http://onlydifferencefaqs.blogspot.in/

Potrebbero piacerti anche