+1-888-365-2779
Try Now
More in this section

Forums / 3.x Pre-release forums (retired) / Poll causes session state error

Poll causes session state error

6 posts, 0 answered
  1. Matt Shepherd
    Matt Shepherd avatar
    5 posts
    Registered:
    02 Nov 2006
    22 Mar 2007
    Link to this post
    When adding a poll to a page, upon publishing i receive this error.  Browsing to the page also results in the same.

    Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.
  2. Matt Shepherd
    Matt Shepherd avatar
    5 posts
    Registered:
    02 Nov 2006
    22 Mar 2007
    Link to this post
    it appears to be when you have voted, ie, trying to display the results.
  3. Vassil Daskalov
    Vassil Daskalov avatar
    261 posts
    Registered:
    18 May 2013
    22 Mar 2007
    Link to this post
    Hello Matt,

    The problem appears if you have set the enableSessionState attribute of the Page directive to false. Due to the fact that RadChart stores the image it creates in the session variable, an exception occurs.

    Fortunately, there is a solution for that situation. You should set the UseSession property of the RadChart to false, create a folder ~/Temp and set write permissions to it. More detailed information you can find here: http://www.telerik.com/help/aspnet/chart/?chrtDisableSessionUsage.html.

    You can use ~\Common\Templates\Polls\ResultsTemplate.ascx or ~\Common\Templates\Polls\ResultsTemplateNoLegend.ascx to set the UseSession property of the RadChart. The first template is used if the PollBox -> ResultsBox UseLegend is set to true (poll answers results are displayed in one image), and the second one when that property is false (poll answers results are displayed in separate images).

    Hope this helps. Let me know if you need any further assistance.

    Best wishes,
    Vassil Daskalov
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
  4. Venkat
    Venkat avatar
    105 posts
    Registered:
    20 Nov 2008
    28 Jan 2011
    Link to this post
    Hi,

    We are using Sitefinity 3.7  and Poll is working fine  on local, but when we deployed it on production server, we got the same error messge 'Can not load RadChart ...'

    We are using load balancing on  the production, So I tried to set UseSession to false , but when I tried to edit the poll box on the admin section, I havent found the Property on Poll Box ,Its not there on Results Box as well.

    I tried to use custom template given by Sitefinity for PollBox , but It contain just a repeater no chart control present in it.
    How can I set UseLegend property of a poll box/Results box ? I did not find it.

    Please guide me on this.

    Thanks
    Venkat
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    30 Sep 2016
    02 Feb 2011
    Link to this post
    Hello Matt ,

    Can you send the full stack of the error you are getting. The thread is quite old and the control was rewritten and I want to see the full stack.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Venkat
    Venkat avatar
    105 posts
    Registered:
    20 Nov 2008
    23 Mar 2011
    Link to this post
    I have created a custom poll box to display poll results  with out images.We can customize its width, Bar Color and Main Color on the admin side. It uses cookie to block the user from voting again.

    Here is the  full description of the this Custom poll Box in the below link.

    http://vangalvenkat.blogspot.com/2011/03/sitefinity-custom-pollbox.html

    Thanks
    Venkat
Register for webinar
6 posts, 0 answered