I have got a problem with using Session at Sharepoint 2010.

I use this code:

        Session["Dzien"] = TextBox3.Text;
        Session["Pracownik"] = DropDownList1.SelectedItem.Text;

I put at web.config this lines, and the error still showns:

<pages enableSessionState="true"

and next lines:

<modules runAllManagedModulesForAllRequests="true"> . . <remove name="Session" /> <add name="Session" type="System.Web.SessionState.SessionStateModule" preCondition="" /> . . </modules>

And the Error still showns:

enter image description here

1 Answer 1


Have you run this Powershell?

Enable-SPSessionStateService –DefaultProvision

This is also required for enable Session State in Sharepoint (MSDN)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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