473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

SessionManagement

Hi,
this is amit from india.

can anyone help regarding effective session management over a webfarm

precautions to take,etc.

thanks
Nov 18 '05 #1
7 1044
using session state specially when dealing with webfarms can be a
problem....
but asp.net does provide a lot of options....
you can choose to use a state server which would essentially use a seperate
process to maintain state.
you can use a dedicated server and make sure all the web.config files point
to that dedicated server.

you other option is to use sql server to store the session state... think it
uses tempdb to store the information though havent read bout that option to
a great detail...

Comparision between different options
http://msdn.microsoft.com/library/de...sp12282000.asp

http://msdn.microsoft.com/library/de...atesection.asp
config file sessionstate element info (can be set across application by
setting the machine.config or application level by setting the web.config)

hope this helps,

regards,

HD

"Amit Agarwal" <am**********@idealake.com> wrote in message
news:e1**************@TK2MSFTNGP12.phx.gbl...
Hi,
this is amit from india.

can anyone help regarding effective session management over a webfarm

precautions to take,etc.

thanks

Nov 18 '05 #2
hi,
hermit
thx for ur reply
i have been to these urls
have u practically went on to implement this case..
coz when u practically start
lot of hiccups arise..

anyway thx

r u from mumbai
"Amit Agarwal" <am**********@idealake.com> wrote in message
news:e1**************@TK2MSFTNGP12.phx.gbl...
Hi,
this is amit from india.

can anyone help regarding effective session management over a webfarm

precautions to take,etc.

thanks

Nov 18 '05 #3
yes when you implement it you will come across some issues... please do post
it here cause we do have a lot of gurus around and should be able help you
in case you have a problem....

yes i am from india though not in india any more... was in bombay for almost
2 years before i moved to london.

--

Regards,

HD
"Amit Agarwal" <am**********@idealake.com> wrote in message
news:ub**************@TK2MSFTNGP10.phx.gbl...
hi,
hermit
thx for ur reply
i have been to these urls
have u practically went on to implement this case..
coz when u practically start
lot of hiccups arise..

anyway thx

r u from mumbai
"Amit Agarwal" <am**********@idealake.com> wrote in message
news:e1**************@TK2MSFTNGP12.phx.gbl...
Hi,
this is amit from india.

can anyone help regarding effective session management over a webfarm

precautions to take,etc.

thanks


Nov 18 '05 #4
Additionnaly it can be handled at the hardware level (ie when an IP address
is first received the request will be served by a chosen server and if the
same IP comes again, the request will be directed to the same server).

If a particular server is shutdown its users will have to relog but the
inproc state managament is still a possible option.

--

"Hermit Dave" <he***********@CAPShotmail.com> a écrit dans le message de
news:eG**************@tk2msftngp13.phx.gbl...
using session state specially when dealing with webfarms can be a
problem....
but asp.net does provide a lot of options....
you can choose to use a state server which would essentially use a seperate process to maintain state.
you can use a dedicated server and make sure all the web.config files point to that dedicated server.

you other option is to use sql server to store the session state... think it uses tempdb to store the information though havent read bout that option to a great detail...

Comparision between different options
http://msdn.microsoft.com/library/de...sp12282000.asp
http://msdn.microsoft.com/library/de...atesection.asp config file sessionstate element info (can be set across application by
setting the machine.config or application level by setting the web.config)

hope this helps,

regards,

HD

"Amit Agarwal" <am**********@idealake.com> wrote in message
news:e1**************@TK2MSFTNGP12.phx.gbl...
Hi,
this is amit from india.

can anyone help regarding effective session management over a webfarm

precautions to take,etc.

thanks



Nov 18 '05 #5
hi Hermit,
this is amit

my site is on two webservers
configured both in sqlserver mode.
I am not able to maintain state as i do not have identical Appname in the
ASPState database for the site.

how to make the appname in DB same

i guess some changes in the IIS metabase

THx

amit agarwal

"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
yes when you implement it you will come across some issues... please do post it here cause we do have a lot of gurus around and should be able help you
in case you have a problem....

yes i am from india though not in india any more... was in bombay for almost 2 years before i moved to london.

--

Regards,

HD
"Amit Agarwal" <am**********@idealake.com> wrote in message
news:ub**************@TK2MSFTNGP10.phx.gbl...
hi,
hermit
thx for ur reply
i have been to these urls
have u practically went on to implement this case..
coz when u practically start
lot of hiccups arise..

anyway thx

r u from mumbai
"Amit Agarwal" <am**********@idealake.com> wrote in message
news:e1**************@TK2MSFTNGP12.phx.gbl...
Hi,
this is amit from india.

can anyone help regarding effective session management over a webfarm

precautions to take,etc.

thanks



Nov 18 '05 #6
amit,

have a look at this
http://msdn.microsoft.com/library/de...ssionstate.asp

copying some text off the article... good article worth a read...

If you use out-of-process session storage, the session state will still be
there, ready for further use, whatever happens to the ASP.NET worker
process. If the service is paused, the data is preserved and automatically
retrieved when the service resumes. However, if the state provider service
is stopped or fails, the data is lost. If robustness is key for your
application, drop the StateServer mode in favor of SQLServer.

<configuration>
<system.web>
<sessionState
mode="SQLServer"
sqlConnectionString="server=127.0.0.1;uid=<user
id>;pwd=<password>;" />
</system.web>
</configuration>
You specify the connection string through the sqlConnectionString attribute.
Notice that the attribute string must include user ID, password, and server
name. It cannot contain tokens, such as Database and Initial Catalog,
because this information defaults to fixed names. User ID and passwords can
be replaced by integrated security settings.

How is the database created? ASP.NET provides two pairs of scripts to
configure the database environment. The scripts in the first pair are named
InstallSqlState.sql and UninstallSqlState.sql and are located in the same
folder as the session state NT service. They create a database called
ASPState and several stored procedures. The data, though, is stored in the
SQL Server temporary storage area-the TempDB database. This means that the
session data is lost if the SQL Server machine is restarted.

To work around this limitation, use the second pair of scripts. The names of
the scripts are InstallPersistSqlState.sql and UninstallPersistSqlState.sql.
In this case, an ASPState database is created, but its tables are created
within the same database and as such are persistent. When installing the SQL
Server support for sessions, a job is also created to delete expired
sessions from the session-state database. The job is named
ASPState_Job_DeleteExpiredSessions and runs every minute. Note that the
SQLServerAgent service needs to be running in order for the job to work.

Whatever mode you choose, the way of coding session state actions doesn't
change. You always work against the Session property and read and write
values as usual. Any behavioral difference is handled at a lower abstraction
layer. State serialization is perhaps the most important difference between
session modes.
--

Regards,

HD
"Amit Agarwal" <am**********@idealake.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
hi Hermit,
this is amit

my site is on two webservers
configured both in sqlserver mode.
I am not able to maintain state as i do not have identical Appname in the
ASPState database for the site.

how to make the appname in DB same

i guess some changes in the IIS metabase

THx

amit agarwal

"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
yes when you implement it you will come across some issues... please do

post
it here cause we do have a lot of gurus around and should be able help you in case you have a problem....

yes i am from india though not in india any more... was in bombay for

almost
2 years before i moved to london.

--

Regards,

HD
"Amit Agarwal" <am**********@idealake.com> wrote in message
news:ub**************@TK2MSFTNGP10.phx.gbl...
hi,
hermit
thx for ur reply
i have been to these urls
have u practically went on to implement this case..
coz when u practically start
lot of hiccups arise..

anyway thx

r u from mumbai
"Amit Agarwal" <am**********@idealake.com> wrote in message
news:e1**************@TK2MSFTNGP12.phx.gbl...
> Hi,
> this is amit from india.
>
> can anyone help regarding effective session management over a webfarm >
> precautions to take,etc.
>
> thanks
>
>



Nov 18 '05 #7
hi,
hermi
thx very much for the link..

that is very informative link.
thx again
not only for session but also for other topics like whidbey!!!
bye keep in touch

"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message
news:Oc**************@TK2MSFTNGP10.phx.gbl...
amit,

have a look at this
http://msdn.microsoft.com/library/de...ssionstate.asp
copying some text off the article... good article worth a read...

If you use out-of-process session storage, the session state will still be
there, ready for further use, whatever happens to the ASP.NET worker
process. If the service is paused, the data is preserved and automatically
retrieved when the service resumes. However, if the state provider service
is stopped or fails, the data is lost. If robustness is key for your
application, drop the StateServer mode in favor of SQLServer.

<configuration>
<system.web>
<sessionState
mode="SQLServer"
sqlConnectionString="server=127.0.0.1;uid=<user
id>;pwd=<password>;" />
</system.web>
</configuration>
You specify the connection string through the sqlConnectionString attribute. Notice that the attribute string must include user ID, password, and server name. It cannot contain tokens, such as Database and Initial Catalog,
because this information defaults to fixed names. User ID and passwords can be replaced by integrated security settings.

How is the database created? ASP.NET provides two pairs of scripts to
configure the database environment. The scripts in the first pair are named InstallSqlState.sql and UninstallSqlState.sql and are located in the same
folder as the session state NT service. They create a database called
ASPState and several stored procedures. The data, though, is stored in the
SQL Server temporary storage area-the TempDB database. This means that the
session data is lost if the SQL Server machine is restarted.

To work around this limitation, use the second pair of scripts. The names of the scripts are InstallPersistSqlState.sql and UninstallPersistSqlState.sql. In this case, an ASPState database is created, but its tables are created
within the same database and as such are persistent. When installing the SQL Server support for sessions, a job is also created to delete expired
sessions from the session-state database. The job is named
ASPState_Job_DeleteExpiredSessions and runs every minute. Note that the
SQLServerAgent service needs to be running in order for the job to work.

Whatever mode you choose, the way of coding session state actions doesn't
change. You always work against the Session property and read and write
values as usual. Any behavioral difference is handled at a lower abstraction layer. State serialization is perhaps the most important difference between session modes.
--

Regards,

HD
"Amit Agarwal" <am**********@idealake.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
hi Hermit,
this is amit

my site is on two webservers
configured both in sqlserver mode.
I am not able to maintain state as i do not have identical Appname in the
ASPState database for the site.

how to make the appname in DB same

i guess some changes in the IIS metabase

THx

amit agarwal

"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...
yes when you implement it you will come across some issues... please
do post
it here cause we do have a lot of gurus around and should be able help

you in case you have a problem....

yes i am from india though not in india any more... was in bombay for

almost
2 years before i moved to london.

--

Regards,

HD
"Amit Agarwal" <am**********@idealake.com> wrote in message
news:ub**************@TK2MSFTNGP10.phx.gbl...
> hi,
> hermit
> thx for ur reply
> i have been to these urls
> have u practically went on to implement this case..
> coz when u practically start
> lot of hiccups arise..
>
> anyway thx
>
> r u from mumbai
> "Amit Agarwal" <am**********@idealake.com> wrote in message
> news:e1**************@TK2MSFTNGP12.phx.gbl...
> > Hi,
> > this is amit from india.
> >
> > can anyone help regarding effective session management over a webfarm > >
> > precautions to take,etc.
> >
> > thanks
> >
> >
>
>



Nov 18 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Carnahan | last post by:
I'm using a shared Hosted IP "Brinkster" and the Session Variables keep being lost between page calls. Here is their response to the problem. "Brinkster's customers are run from redundant, load...
4
by: qube3 | last post by:
We have applications written by JSP/Servlet and ASP.NET. All our future development would be based on ASP.NET. We wants to develop a single user interface so that users would not be aware that...
2
by: Gucci | last post by:
I need to realize such an effect. if one user has login, the session will keep until he logout. but if i change the set of session.gc_maxlifetime it will take too much system resource. i plan...
3
by: sourabhmca | last post by:
Hi, I am creating small project on jsp.I want that when the user go to back page. Page should be expaire. it means project should runs only forwardwise plz help.
7
by: agoyal2 | last post by:
Hi Guys, I am a ColdFusion newbie and this might be a stupid question for the experienced folks: I have a coldfusion application which uses session to store the logged on user-id (A database...
0
by: =?Utf-8?B?a2V2aW4=?= | last post by:
.....using VS2005, AJAX 1.0 and Windows Workflow Foundation/.net 3.0 The initial page (with four datagridview controls and 7 UpdatePanels) Originally I got the error message defined in the...
4
by: benjaminkang | last post by:
I'm very new to Coldfusion and action script, but due to job requirements, i got allocated the task of developing a cfm page where the user logs in using the embedded swf file and everything was...
0
by: benjaminkang | last post by:
I'm very new to Coldfusion and action script, but due to job requirements, i got allocated the task of developing a cfm page where the user logs in using the embedded swf file and everything was...
5
by: chromis | last post by:
Hi there, I've recently been updating a site to use locking on application level variables, and I am trying to use a commonly used method which copies the application struct into the request...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.