0

When Enable ASP.NET Session State in SharePoint (On SQL Server to persist session in database) would add sessionstate entry in all web applications on farm

  <sessionState mode="SQLServer" timeout="60" allowCustomSqlDatabase="true" 
  sqlConnectionString="Data Source=10.0.0.35;
  Initial Catalog=NewDataBaseName;Integrated Security=False;User ID= MyUserName;Password= MyPassword;
  Enlist=False;Pooling=True;Min Pool Size=0;Max Pool Size=100;Connect Timeout=15" />

Does it mean that all application Use Session Will save in database ? can i enable it for specific web application not all applications

0

You can disable it per web application by modifying the web configuration file and setting

<page enableSessionState="false"...

And to enable it

<page enableSessionState="true"...
  • can i still use session but session not save in database if i set enableSessionState=false in this application application ? in anther meaning can i have two application in the same farm use session one save session in database and one in tradition way? – Shereen Bashar Aug 7 '16 at 12:58
  • Yes.. so if you say false it will not use SessionState Service.. – Amal Hashim Aug 7 '16 at 12:59
  • it's not work , I have Two Application using session to save value but i just need one application to save in database and the other application in memory this not happend event if nableSessionState="false" because enable session but models <add name="Session" type="System.Web.SessionState.SessionStateModule" /> – Shereen Bashar Aug 8 '16 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.