Specifically the client event OnClientResourcesPopulating does not maintain session state - I presume because it's not passing the current session state cookie to the webservice call.
I have set up a sample project showing the problem, which I set up using the example here: http://www.telerik.com/help/aspnet-ajax/scheduler-webservicebinding.html
The key parts are that in my Default.aspx I set a session variable like this:
namespace RSWSTest
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Session["TestSessionValue"] = "MyTestValue";
}
}
}
}
[WebMethod(EnableSession=true)]
public IEnumerable<ResourceData> GetResources(SchedulerInfo schedulerInfo)
{
object v = Session["TestSessionValue"]; //-- THIS RETURNS NULL
Session["WS_GetResourcesCalled"] = true; //-- THIS WORKS BUT NOT VISIBLE IN SUBSEQUENT CALLS
return Controller.GetResources(schedulerInfo);
}
[WebMethod(EnableSession=true)]
public IEnumerable<AppointmentData> GetAppointments(SchedulerInfo schedulerInfo)
{
object v = Session["TestSessionValue"]; //-- THIS RETURNS "MyTestValue"
Session["WS_GetAppointmentsCalled"] = true;
return Controller.GetAppointments(schedulerInfo);
}
I need to find a solution to this as I have session-based user security and I want to return different things based on which user is stored in the current session.
I can't attach my test solution because it'll only let me post image files - but I can email it to someone if it would help - it's only 19k zipped!