You must Sign In to post a response.
  • Category: ASP.NET

    What is Session State Setting need our Application.



    What is Session State in Webconfig File?

    I have create new web application but my Webconfig created like this

    <sessionState mode="InProc" customProvider="DefaultSessionProvider">

    But Why we need use this line ?

    then after i search google change this line like this

    sqlConnectionString="data source=localhost;initial catalog=YourAspStateDatabase;user id=yourLogin;password=yourpassword" cookieless="false" timeout="30"/>

    But i meet following error comes

    error this
    Unable to use SQL Server because either ASP.NET version 2.0 Session State is not installed on the SQL server, or ASP.NET
    does not have permission to run the dbo.TempGetVersion stored procedure. If the ASP.NET Session State schema has not been installed,
    please install ASP.NET Session State SQL Server version 2.0 or above. If the schema has been installed, please grant execute permission
    on the dbo.TempGetVersion stored procedure to either the ASP.NET application pool identity, or the Sql Server user specified in the sqlConnectionString attribute.

    But I need must know why we use Session State in our webconfig file what is purpose for this

    any one guide me.
  • #762553

    By default, the unique identifier for a session is stored in a non-expiring session cookie in the browser. You can specify that session identifiers not be stored in a cookie by setting the cookieless attribute to true in the sessionState configuration element.

    Where it's gets stored if we set Cookieless attribute to true ; it's get's stored in URL of the Browser.

    If you want to set mode of session state, then you want to know the usage of that.

    Mode: it's describes the session state, and where the session object will get stored etc...

    there are 2 types
    1) Inproc ( Default)
    2) OutProc, In outproc we have types again SQLServer and StateServer.

    InProc: It's stores the session object in memory on the Web server.
    SQL Server :It's store the session object in SQL Database.
    StateServer : It's store the session object in separate process called the ASP.NET state service

    If you want to know more about this session state refer below link.

    Hope this will helpful to you...

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #762554

    In order to use the settings for entire website we write those settings in web.config file.

    Coming to sql server session mode we have to do some settings to work in our application.

    You can go through below questions in our DNS which are already asked.


    Sai Krishna Reddy.

  • Sign In to post your comments