Thursday, September 25, 2008

Difference between remoting and webservice.Difference between machine.config and web.config.Application life cycle.






Inbox
X






difference between remoting and web service in .ne...


ASP.NET Web Services

.NET Remoting

Protocol

Can be accessed only over HTTP

Can be accessed over any protocol (including TCP, HTTP, SMTP and so on)

State Management

Web services work in a stateless environment

Provide support for both stateful and stateless environments through Singleton and SingleCall objects

Type System

Web services support only the datatypes defined in the XSD type system, limiting the number of objects that can be serialized.

Using binary communication, .NET Remoting can provide support for rich type system

Interoperability

Web services support interoperability across platforms, and are ideal for heterogeneous environments.

.NET remoting requires the client be built using .NET, enforcing homogenous environment.

Reliability

Highly reliable due to the fact that Web services are always hosted in IIS

Can also take advantage of IIS for fault isolation. If IIS is not used, application needs to provide plumbing for ensuring the reliability of the application.

Extensibility

Provides extensibility by allowing us to intercept the SOAP messages during the serialization and deserialization stages.

Very extensible by allowing us to customize the different components of the .NET remoting framework.

Ease-of-Programming

Easy-to-create and deploy.

Complex to program.


What is the difference between web.config and mach...
the settings made in the web.config file are applied to that particular web application only whereas the settings of machine.config file are applied to the whole asp.net application.
Is this answer useful? Yes | No


January 07, 2006 06:45:29 #2
Amarpreet S. Rajwans

RE: What is the difference between web.config and mach...
Web.config file Setting of asp.net all porject mach.config are setting of server setting and when the web side are implemented time it work all project but web.config file set all projects
Is this answer useful? Yes | No


January 13, 2006 08:23:50 #3
sabir

RE: What is the difference between web.config and mach...
web config will be for that paticlur aplln whereas the manchine .config will for the whole machine
Is this answer useful? Yes | No


February 08, 2006 15:39:22 #4
Shree
Member Since: October 2005 Contribution: 3

RE: What is the difference between web.config and mach...
Every ASP.NET application that you has a web.config file . The settings specified in this will imply only to that application.Whereas Your System will have a machine.config file in Microsoft.NET\Framework\v1.1.4322\CONFIG Folder which contains specifications and settings at a system level.
Is this answer useful? Yes | No


March 03, 2006 04:30:41 #5
Nitin

RE: What is the difference between web.config and mach...
Web.config file is to override the settings from the machine.config file. machine.config file settings are applied to all the webapplications residing on the server while web.config settings are application specific.
Is this answer useful? Yes | No


March 06, 2006 04:07:00 #6
Markivir

RE: What is the difference between web.config and mach...
Web.config file is to override the settings from the machine.config file. machine.config file settings are applied to all the webapplications residing on the server while web.config settings are application specific.
Is this answer useful? Yes | No


April 23, 2007 11:09:04 #7
Muralidharan

RE: What is the difference between web.config and mach...
machine.config is created when you install ASP.NET in your machine
Web.config is created when you create an application

Is this answer useful? Yes | No


April 08, 2008 06:31:07 #8
Pallav1984
Member Since: April 2008 Contribution: 1

RE: What is the difference between web.config and machine.config ?
web.config is configure ur apllication only
but machine.config file related to ur all d application on ur server.

Is this answer useful? Yes | No


June 02, 2008 03:33:42 #9
tarunrawat4u
Member Since: June 2008 Contribution: 2

RE: What is the difference between web.config and machine.config ?
The MACHINE.config file contains default and machnine-specific values for all supported setting.
Machine setting are normally controlled by the system admin, and app should never be given write access to it.
An application can override most default values stored in the machine.config file by creating one or more web.config files.

At min, an app creates a WEB config file in its root folder. The web.config file is a subset of machine.config written according to the same XML achema.

As far as my knowledge is concerned, cookies are stored on client side where as sessions are server variables. The storage limitations are also there (like IE restricts the size of cookie to be not more than 4096 bytes). We can store only a string value in a cookie where as objects can be stored in session variables. The client will have to accept the cookies in order to use cookies, there is no need of user's approval or confirmation to use Session variables cos they are stored on server. The other aspect of this issue is cookies can be stored as long as we want(even for life time) if the user accepts them, but with session variables we can only store something in it as long as the session is not timed out or the browser window is not closed which ever occurs first.

Coming to usage you can use both cookies and session in the same page.

We should go for cookies to store something that we want to know when the user returns to the web page in future (eg. remember me on this computer check box on login pages uses cookies to remember the user when he returns). Sessions should be used to remember something for that particular browser session (like the user name, to display on every page or where ever needed).

how to write and read cookies.

This eample code belongs to web site www.gotdotnet.com visit the following link for full example code and demo.

http://samples.gotdotnet.com/quickstart/aspplus/doc/stateoverview.aspx

Protected Sub Page_Load(sender As Object, e As EventArgs)
If Request.Cookies("preferences1") = Null Then
Dim cookie As New HttpCookie("preferences1")
cookie.Values.Add("ForeColor", "black")
...
Response.AppendCookie(cookie)
End If
End Sub

Protected Function GetStyle(key As String) As String
Dim cookie As HttpCookie = Request.Cookies("preferences1")
If cookie <> Null Then
Select Case key
Case "ForeColor"
Return(cookie.Values("ForeColor"))
Case ...
End Select
End If
Return("")
End Function

How to write and read session variables.

This example belongs to www.eggheadcafe.com visit the following link for quick summary and list of FAQs on Session State.

http://www.eggheadcafe.com/articles/20021016.asp

Basic use of Session in ASP.NET (C#):

STORE:
DataSet ds = GetDataSet(whatever parameters);
Session["mydataset")=ds;

RETRIEVE:
DataSet ds = (DataSet)Session["mydataset"];

Good Luck,

Sai Puli.



Above answer was rated as good by the following members:
satyanis1
March 16, 2006 17:14:00 #1
billmaher
Member Since: October 2005 Contribution: 2

RE: What is the difference between Session and Cookies...

As far as my knowledge is concerned, cookies are stored on client side where as sessions are server variables. The storage limitations are also there (like IE restricts the size of cookie to be not more than 4096 bytes). We can store only a string value in a cookie where as objects can be stored in session variables. The client will have to accept the cookies in order to use cookies, there is no need of user's approval or confirmation to use Session variables cos they are stored on server. The other aspect of this issue is cookies can be stored as long as we want(even for life time) if the user accepts them, but with session variables we can only store something in it as long as the session is not timed out or the browser window is not closed which ever occurs first.

Coming to usage you can use both cookies and session in the same page.

We should go for cookies to store something that we want to know when the user returns to the web page in future (eg. remember me on this computer check box on login pages uses cookies to remember the user when he returns). Sessions should be used to remember something for that particular browser session (like the user name, to display on every page or where ever needed).

how to write and read cookies.

This eample code belongs to web site www.gotdotnet.com visit the following link for full example code and demo.

http://samples.gotdotnet.com/quickstart/aspplus/doc/stateoverview.aspx

Protected Sub Page_Load(sender As Object, e As EventArgs)
If Request.Cookies("preferences1") = Null Then
Dim cookie As New HttpCookie("preferences1")
cookie.Values.Add("ForeColor", "black")
...
Response.AppendCookie(cookie)
End If
End Sub

Protected Function GetStyle(key As String) As String
Dim cookie As HttpCookie = Request.Cookies("preferences1")
If cookie <> Null Then
Select Case key
Case "ForeColor"
Return(cookie.Values("ForeColor"))
Case ...
End Select
End If
Return("")
End Function

How to write and read session variables.

This example belongs to www.eggheadcafe.com visit the following link for quick summary and list of FAQs on Session State.

http://www.eggheadcafe.com/articles/20021016.asp

Basic use of Session in ASP.NET (C#):

STORE:
DataSet ds = GetDataSet(whatever parameters);
Session["mydataset")=ds;

RETRIEVE:
DataSet ds = (DataSet)Session["mydataset"];

Good Luck,

Sai Puli.

RE: Explain the life cycle of an ASP .NET page.

Events in ASP.Net 1.1 & 2.0 :-

Application: BeginRequest
Application: PreAuthenticateRequest
Application: AuthenticateRequest
Application: PostAuthenticateRequest
Application: PreAuthorizeRequest
Application: AuthorizeRequest
Application: PostAuthorizeRequest
Application: PreResolveRequestCache
Application: ResolveRequestCache
Application: PostResolveRequestCache
Application: PreMapRequestHandler
Page: Construct
Application: PostMapRequestHandler
Application: PreAcquireRequestState
Application: AcquireRequestState
Application: PostAcquireRequestState
Application: PreRequestHandlerExecute
Page: AddParsedSubObject
Page: CreateControlCollection
Page: AddedControl
Page: AddParsedSubObject
Page: AddedControl
Page: ResolveAdapter
Page: DeterminePostBackMode
Page: PreInit
Control: ResolveAdapter
Control: Init
Control: TrackViewState
Page: Init
Page: TrackViewState
Page: InitComplete
Page: LoadPageStateFromPersistenceMedium
Control: LoadViewState
Page: EnsureChildControls
Page: CreateChildControls
Page: PreLoad
Page: Load
Control: DataBind
Control: Load
Page: EnsureChildControls
Page: LoadComplete
Page: EnsureChildControls
Page: PreRender
Control: EnsureChildControls
Control: PreRender
Page: PreRenderComplete
Page: SaveViewState
Control: SaveViewState
Page: SaveViewState
Control: SaveViewState
Page: SavePageStateToPersistenceMedium
Page: SaveStateComplete
Page: CreateHtmlTextWriter
Page: RenderControl
Page: Render
Page: RenderChildren
Control: RenderControl
Page: VerifyRenderingInServerForm
Page: CreateHtmlTextWriter
Control: Unload
Control: Dispose
Page: Unload
Page: Dispose
Application: PostRequestHandlerExecute
Application: PreReleaseRequestState
Application: ReleaseRequestState
Application: PostReleaseRequestState
Application: PreUpdateRequestCache
Application: UpdateRequestCache
Application: PostUpdateRequestCache
Application: EndRequest
Application: PreSendRequestHeaders
Application: PreSendRequestContent

Thanks,
Suresh.

No comments: