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

    Editing web.config file

    Hi Team,

    what will happen if we remove session tag from web.config file.
    The options are like:
    A.sessions will not work
    B. sessions will work
    C. cookies can not be created
    D. View state can not be work

    Plz help me.
  • #763962
    Hi lakshmi sreeja.

    Session state mode we will specify in web.config file.
    like its inproc, state server or sql server.
    From your options answer is "sessions will work".
    You can directly use session variables with out even writing in the web.config file.
    However it is not related to cookies. You can use any of the state management technique as per the requirement.

    Sridhar Thota.
    Editor: DNS Forum.

  • #763968

    Session will work based on enablesessionstate property set to true I.e. either in config level or page level.

    Coming back to your question if you remove session tag in webconfig and in page level also not enabled then the option is " session state will not work".

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

    Blog :

  • #763976
    "InProc" is the default sessionState. If you remove the sessionState, it will use the default one(InProc").

    Following are the other options

    Off-Indicates that session state is not enabled.
    InProc-Indicates that session state is stored locally.
    StateServer-Indicates that session state is stored on a remote server.
    SQLServer-Indicates that session state is stored on the SQL Server.

    <sessionState mode="Off|InProc|StateServer|SQLServer"
    timeout="number of minutes"
    sqlConnectionString="sql connection string"
    stateNetworkTimeout="number of seconds"/>

    By Nathan
    Direction is important than speed

  • #763996
    Hai Lakshmi Sreeja,
    I think, when we remove the session tag from the web.cofig file, the cookies can not be created as the session internally stores in the cookies.
    Hope it will be helpful to you.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

  • Sign In to post your comments