Can we run ASP.Net apllication without web.Config file?
How we can set different levels of authentication in .Net?What are the difference between windows authenticatin, passport authentication and form authentication?
Answered by: aanand_agrawal
View all answers by aanand_agrawal
Member Since Apr-2009 | Answered On : Apr 30th, 2009
Windows authentication enables you to identify users without creating a custom page. Credentials are stored in the Web server’s local user database or an Active Directory domain. Once identified, you can use the user’s credentials to gain access to resources that are protected by Windows authorization.
Forms authentication enables you to identify users with a custom database, such as an ASP.NET membership database. Alternatively, you can implement your own custom database. Once authenticated, you can reference the roles the user is in to restrict access to portions of your Web site.
Passport authentication relies on a centralized service provided by Microsoft. Passport authentication identifies a user with using his or her e-mail address and a password, and a single Passport account can be used with many different Web sites. Passport authentication is primarily used for public Web sites with thousands of users.
Anonymous authentication does not require the user to provide credentials.
Windows Authentication Windows Authentication is the default authentication mechanism for ASP.NET applications. Windows Authentication is implemented in ASP.NET using the Windows authentication&n...
Windows:       User is authenticated by the windows server.Form:             User is authenticated from the  Customized Authentication      technique          Â...
Explain the life cycle of an asp .Net page.
Answered by: aanand_agrawal
View all answers by aanand_agrawal
Member Since Apr-2009 | Answered On : Apr 30th, 2009
1. OnInit (Init) Initializes each child control of the current
2. LoadControlState: Loads the ControlState of the control. To use this method, the control must call the Page.RegisterRequiresControlState method in the OnInit method of the control.
3. LoadViewState: Loads the ViewState of the control.
4. LoadPostData: Is defined on interface IPostBackDataHandler. Controls that implement this interface use this method to retrieve the incoming form data and update the control’s properties accordingly.
5. Load (OnLoad): Allows actions that are common to every request to be placed here. Note that the control is stable at this time; it has been initialized and its state has been reconstructed.
6. RaisePostDataChangedEvent: Is defined on the interface IPostBackData-Handler. Controls that implement this interface use this event to raise change events in response to the Postback data changing between the current Postback and the previous Postback. For example, if a TextBox has a TextChanged event and AutoPostback is turned off, clicking a button causes the Text-Changed event to execute in this stage before handling the click event of the button, which is raised in the next stage.
7. RaisePostbackEvent: Handles the client-side event that caused the Postback to occur
8. PreRender (OnPreRender): Allows last-minute changes to the control. This event takes place after all regular Post-back events have taken place. This event takes place before saving ViewState, so any changes made here are saved.
9. SaveControlState: Saves the current control state to ViewState. After this stage, any changes to the control state are lost. To use this method, the control must call the Page.RegisterRequiresControlState method in the OnInit method of the control.
10. SaveViewState: Saves the current data state of the control to ViewState. After this stage, any changes to the control data are lost.
11. Render: Generates the client-side HTML, Dynamic Hypertext Markup Language (DHTML), and script that are necessary to properly display this control at the browser. In this stage, any changes to the control are not persisted into ViewState.
12. Dispose: Accepts cleanup code. Releases any unman-aged resources in this stage. Unmanaged resources are resources that are not handled by the .NET common language runtime, such as file handles and database connections.
13. UnLoad
Start-properties such as Request,Response,IsPostBack are
set.
Page Intialization
load
Validation
PostBack Event handling
Redering
Unload
For Detail Description go thru
http://msdn2.microsoft.com/en-us/library/ms178472.aspx
1 load
2 init
3 prerender
4 unload
How does cookies differ from session variables?
Answered by: Ume Sharma
View all answers by Ume Sharma
Member Since Mar-2009 | Answered On : Mar 18th, 2009
Cookies hold small text whereas session can hold bigger amount of data
All browser dose not support cookies.
Both are used as a way to store information pertinant to a specific user in context of a web application/website.Cookies are persistant, however, and can be used even after the browser is shut down....
Cookies:
1) Cookies can hold small amount of data in text format.
2) Cookies created on browser.
3) Cookies can be disabled by user computer.
Session:
1) Session can hold large amount of data.
2) Session created on the Server.
3) Session can not be disabled by user computer.
Explain virtual function in c# with an example
Answered by: bb.geetha
Member Since May-2008 | Answered On : Jun 6th, 2008
Virtual functions implement the concept of polymorphism are the same as in C#, except that you use the override keyword with the virtual function implementaion in the child class. The parent class uses the same virtual keyword. Every class that overrides the virtual method will use the override keyword.class Shape
{
public virtual void Draw()
{
Console.WriteLine("Shape.Draw") ;
}
}
class Rectangle : Shape
{
public override void Draw()
{
Console.WriteLine("Rectangle.Draw");
}
}
What : Virtual Function is used to have polymorphic Effe...
It has override keyword in the child class and the base class containing the virutual keyword.
What is the difference between dataset.Clone() and dataset.Copy()?
Answered by: parii
Member Since Dec-2007 | Answered On : Dec 4th, 2007
Dataset.clone(): Copies the structure of the dataset, including all schemas, relations, and constraints. Does not copy any data.
Dataset.copy(): Copies both the structure and data.
Dataset.clone() method copies the structure of the DataSet, including all datatable schemas, relations.constraints. But it does not copy any data.
Dataset.copy() Copies both the structure and data
Thank's
Pradhan Prasanta Kumar
Dataset.clone() copies the structure of the dataset including all data table schemas,relations and constraints. and Dataset.copy() copies the structure with data of the Dataset.
Isha Ahuja
How does the cookies work in ASP.Net?
I want to know the complete follow of the page how it store cookies and user info into session and when it get terminate also is it possible to call in-process application to out-process?
Answered by: Prabhat Chauhan
View all answers by Prabhat Chauhan
Member Since Jul-2008 | Answered On : Jul 23rd, 2008
we know Http is an state-less protocol which is required for interaction between clinet and server .
so there is an need to remeber state of request raised by an web browser so that
web server can recognize you have already previously visited or not.
There are two types of state management techniques:
a) Client side state management
b) Server - side statemanagement
Using cookies comes under clinet side statemanagement .In HttpResponse we write
Cookie containing sessionId and other information within it.
when a browser made a request to the web server the same cookie is sent to the server where server recognize the session id and get other information stored to it previously.
Cons:
1)Cookie should contain non sensitive data as one can easily read cookies and they result of which your security may be tampered .
2) Cookie should not contain large amount of information as they are sent back and forth with request and response in between client and server which may cause your
Performance degradation
we know Http is an state-less protocol which is required for interaction between clinet and server .so there is an need to remeber state of request raised by an web browser so that web server can reco...
.NET FRAMEWORK AS 2 COMPONENTS
1. CLR(common language runtime)
2. base class library
- it manages the execution of pgms on cpu
- provides an run time environment for all the .net applications
- also it provides memory management, garbage collection, security
Editorial / Best Answer
Answered by: shree
Answered On : Dec 24th, 2006it is something like if we had not defined the web.config the application will take the settings from the machine.config.
the machine.config settings are overide by the web.config if u define the web.config for each running appln
How ?
Give the step by step process?
Yes we can run ASP.Net application without web.config file.