35
How can you enable automatic paging in DataGrid ? Using the Built-In Paging Controls To use default paging, you set properties to enable paging, set the page size, and specify the style of the paging controls. Paging controls are LinkButton controls. You can choose from these types: Next and previous buttons. The button captions can be any text you want. Page numbers, which allow u sers to jump to a specific page. You can specify how many numbers are displayed; if there are more p ages, an ellipsis ( … ) is displayed next to the numbers. You must also create an event-handling method that responds when users click a navigation control. To use the built-in paging c ontrolsSet the control’s AllowPaging property to true. Set the PageSize property to the number of items to display per page. To set the appearance of the paging buttons, include a element into the page as a child of the DataGrid control. For syntax, see DataGrid Control Syntax. Create a handler for the grid’s PageIndexChanged event to respond to a paging request. The DataGridPageChangedEventsArgs enumeration contains the NewPageIndex property, which is the page the user would like to browse to. Set the grid’s CurrentPageIndex property to e.NewPageIndex, then rebind the  data. What is the difference between login controls and Forms authentication? Login controls are an easy way to implement Forms authentication without having to write any code. For example, the Login control performs the same functions you would normally perform when using the FormsAuthentication class—prompt for user credentials, validate them, and issue the authentication ticket—but with all the functionality wrapped in a control that you c an just drag from the Toolbox in Visual Studio. Under the covers, the login control uses the FormsAuthentication class (for example, to issue the authentication ticket) and ASP.NET membership (to validate the user credentials). Naturally, you can still use Forms authentication yourself, and applications you have that currently use it will continue to run. What is Tracing in ASP.NET ? ASP.NET introduces new functionality that allows you to write debug statements, directly in your code, without having to remove them from your application when it is deployed to production servers. Called tracing, this feature allows you to write variables or structures in a page, assert whether a condition is met, or simply trace through the execution path of your page or application

ASP.NET QUE

Embed Size (px)

Citation preview

Page 1: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 1/35

How can you enable automatic paging in DataGrid ?

Using the Built-In Paging Controls

To use default paging, you set properties to enable paging, set the page size, and specify

the style of the paging controls. Paging controls are LinkButton controls. You can choosefrom these types: Next and previous buttons. The button captions can be any text you

want. Page numbers, which allow users to jump to a specific page. You can specify how

many numbers are displayed; if there are more pages, an ellipsis ( … ) is displayed nextto the numbers. You must also create an event-handling method that responds when users

click a navigation control.

To use the built-in paging controlsSet the control’s AllowPaging property to true. Set the

PageSize property to the number of items to display per page.

To set the appearance of the paging buttons, include a element into the page as a child of 

the DataGrid control. For syntax, see DataGrid Control Syntax. Create a handler for thegrid’s PageIndexChanged event to respond to a paging request. TheDataGridPageChangedEventsArgs enumeration contains the NewPageIndex property,

which is the page the user would like to browse to. Set the grid’s CurrentPageIndex

property to e.NewPageIndex, then rebind the data.

What is the difference between login controls and

Forms authentication?

Login controls are an easy way to implement Forms authentication without having to

write any code. For example, the Login control performs the same functions you wouldnormally perform when using the FormsAuthentication class—prompt for user 

credentials, validate them, and issue the authentication ticket—but with all the

functionality wrapped in a control that you can just drag from the Toolbox in VisualStudio. Under the covers, the login control uses the FormsAuthentication class (for 

example, to issue the authentication ticket) and ASP.NET membership (to validate the

user credentials). Naturally, you can still use Forms authentication yourself, and

applications you have that currently use it will continue to run.

What is Tracing in ASP.NET ?

ASP.NET introduces new functionality that allows you to write debug statements,

directly in your code, without having to remove them from your application when it is

deployed to production servers. Called tracing, this feature allows you to write variables or structures in a page, assert whether a condition is met, or simply trace through the

execution path of your page or application

Page 2: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 2/35

What is RAID and what are different types of RAID

configurations?

RAID stands for Redundant Array of Inexpensive Disks, used to provide fault tolerance

to database servers. There are six RAID levels 0 through 5 offering different levels of 

performance, fault tolerance. MSDN has some information about RAID levels and for detailed information, check out the RAID advisory board’s homepage

How do you deploy an ASP.NET application?

You can deploy an ASP.NET Web application using any one of the following three

deployment options.1.XCOPY Deployment2.Using the Copy Project option in VS .NET

3.Deployment using VS.NET installer 

Continue Reading ASP.

Difference between Web.config and machine.config.

web.config:

Web.config file, as it sounds like is a configuration file

for the Asp .net web application. AnAsp .net application has one web.config file which keeps the configurations required for 

the corresponding application. Web.config file is written in XML with specific tags having

specific meanings.machine.config

As web.config file is used to configure one asp .net web […]

Continue Reading ASP.Net Interview Questions 

Where we can use DLL made in C#.Net ?

Supporting .Net, bcoz DLL made in C#.Net semicompiled version. Its not a com object.

It is used only in .Net Framework.As it is to be compiled at runtime to byte code.

Page 3: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 3/35

If A.equals(B) is true then A.getHashcode & B.getHashCode mustalways return same hash code.

The answer is False because it is given that A.equals(B) returns true i.e. objects are equaland now its hashCode is asked which is always independent of the fact that whether 

objects are equal or not. So, GetHashCode for both of the objects returns different value.

To Configure .Net for JIT activation what do you do?

Actually JIT activation is required for COM+ components which can be done by settingJustInTimeActivation attribute to true (choice A). For .net applications / components JIT

comes in by default.

How do you import Activex component in to .NET?

An application called AXImp.exe shipped with .Net SDK is used.This application does something similar as Tlbimp.exe does for non graphical COM

components.

It creates a wrapper component that contains the type information that the .Net runtimecan understand.

What is the use of fixed statement?

The fixed statement sets a pointer to a managed variable and “pins” that variable during

the execution of statement.

Without fixed, pointers to managed variables would be of little use since garbagecollection could relocate the variables unpredictably. (In fact, the C# compiler will not

allow you to set a pointer to a managed variable except […]

What is the order of destructors called in a polymorphism hierarchy?

Destructors are called in reverse order of constructors. First destructor of most derivedclass is called followed by its parent’s destructor and so on till the topmost class in the

hierarchy.

You don’t have control over when the first destructor will be called, since it is determinedby the garbage collector. Sometime after the object goes […]

Page 4: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 4/35

Continue Reading ASP.Net Interview Questions 

How can you sort the elements of the array in descending order?

int[] arr = new int[3];

arr[0] = 4;arr[1] = 1;

arr[2] = 5;

Array.Sort(arr);

Array.Reverse(arr);

Continue Reading ASP.Net Interview Questions 

Is it possible to Override Private Virtual methods.

No, First of all you cannot declare a method as ‘private virtual’.

Continue Reading ASP.Net Interview Questions 

What does the volatile modifier do?

The system always reads the current value of a volatile object at the point it is requested,

even if the previous instruction asked for a value from the same object. Also, the value of 

the object is written immediately on assignment.The volatile modifier is usually used for a field that is accessed by multiple threads […]

Continue Reading ASP.Net Interview Questions 

Is it possible to debug the classes written in other .Net languages in aC# project.

It is definitely possible to debug other .Net languages code in a C# project. As everyoneknows .net can combine code written in several .net languages into one single assembly.

Same is true with debugging.

Continue Reading ASP.Net Interview Questions 

Page 5: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 5/35

How do you debug an ASP.NET Web application?

Attach the aspnet_wp.exe process to the DbgClr debugger.

Continue Reading ASP.Net Interview Questions 

What debugging tools come with the .NET SDK?

1.� � CorDBG – command-line debugger.� To use CorDbg, you must compile the

original C# file using the /debug switch.2.� � DbgCLR – graphic debugger.� Visual Studio .NET uses the DbgCLR.

Continue Reading ASP.Net Interview Questions 

What is the difference between structures and enumeration?

Unlike classes, structs are value types and do not require heap allocation. A variable of astruct type directly contains the data of the struct, whereas a variable of a class type

contains a reference to the data. They are derived from System.ValueType class.

Enum->An enum type is a distinct type that declares a set of […]

Continue Reading ASP.Net Interview Questions 

What is Value type and refernce type in .Net?

Value Type : A variable of a value type always contains a value of that type. Theassignment to a variable of a value type creates a copy of the assigned value, while the

assignment to a variable of a reference type creates a copy of the reference but not of the

referenced object.The value […

What are the types of assemblies?

There are four types of assemblies in .NET:

Page 6: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 6/35

Static assemblies

These are the .NET PE files that you create at compile time.

Dynamic assembliesThese are PE-formatted, in-memory assemblies that you dynamically create at runtime

using the classes in the System.Reflection.Emit namespace.

Private assembliesThese are static assemblies used by a specific application.

Public or shared assemblies These are static assemblies […]

Continue Reading ASP.Net Interview Questions 

What is manifest?

It is the metadata that describes the assemblies.

Continue Reading ASP.Net Interview Questions 

What distributed process frameworks outside .NET do you know?

Distributed Computing Environment/Remote Procedure Calls (DEC/RPC), MicrosoftDistributed Component Object Model� (DCOM), Common Object Request Broker 

Architecture (CORBA), and Java Remote Method Invocation (RMI).

Continue Reading ASP.Net Interview Questions 

How do you retrieve the customized properties of a .NET applicationfrom XML .config file?

Initialize an instance of AppSettingsReader class. Call the GetValue method of AppSettingsReader class, passing in the name of the property and the type expected.

Assign the result to the appropriate variable.

Continue Reading ASP.Net Interview Questions 

When would you use ErrorProvider control?

ErrorProvider control is used in Windows Forms application. It is like Validation Control

for ASP.NET pages. ErrorProvider control is used to provide validations in Windows

Page 7: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 7/35

forms and display user friendly messages to the user if the validation fails.� E.g. if we

went to validate the textBox1 should be empty, then we can validate as […]

Continue Reading ASP.Net Interview Questions 

What is the difference between Debug.Write and Trace.Write?

The Debug.Write call won’t be compiled when the DEBUGsymbol is not defined (when

doing a release build). Trace.Write calls will be compiled. Debug.Write is for informationyou want only in debug builds, Trace.Write is for when you want it in release build as

well.

Continue Reading ASP.Net Interview Questions 

What are different transaction options available for servicescomponents?

There are 5 transactions types that can be used with COM+. Whenever an object is

registered with COM+ it has to abide either to these 5 transaction types.

Disabled: - There is no transaction. COM+ does not provide transaction support for thiscomponent.

Not Supported: - Component does not support transactions. Hence even if the calling

component […]

Continue Reading ASP.Net Interview Questions 

What does it meant to say “the canonical” form of XML?

The purpose of Canonical XML is to define a standard format for an XML document.Canonical XML is a very strict XML syntax, which lets documents in canonical XML be

compared directly.

Using this strict syntax makes it easier to see whether two XML documents are the same.For example, a section of text in one document might read Black & White, whereas the

same section of text might read Black & White in another document, and even in another.

If you compare those three documents byte by byte, they’ll be different. But if you writethem all in canonical XML, which specifies every aspect of the syntax you can use, these

three documents would all have the same version of this text (which would be Black &

White) and could be compared without problem. This Comparison is especially critical

when xml documents are digitally signed. The digital signal may be interpreted in differentway and the document may be rejected.Continue Reading ASP.Net Interview Questions 

Page 8: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 8/35

What are the mobile devices supported by .net platform?

The Microsoft .NET Compact Framework is designed to run on mobile devices such as

mobile phones, Personal Digital Assistants (PDAs), and embedded devices. The easiestway to develop and test a Smart Device Application is to use an emulator.

These devices are divided into two main divisions:

1) Those that are directly supported by .NET (Pocket PCs, […]

Continue Reading ASP.Net Interview Questions 

What is a Windows Service and how does its lifecycle differ from a“standard” EXE?

Windows service is a application that runs in the background. It is equivalent to a NT

service.

The executable created is not a Windows application, and hence you can’t just click andrun it . it needs to be installed as a service, VB.Net has a facility where we can add an

installer to our program […]

Continue Reading ASP.Net Interview Questions 

What is the difference between repeater over datalist and datagrid?

The Repeater class is not derived from the WebControl class, like the DataGrid andDataList. Therefore, the Repeater lacks the stylistic properties common to both the

DataGrid and DataList. What this boils down to is that if you want to format the data 

displayed in the Repeater, you must do so in the HTML markup. […]

Continue Reading ASP.Net Interview Questions 

What is a PostBack?

The process in which a Web page sends data back to the same page on the server.

Continue Reading ASP.Net Interview Questions 

Is it possible to prevent a browser from caching an ASPX page?

Page 9: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 9/35

Just call SetNoStore on the HttpCachePolicy object exposed through the Response

object’s Cache property, as demonstrated here:

SetNoStore works by returning a Cache-Control: private, no-store header in the HTTPresponse. In this example, it prevents caching of a Web page that shows the current time.

Continue Reading ASP.Net Interview Questions 

What are VSDISCO files?

VSDISCO files are DISCO files that support dynamic discovery of Web services. If you

place the following VSDISCO file in a directory on your Web server, for example, it

returns� � references to all ASMX and DISCO files in the host directory and any

subdirectories not noted in elements:

� 

Continue Reading ASP.Net Interview Questions 

Name two properties common in every validation control?

ControlToValidate property and Text property.

What namespace does the Web page belong in the .NET Frameworkclass hierarchy?

System.Web.UI.Page

Continue Reading ASP.Net Interview Questions 

Are the actual permissions for the application defined at run-time or compile-time?

The CLR computes actual permissions at runtime based on code group membership and

the calling chain of the code.

Page 10: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 10/35

Continue Reading ASP.Net Interview Questions 

What is the difference between authentication and authorization?

Authentication happens first. You verify user’s identity based on credentials.

Authorization is making sure the user only gets access to the resources he has credentialsfor.

Continue Reading ASP.Net Interview Questions 

What is a code group?

A code group is a set of assemblies that share a security context.

Continue Reading ASP.Net Interview Questions 

How can C# app request minimum permissions?

Using System.Security.Permissions;

[assembly:FileDialogPermissionAttribute(SecurityAction.RequestMinimum,Unrestricted=true)].

Continue Reading ASP.Net Interview Questions 

How can you work with permissions from your .NET application?

You can request permission to do something and you can demand certain permissions

from other apps. You can also refuse permissions so that your app is not inadvertently

used to destroy some data.

Continue Reading ASP.Net Interview Questions 

What’s the difference between code-based security and role-basedsecurity? Which one is better?

Code security is the approach of using permissions and permission sets for a given code

to run. The admin, for example, can disable running executables off the Internet or 

Page 11: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 11/35

restrict access to corporate database to only few applications. Role-based security most of 

the time involves the code running with the privileges of the current user. […]

Continue Reading ASP.Net Interview Questions 

How do you display an editable drop-down list?

Displaying a drop-down list requires a template column in the grid. Typically, theItemTemplate contains a control such as a data-bound Label control to show the current

value of a field in the record. You then add a drop-down list to the EditItemTemplate. In

Visual Studio, you can add a template column in the Property […]

Continue Reading ASP.Net Interview Questions 

How to manage pagination in a page?

Using pagination option in DataGrid control. We have to set the number of records for apage, then it takes care of pagination by itself.

Continue Reading ASP.Net Interview Questions 

Can the validation be done in the server side?

Client side validation is done by default. Server side validation is also possible. We can

switch off the client side and server side can be done.

Continue Reading ASP.Net Interview Questions 

How do you validate the controls in an ASP .NET page?

We can Validate the controls in an ASP.NET page by using special validation controls

that are meant for this. We have Range Validator, Email Validator.

Continue Reading ASP.Net Interview Questions 

What is smart navigation?

Page 12: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 12/35

The cursor position is maintained when the page gets refreshed due to the server side

validation and the page gets refreshed.

Continue Reading ASP.Net Interview Questions 

How is .NET able to support multiple languages?

A language should comply with the Common Language Runtime standard to becomea .NET language. In .NET, code is compiled to Microsoft Intermediate Language (MSIL

for short). This is called as Managed Code. This Managed code is run in .NET

environment. So after compilation to this IL the language is not a barrier. A code […]

Continue Reading ASP.Net Interview Questions 

What is the difference between Java and .NET garbage collectors?

Sun left the implementation of a specific garbage collector up to the JRE developer, sotheir performance varies widely, depending on whose JRE you’re using. Microsoft

standardized on their garbage collection.

Continue Reading ASP.Net Interview Questions 

What is the CLI? Is it the same as the CLR?

The CLI (Common Language Infrastructure) is the definiton of the fundamentals of the.NET framework - the Common Type System (CTS), metadata, the Virtual Execution

Environment (VES) and its use of intermediate language (IL), and the support of multiple

programming languages via the Common Language Specification (CLS). The CLI isdocumented through ECMA

The CLR (Common […]

Where would you use an iHTTPModule, and what are

the limitations of anyapproach you might take inimplementing one?

By koolkampus ⋅ April 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a comment 

⋅ Add to Technorati Favorites 

Page 13: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 13/35

One of ASP.NET’s most useful features is the extensibility of the HTTP pipeline, the

path that data takes between client and server. You can use them to extend your ASP.NET

applications by adding pre- and post-processing to each HTTP request coming into your application. For example, if you wanted custom authentication facilities for your 

application, the best technique would be to intercept the request when it comes in and

process the request in a custom HTTP module.

(No Ratings Yet)

Can you configure a .NET Remoting object via XML

file?

By koolkampus ⋅ April 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a comment 

⋅ Add to Technorati Favorites 

Yes, via machine.config and application level .config file (or web.config in ASP.NET).Application-level XML settings take precedence over machine.config.

(No

How do I change the permission set for a code group?

By koolkampus ⋅ April 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a comment 

⋅ Add to Technorati Favorites 

Use caspol. If you are the machine administrator, you can operate at the ‘machine’ level -

which means not only that the changes you make become the default for the machine, butalso that users cannot change the permissions to be more permissive. If you are a normal

(non-admin) user you can still modify the permissions, but only to make them more

restrictive.For example, to allow intranet code to do what it likes you might do this: caspol -cg 1.2

FullTrust

Note that because this is more permissive than the default policy (on a standard system),you should only do this at the machine level - doing it at the user level will have no

effect.

(No Ratings Yet)

t Interview Questions

How to set the debug mode?

Page 14: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 14/35

By koolkampus ⋅ April 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a comment 

⋅ Add to Technorati Favorites 

Debug Mode for ASP.NET applications - To set ASP.NET appplication in debugging

mode, edit the application’s web.config and assign the “debug” attribute in < compilation

> section to “true” as show below:< configuration >

< system.web >

< compilation defaultLanguage="vb" debug="true" / >….

..< / configuration >

This case-sensitive attribute ‘debug tells ASP.NET to generate symbols for dynamically

generated files and enables thedebugger to attach to the ASP.NET application. ASP.NET will detect this change

automatically, without the need to restart the server. Debug Mode for ASP.NETWebservices - Debugging an XML Web service created with ASP.NET is similar to the

debugging an ASP.NET Web application.

(No Rating

How do you handle data concurrency in .NET ?

By koolkampus ⋅ April 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a comment 

⋅ Add to Technorati Favorites 

One of the key features of the ADO.NET DataSet is that it can be a self-contained anddisconnected data store. It can contain the schema and data from several rowsets in

DataTable objects as well as information about how to relate the DataTable objects-all inmemory. The DataSet neither knows nor cares where the data came from, nor does it

need a link to an underlying data source. Because it is data source agnostic you can pass

the DataSet around networks or even serialize it to XML and pass it across the Internet 

without losing any of its features. However, in a disconnected model, concurrency

obviously becomes a much bigger problem than it is in a connected model.

In this column, I’ll explore how ADO.NET is equipped to detect and handle concurrencyviolations. I’ll begin by discussing scenarios in which concurrency violations can occur 

using the ADO.NET disconnected model. Then I will walk through an ASP.NETapplication that handles concurrency violations by giving the user the choice to overwritethe changes or to refresh the out-of-sync data and begin editing again. Because part of 

managing an optimistic concurrency model can involve keeping a timestamp

(rowversion) or another type of flag that indicates when a row was last updated, I will

show how to implement this type of flag and how to maintain its value after eachdatabase update.

Page 15: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 15/35

Can we handle the error and redirect to some pages

using web.config?

By koolkampus ⋅ April 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a comment 

⋅ Add to Technorati Favorites 

Yes, we can do this, but to handle errors, we must know the error codes; only then we can

take the user to a proper error message page, else it may confuse the user.

CustomErrors Configuration section in web.config file:The default configuration is:

< customErrors mode="RemoteOnly" defaultRedirect="Customerror.aspx" >

< error statusCode="404" redirect="Notfound.aspx" / >

< /customErrors >If mode is set to Off, custom error messages will be disabled. Users will receive detailed

exception error messages.

If mode is set to On, custom error messages will be enabled.If mode is set to RemoteOnly, then users will receive custom errors, but users accessing

the site locally will receive detailed error messages.

Add an < error > tag for each error you want to handle. The error tag will redirect theuser to the Notfound.aspx page when the site returns the 404 (Page not found) error.

[Example]

There is a page MainForm.aspx

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles MyBase.Load

‘Put user code to initialize the page here

Dim str As System.Text.StringBuilder str.Append(”hi”) ‘ Error Line as str is not instantiated

Response.Write(str.ToString)

End Sub

[Web.Config]< customErrors mode="On" defaultRedirect="Error.aspx"/ >

‘ a simple redirect will take the user to Error.aspx [user defined] error file.

< customErrors mode="RemoteOnly" defaultRedirect="Customerror.aspx" >< error statusCode="404" redirect="Notfound.aspx" / >

< /customErrors >

‘This will take the user to NotFound.aspx defined in IIS.

What is ViewState? How is it encoded? Is it encrypted?

Who uses ViewState?

By koolkampus ⋅ April 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a comment 

⋅ Add to Technorati Favorites 

Page 16: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 16/35

ViewState is the mechanism ASP.NET uses to keep track of server control state values that

don’t otherwise post back as part of the HTTP form. ViewState Maintains the UI State of 

a PageViewState is base64-encoded. It is not encrypted but it can be encrypted by setting

EnableViewStatMAC=”true” & setting the machineKey validation type to 3DES. If you

want to NOT maintain the ViewState, include the directive < %@ PageEnableViewState="false" % > at the top of an .aspx page or add the attribute

EnableViewState=”false” to any control.

(No Ratings Yet)

What is ViewState? How is it encoded? Is it encrypted? Who usesViewState?

ViewState is the mechanism ASP.NET uses to keep track of server control state valuesthat don’t otherwise post back as part of the HTTP form. ViewState Maintains the UI

State of a PageViewState is base64-encoded. It is not encrypted but it can be encrypted by setting

EnableViewStatMAC=”true” & setting the machineKey validation type to […]

Continue Reading ASP.Net Interview Questions 

When you’re running a component within ASP.NET, what process is it  running within on Windows XP? Windows 2000? Windows2003?

On Windows 2003 (IIS 6.0) running in native mode, the component is running within the

w3wp.exe process associated with the application pool which has been configured for theweb application containing the component.

On Windows 2003 in IIS 5.0 emulation mode, 2000, or XP, it’s running within the IIS

helper process whose name I do not […]

Continue Reading ASP.Net Interview Questions 

Difference between asp and asp.net?.

“ASP (Active Server Pages) and ASP.NET are both server side technologies for buildingweb sites and web applications, ASP.NET is Managed compiled code - asp is interpreted.

and ASP.net is fully Object oriented. ASP.NET has been entirely re-architected to

Page 17: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 17/35

provide a highly productive programming experience based on the .NET Framework, and

a robust infrastructure for […]

Continue Reading ASP.Net Interview Questions 

What is advantage of viewstate and what are benefits?

When a form is submitted in classic ASP, all form values are cleared. Suppose you havesubmitted a form with a lot of information and the server comes back with an error. You

will have to go back to the form and correct the information. You click the back button,

and what happens…….ALL […]

Continue Reading ASP.Net Interview Questions 

What is an HTML “entity”?

An entity is a specific character string that has the effect of causing a formatting programto select and present a particular character or notation.

Continue Reading ASP.Net Interview Questions 

Difference between Anchor and Dock Properties?

Dock Property->Gets or sets which edge of the parent container a control is docked to. A

control can be docked to one edge of its parent container or can be docked to all edgesand fill the parent container. For example, if you set this property to DockStyle.Left, the

left edge of thecontrol will be […]

Continue Reading ASP.Net Interview Questions 

What’s the safest way to deploy a Windows Forms app?

Web deployment: the user always downloads the latest version of the code, the program

runs within security sandbox, properly written app will not require additional securityprivileges.

Continue Reading ASP.Net Interview Questions 

Page 18: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 18/35

What class does Icon derive from?

Isn’t it just a Bitmap with a wrapper name around it? No, Icon lives in System.Drawing

namespace. It’s not a Bitmap by default, and is treated separately by .NET. However, youcan use ToBitmap method to get a valid Bitmap object from a valid Icon object.

Continue Reading ASP.Net Interview Questions 

When displaying fonts, what’s the difference between pixels, pointsand ems?

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.

Continue Reading ASP.Net Interview Questions 

Where on the Internet would you look for Web services?

UDDI repositaries like uddi.microsoft.com, IBM UDDI node, UDDI Registries in Google

Directory, enthusiast sites like XMethods.net.

Continue Reading ASP.Net Interview Questions 

What is the transport protocol you use to call a Web service?

SOAP. Transport Protocols: It is essential for the acceptance of Web Services that they

are based on established Internet infrastructure. This in fact imposes the usage of of the

HTTP, SMTP and FTP protocols based on the TCP/IP family of transports. Messaging

Protocol: The format of messages exchanged between Web Services clients and WebServices […]

Continue Reading ASP.Net Interview Questions 

How do you turn off cookies for one page in your site?

Page 19: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 19/35

Use the Cookie.Discard Property which Gets or sets the discard flag set by the server.

When true, thisproperty instructs the client application not to save the Cookie on the

user’s hard disk when a session ends.

Continue Reading ASP.Net Interview Questions 

Whats an assembly?

Assemblies are the building blocks of .NET Framework applications; they form the

fundamental unit of deployment, version control, reuse, activation scoping, and security

permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common

language runtime with the […]

Continue Reading ASP.Net Interview Questions 

What are CAO’s i.e. Client Activated Objects ?

Client-activated objects are objects whose lifetimes are controlled by the calling

application domain, just as they would be if the object were local to the client. With clientactivation, a round trip to the server occurs when the client tries to create an instance of 

the server object, and the client proxy is created using […]

Continue Reading ASP.Net Interview Questions 

What is Com Callable wrapper?when it will created?

.NET components are accessed from COM via a COM Callable Wrapper (CCW). This issimilar to a RCW, but works in the opposite direction. Again, if the wrapper cannot be

automatically generated by the .NET development tools, or if the automatic behaviour is

not desirable, a custom CCW can be developed. Also, for COM to […]

Difference between Anchor and Dock Properties?By koolkampus ⋅ March 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a

comment ⋅ Add to Technorati Favorites 

Dock Property->Gets or sets which edge of the parent container a control is docked to. Acontrol can be docked to one edge of its parent container or can be docked to all edges

and fill the parent container. For example, if you set this property to DockStyle.Left, the

Page 20: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 20/35

left edge of thecontrol will be docked to the left edge of its parent control. Additionally,

the docked edge of the control is resized to match that of its container 

control.

Anchor Property->Gets or sets which edges of the control are anchored to the edges of 

its container. A control can be anchored to one or more edges of its parent container.Anchoring a control to its parent ensures that the anchored edges remain in the same

position relative to the edges of the parent container when the parent container is resized.

What are CAO’s i.e. Client Activated Objects ?

By koolkampus ⋅ March 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a

comment ⋅ Add to Technorati Favorites 

Client-activated objects are objects whose lifetimes are controlled by the calling application

domain, just as they would be if the object were local to the client. With client activation,

a round trip to the server occurs when the client tries to create an instance of the server object, and the client proxy is created using an object reference (ObjRef) obtained on

return from the creation of the remote object on the server. Each time a client creates an

instance of a client-activated type, that instance will service only that particular referencein that particular client until its lease expires and its memory is recycled. If a calling

application domain creates two new instances of the remote type, each of the client

references will invoke only the particular instance in the server application domain fromwhich the reference was returned.

In COM, clients hold an object in memory by holding a reference to it. When the last

client releases its last reference, the object can delete itself. Client activation provides thesame client control over the server object’s lifetime, but without the complexity of 

maintaining references or the constant pinging to confirm the continued existence of theserver or client. Instead, client-activated objects use lifetime leases to determine how longthey should continue to exist. When a client creates a remote object, it can specify a

default length of time that the object should exist. If the remote object reaches its default

lifetime limit, it contacts the client to ask whether it should continue to exist, and if so,

for how much longer. If the client is not currently available, a default time is alsospecified for how long the server object should wait while trying to contact the client

before marking itself for garbage collection. The client might even request an indefinite

default lifetime, effectively preventing the remote object from ever being recycled untilthe server application domain is torn down. The difference between this and a server-

activated indefinite lifetime is that an indefinite server-activated object will serve all

client requests for that type, whereas the client-activated instances serve only the clientand the reference that was responsible for their creation. For more information, see

Lifetime Leases.

To create an instance of a client-activated type, clients either configure their application

programmatically (or using a configuration file) and call new (New in Visual Basic), or theypass the remote object’s configuration in a call to Activator.CreateInstance. The

following code example shows such a call, assuming a TcpChannel has been registered to

listen on port 8080.

Page 21: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 21/35

What is Runtime Callable wrapper?.when it will created?.

The common language runtime exposes COM objects through a proxy called the runtime

callable wrapper (RCW). Although the RCW appears to be an ordinary object to .NETclients, its primary function is to marshal calls between a .NET client and a COM object.

This wrapper turns the COM interfaces exposed by the COM component into […]

Continue Reading ASP.Net Interview Questions 

What’s the difference between WindowsDefaultLocation andWindowsDefaultBounds?

WindowsDefaultLocation tells the form to start up at a location selected by OS, but withinternally specified size. WindowsDefaultBounds delegates both size and starting

position choices to the OS.

Continue Reading ASP.Net Interview Questions 

What’s the safest way to deploy a Windows Forms app?

Web deployment: the user always downloads the latest version of the code, the program

runs within security sandbox, properly written app will not require additional securityprivileges.

Continue Reading ASP.Net Interview Questions 

What’s a proxy of the server object in .NET Remoting?

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.

Continue Reading ASP.Net Interview Questions 

When would you use .NET Remoting and when Web services?

Page 22: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 22/35

Use remoting for more efficient exchange of information when you control both ends of 

the application. Use Web services for � � � � open-protocol-based information

exchange when you are just a client or a server with the other end belonging to someone

else.

Continue Reading ASP.Net Interview Questions 

What are channels in .NET Remoting?

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.

Continue Reading ASP.Net Interview Questions 

What security measures exist for .NET Remoting inSystem.Runtime.Remoting?

Security should be taken care of at the application level. Cryptography and other security

techniques can be applied� at application or server level.

Continue Reading ASP.Net Interview Questions 

What technology enables out-of-proc communication in .NET?

Most usually Remoting;.NET remoting enables client applications to use objects in other 

processes on the same computer or on any other  computer available on its network.Whileyou could implement an out-of-proc component in any number of other ways, someone

using the term almost always means Remoting.

Continue Reading ASP.Net Interview Questions 

What is ADO .NET and what is difference between ADO andADO.NET?

Page 23: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 23/35

ADO.NET is stateless mechanism. I can treat the ADO.Net as a separate in-memorydatabase where in I can use relationships between the tables and select insert and updates

to the database. I can update the actual database as a batch.

Continue Reading ASP.Net Interview Questions 

Can you declare a C++ type destructor in C# like ~MyClass()?

Yes, but what’s the point, since it will call Finalize(), and Finalize() has no guarantees

when the memory will be cleaned up,� plus, it introduces additional load on the garbage

collector.

Continue Reading ASP.Net Interview Questions 

Contrast DTDs versus XSDs. What are their similarities anddifferences? Which is preferred and why?

Document Type Definition (DTD) describes a model or set of rules for an XML

document. XML Schema Definition (XSD) also describes the structure of an XML document 

but XSDs are much more powerful. The disadvantage with the Document TypeDefinition is it doesn’t support data types beyond the basic 10 primitive types. It cannot

properly […]

Continue Reading ASP.Net Interview Questions 

Why is the XML InfoSet specification different from the Xml DOM?What does the InfoSet attempt to solve?

“The XML Information Set (Infoset) defines a data model for XML. The Infosetdescribes the abstract representation of an XML Document. Infoset is the generalized

representation of the XML Document, which is primarily meant to act as a set of 

definitions used by XML technologies to formally describe what parts of an XMLdocument they […]

Continue Reading ASP.Net Interview Questions 

How does VB.NET/C# achieve polymorphism?

Page 24: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 24/35

Polymorphism is also achieved through interfaces. Like abstract classes, interfaces also

describe the methods that a class needs to implement. The difference between abstract

classes and interfaces is that abstract classes always act as a base class of the relatedclasses in the class hierarchy. For example, consider a hierarchy-car and truck classes

derived from […]

Continue Reading ASP.Net Interview Questions 

What is Jit compilers?.how many are available in clr?

Just-In-Time compiler- it converts the language that you write in .Net into machinelanguage that a computer can understand. there are tqo types of JITs one� is memory

optimized & other � is performace optimized.

Continue Reading ASP.Net Interview Questions 

What is MSIL?

When compiling to managed code, the compiler translates your source code into Microsoftintermediate language (MSIL), which is a CPU-independent set of instructions that can

be efficiently converted to native code. MSIL includes instructions for loading, storing,

initializing, and calling methods on objects, as well as instructions for arithmetic andlogical operations, control flow, direct […]

Contrast DTDs versus XSDs. What are their similarities

and differences? Which is preferred and why?

By koolkampus ⋅ March 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a

comment ⋅ Add to Technorati Favorites 

Document Type Definition (DTD) describes a model or set of rules for an XML

document. XML Schema Definition (XSD) also describes the structure of an XML

document but XSDs are much more powerful. The disadvantage with the Document Type

Definition is it doesn’t support data types beyond the basic 10 primitive types. It cannotproperly define the type of data contained by the tag. An Xml Schema provides an Object

Oriented approach to defining the format of an xml document. The Xml schema support

most basic programming types like integer, byte, string, float etc., We can also definecomplex types of our own which can be used to define a xml document. Xml Schemas

are always preferred over DTDs as a document can be more precisely defined using the

XML Schemas because of its rich support for data representation.

Page 25: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 25/35

Why is the XML InfoSet specification different from the

Xml DOM? What does the InfoSet attempt to solve?

By koolkampus ⋅ March 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a

comment ⋅ Add to Technorati Favorites 

“The XML Information Set (Infoset) defines a data model for XML. The Infoset

describes the abstract representation of an XML Document. Infoset is the generalized

representation of the XML Document, which is primarily meant to act as a set of definitions used by XML technologies to formally describe what parts of an XML

document they operate upon.

The Document Object Model (DOM) is one technology for representing an XML

Document in memory and to programmatically read, modify and manipulate a xmldocument.� Infoset helps defining generalized standards on how to use XML that is not

dependent or tied to a particular XML specification or API. The Infoset tells us what part

of XML Document should be considered as significant information.

What’s the difference between const and readonly?

You can initialize readonly variables to some runtime values. Let’s say your programuses current date and time as one of the values that won’t change. This way you declare

public readonly string DateT = new DateTime().ToString().

Continue Reading ASP.Net Interview Q

Can multiple catch blocks be executed?

It’s a delegate that points to and eventually fires off several methods.

What is difference between constants, readonly and, static ?

Constants: The value can’t be changedRead-only: The value will be initialized only once from the constructor of the class.

Static: Value can be initialized once.

What is Reference type and value type ?

By koolkampus ⋅ March 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a

comment ⋅ Add to Technorati Favorites 

Page 26: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 26/35

Reference Type: Reference types are allocated on the managed CLR heap, just like

object types. A data type that is stored as a reference to the value’s location. The value of a

reference type is the location of the sequence of bits that represent the type’s data.Reference types can be self-describing types, pointer types, or interface types

Value Type: Value types are allocated on the stack just like primitive types in VBScript,VB6 and C/C++. Value types are not instantiated using new go out of scope when the

function they are defined within returns.

Value types in the CLR are defined as types that derive from system.valueType.

A data type that fully describes a value by specifying the sequence of bits that constitutes

the value’s representation. Type information for a value type instance is not stored with

the instance at run time, but it is available in metadata. Value type instances can betreated as objects using boxing.

What is the difference between a Struct and a Class ?

The struct type is suitable for representing lightweight objects such as Point, Rectangle,

and Color. Although it is possible to represent a point as a class, a struct is more efficientin some scenarios. For example, if you declare an array of 1000 Point objects, you will

allocate additional memory for referencing each object. In […]

Continue Reading ASP.Net Interview Questions 

What are the types of authentication in .net?

We have three types of � authentication:

. Form authenticatio

. Windows authentication

. Passport This has to be declared in web.config file.

Continue Reading ASP.Net Interview Questions 

What is difference between constants, readonly and, static ?

Constants: The value can’t be changed

Read-only: The value will be initialized only once from the constructor of the class.

Static: Value can be initialized once.

Page 27: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 27/35

Continue Reading ASP.Net Interview Questions 

What is Reference type and value type ?

Reference Type: Reference types are allocated on the managed CLR heap, just like object

types. A data type that is stored as a reference to the value’s location. The value of areference type is the location of the sequence of bits that represent the type’s data.

Reference types can be self-describing types, pointer types, […]

Continue Reading ASP.Net Interview Questions 

What is MSIL, IL, CTS and, CLR ?

MSIL: (Microsoft intermediate language) When compiling to managed code, the

compiler translates your source code into Microsoft intermediate language (MSIL), whichis a CPU-independent set of instructions that can be efficiently converted to native code.

MSIL includes instructions for loading, storing, initializing, and calling methods on

objects, as well as instructions for arithmetic and logical […]

Continue Reading ASP.Net Interview Questions 

Differnce between Managed code and unmanaged code ?

� Managed Code: Code that runs under a “contract of cooperation” with the common

language runtime. Managed code must supply the metadata necessary for the runtime toprovide services such as memory management, cross-language integration, code access

security, and automatic lifetime control of objects. All code based on Microsoft 

intermediate language (MSIL) executes as managed […]

Continue Reading ASP.Net Interview Questions 

How can I stop my code being reverse-engineered from IL?

There is currently no simple way to stop code being reverse-engineered from IL. In future

it is likely that IL obfuscation tools will become available, either from MS or from third

parties. These tools work by ‘optimising’ the IL in such a way that reverse-engineering

becomes much more difficult. Of course if you are writing […]

Continue Reading ASP.Net Interview Questions 

Page 28: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 28/35

What are attributes?

There are at least two types of .NET attribute. The first type I will refer to as a metadata

attribute - it allows some data to be attached to a class or method. This data becomes partof the metadata for the class, and (like other class metadata) can be accessed via

reflection. The other […]

Continue Reading ASP.Net Interview Questions 

Why is XmlSerializer so slow?

There is a once-per-process-per-type overhead with XmlSerializer. So the first time you

serialize or deserialize an object of a given type in an application, there is a significantdelay. This normally doesn’t matter, but it may mean, for example, that XmlSerializer is

a poor choice for loading configuration settings during startup of a GUI application.

Continue Reading ASP.Net Interview Questions 

Can I customise the serialization process?

Yes. XmlSerializer supports a range of attributes that can be used to configureserialization for a particular class. For example, a field or property can be marked with

the [XmlIgnore] attribute to exclude it from serialization. Another example is the

[XmlElement]attribute, which can be used to specify the XML element name to be used for […]

Continue Reading ASP.Net Interview Questions 

What is serialization?

Serialization is the process of converting an object into a stream of bytes. Deserialization

is the opposite process of creating an object from a stream of bytes. Serialization /

Deserialization is mostly used to transport objects (e.g. during remoting), or to persistobjects (e.g. to a file or database).

Continue Reading ASP.Net Interview Questions 

Page 29: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 29/35

Is the lack of deterministic destruction in .NET a problem?

It’s certainly an issue that affects component design. If you have objects that maintain

expensive or scarce resources (e.g. database locks), you need to provide some way for theclient to tell the object to release the resource when it is done. Microsoft recommend that

you provide a method called Dispose() for this purpose. However, […]

Continue Reading ASP.Net Interview Questions 

Why doesn’t the .NET runtime offer deterministic destruction?

Because of the garbage collection algorithm. The .NET garbage collector works by

periodically running through a list of all the objects that are currently being referenced byan application. All the objects that it doesn’t find during this search are ready to be

destroyed and the memory reclaimed. The implication of this algorithm is that […]

Continue Reading ASP.Net Interview Questions 

What is side-by-side execution?

Can two application one using private assembly and other using Shared assembly bestated as a side-by-side executables? Side-by-side execution is the ability to run multiple

versions of an application or component on the same computer. You can have multiple

versions of the common language runtime, and multiple versions of applications andcomponents that use […]

Continue Reading ASP.Net Interview Questions 

Why only boxed types can be unboxed?

Unboxing is the process of converting a Reference type variable to Value type and thus

allocating memory on the stack . It happens only to those Reference type variables that

have been earlier created by Boxing of a Value Type , therefore internally they contain avalue type , which can be obtained through explicit […]

Can I customise the serialization process?

Page 30: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 30/35

By koolkampus ⋅ March 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a

comment ⋅ Add to Technorati Favorites 

Yes. XmlSerializer supports a range of attributes that can be used to configure serialization 

for a particular class. For example, a field or property can be marked with the

[XmlIgnore] attribute to exclude it from serialization. Another example is the[XmlElement]

attribute, which can be used to specify the XML element name to be used for a particular 

property or field.Serialization via SoapFormatter/BinaryFormatter can also be controlled to some extent by

attributes. For example, the [NonSerialized] attribute is the equivalent of XmlSerializer’s

[XmlIgnore] attribute. Ultimate control of the serialization process can be acheived byimplementing the the ISerializable interface on the class whose instances are to be

serialized.

Interview Questions

Is the lack of deterministic destruction in .NET a

problem?

By koolkampus ⋅ March 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a

comment ⋅ Add to Technorati Favorites 

It’s certainly an issue that affects component design. If you have objects that maintain

expensive or scarce resources (e.g. database locks), you need to provide some way for theclient to tell the object to release the resource when it is done. Microsoft recommend that

you provide a method called Dispose() for this purpose. However, this causes problemsfor distributed objects - in a distributed system who calls the Dispose() method? Some

form of reference-counting or ownership-management mechanism is needed to handledistributed objects - unfortunately the runtime offers no help with this.

(No Ratings Yet)

view Questions

What is side-by-side execution?

By koolkampus ⋅ March 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a

comment ⋅ Add to Technorati Favorites 

Can two application one using private assembly and other using Shared assembly be

stated as a side-by-side executables? Side-by-side execution is the ability to run multiple

versions of an application or component on the same computer. You can have multipleversions of the common language runtime, and multiple versions of applications and

Page 31: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 31/35

components that use a version of the runtime, on the same computer at the same time.

Since versioning is only applied to shared assemblies, and not to private assemblies, two

application one using private assembly and one using shared assembly cannot be stated asside-by-side

executables.

hat is the use of Internal keyword?

Internal keyword is one of the access specifier available in .Net framework , that makes atype visible in a� given assembly , for e.g : a single dll can contain multiple modules ,

essentially a multi file assembly , but it forms a single binary component , so any type

with internal keyword […]

Continue Reading ASP.Net Interview Questions 

Explain the differences between public, protected, private andinternal.

These all are access modifier and they governs the access level. They can be applied to

class, methods, fields.

Public: Allows class, methods, fields to be accessible from anywhere i.e. within andoutside an assembly.

Private: When applied to field and method allows to be accessible within a class.

Protected: Similar to private but can be accessed by […]

Continue Reading ASP.Net Interview Questions 

Explain the importance and use of each, Version, Culture andPublicKeyToken for an assembly.

This three alongwith name of the assembly provide a strong name or fully qualified name

to the assembly. When a assebly is referenced with all three.

PublicKeyToken: Each assembly can have a public key embedded in its manifest thatidentifies the developer. This ensures that once the assembly ships, no one can modify the

code or […]

Continue Reading ASP.Net Interview Questions 

Page 32: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 32/35

What is FullTrust? Do GAC’ed assemblies have FullTrust?

Before the .NET Framework existed, Windows had two levels of trust for downloaded

code. This old model was a binary trust model. You only had two choices: Full Trust, andNo Trust. The code could either do anything you could do, or it wouldn’t run at all.

The permission sets in .NET include FullTrust, SkipVerification, Execution, […]

Continue Reading ASP.Net Interview Questions 

What are PDBs? Where must they be located for debugging to work?

A program database (PDB) files holds debugging and project state information that allows

incremental linking of debug configuration of your program.There are several differenttypes of symbolic debugging information. The default type for Microsoft compiler is the

so-called PDB file. The compiler setting for creating this file is /Zi, or /ZI for C/C++(which

creates a […]

Continue Reading ASP.Net Interview Questions 

How is the using() pattern useful? What is IDisposable? How does itsupport deterministic finalization?

The using() pattern is useful because it ensures that Dispose() will always be called when

a disposable object (defined as one that implements IDisposable, and thus the Dispose()method) goes out of scope, even if it does so by an exception being thrown, and thus that

resources are always released.

Continue Reading ASP.Net Interview Questions 

What is the difference between Finalize() and Dispose()?

Dispose() is called by the user of an object to indicate that he is finished with it, enabling

that object to release any unmanaged resources it holds. Finalize() is called by the run-time to allow an object which has not had Dispose() called on it to do the same. However 

Dispose() operates determinalistically, whereas there is […]

Continue Reading ASP.Net Interview Questions 

Page 33: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 33/35

How does the generational garbage collector in the .NET CLRmanage object lifetime? What is non-deterministic finalization?

The hugely simplistic version is that every time it garbage-collects, it starts by assumingeverything to be garbage, then goes through and builds a list of everything reachable.

Those become not-garbage, everything else doesn’t, and gets thrown away. What makes

it generational is that every time an object goes through this process and survives, it […]

Continue Reading ASP.Net Interview Questions 

The PID (Process ID) a unique number for each item on the ProcessTab, Image Name list. How do you get the PID to appear?

In Task Manger, select the View menu, then select columns and check PID (Process

Identifier).In Linux, PID is used to debug a process explicitly. However we cannot dothis in a windows environment.

Microsoft has launched a SDK called as Microsoft Operations Management (MOM).

This uses the PID to find out which dll’s have been loaded […]

Continue Reading ASP.Net Interview Questions 

What is a PID? How is it useful when troubleshooting a system?

PID is the process Id of the application in Windows. Whenever a process starts running in

the Windows environment, it is associated with an individual process Id or PID.

Continue Reading ASP.Net Interview Questions 

Describe the difference between a Thread and a Process?

A Process is an instance of an running application. And a thread is the Execution stream

of the Process. A process can have multiple Thread.When a process starts a specific memory area is allocated to it. When there is multiple

thread in a process, each thread gets a memory for storing the variables in it […]

Continue Reading ASP.Net Interview Questions 

Page 34: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 34/35

Difference between int and int32 ?

Both are same. System.Int32 is a .NET class. Int is an alias name for System.Int32.

Continue Reading ASP.Net Interview Questions 

Can a nested object be used in Serialization ?

Yes. If a class that is to be serialized contains references to objects of other classes, and if 

those classes have been marked as serializable, then their objects are serialized too.

Continue Reading ASP.Net Interview Questions 

Describe the advantages of writing a managed code applicationinstead of unmanaged one. What’s involved in certain piece of code being managed?

“Advantage includes automatic garbage collection,memory management,security,type

checking,versioning

Managed code is compiled for the .NET run-time environment. It runs in the CommonLanguage Runtime (CLR), which is the heart of the .NET Framework. The CLR provides

services such as security,memory management, and cross-language integration. Managedapplications written to take advantage of the features of the CLR perform […]

Continue Reading ASP.Net Interview Questions 

What is inline schema, how does it works?

Schemas can be included inside of XML file is called Inline Schemas.This is useful�when it is inconvenient to physically seprate the schema and the XML document.A�

schema is an XML document that defines the structure, constraints, data types

, and�

relationships of the elements that constitute the data contained inside the XML� […]

Explain the importance and use of each, Version,

Culture and PublicKeyToken for an assembly.

Page 35: ASP.NET QUE

8/7/2019 ASP.NET QUE

http://slidepdf.com/reader/full/aspnet-que 35/35

By koolkampus ⋅ March 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a

comment ⋅ Add to Technorati Favorites 

This three alongwith name of the assembly provide a strong name or fully qualified name

to the assembly. When a assebly is referenced with all three.

PublicKeyToken: Each assembly can have a public key embedded in its manifest thatidentifies the developer. This ensures that once the assembly ships, no one can modify the

code or other resources contained in the assembly.

Culture: Specifies which culture the assembly supports

Version: The version number of the assembly.It is of the following formmajor.minor.build.revision.

(No Ratings Yet)

What is FullTrust? Do GAC’ed assemblies have

FullTrust?

By koolkampus ⋅ March 14, 2006 ⋅  Email this post ⋅  Print this post ⋅ Post a

comment ⋅ Add to Technorati Favorites 

Before the .NET Framework existed, Windows had two levels of trust for downloadedcode. This old model was a binary trust model. You only had two choices: Full Trust, and

No Trust. The code could either do anything you could do, or it wouldn’t run at all.

The permission sets in .NET include FullTrust, SkipVerification, Execution, Nothing,

LocalIntranet, Internet and Everything. Full Trust Grants unrestricted permissions tosystem resources. Fully trusted code run by a normal, nonprivileged user cannot do

administrative tasks, but can access any resources the user can access, and do anything

the user can do. From a security standpoint, you can think of fully trusted code as beingsimilar to native, unmanaged code, like a traditional ActiveX control.

GAC assemblies are granted FullTrust. In v1.0 and 1.1, the fact that assemblies in the

GAC seem to always get a FullTrust grant is actually a side effect of the fact that the

GAC lives on the local machine.� If anyone were to lock down the security policy by

changing the grant set of the local machine to something less than FullTrust, and if your assembly did not get extra permission from some other code group, it would no longer 

have FullTrust even though it lives in the GAC.