StateServer Session Mode with Class (Object) ASP.NET

First of all, ASP.NET State Service is to be on to use StateServer Session.
Place this piece of code in your Web.Config File.


sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false" timeout="120"

Now you can start using StateServer Session, rest of the steps are same all kind of Sessions.

However, if you are storing any Class's Object in StateServer Session, this particular class requires Serialization. Have a look at this User Class, it's object can be stored in StateServer Session.


[Serializable]
public class User
{
    private string userName;
    private string userPassword;
    private string userTitle;
    private bool isUserAuthenticate;

If you want to how to store any Class's Object in Session have a look this Posting.

Thanks
A Rahim Khan

About these ads
    • iqbal
    • July 23rd, 2012

    hey mr rahim i hav 1 windows form using c# in visual stdio 2005,i hav added i sql database mdf file in tht prjct i wnt to my form to this database mdf file so tht my data frm form can be store in tht database.pls snd me solution on my email.i hav subscribed on ur blog

    • iqbal
    • July 23rd, 2012

    i wnt to connect my windows form to connect wit sql database mdf file in visual stdio 2005 using c# to store the data of windows form in tht sql mdf database

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 74 other followers

%d bloggers like this: