Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 29, 2012 11:09 AM by mm10
Member
118 Points
425 Posts
Apr 28, 2012 07:15 PM|LINK
Hi,
My local development machine session working sine, when i upload to hosting machine when my page change session value become null, Why that
Here i set session values
this.HttpContext.Session["ReportName"] = "MerchandiserReport.rpt"; this.HttpContext.Session["rptSource"] = GetDetailsfordate(viewModelReport.VendorId, viewModelReport.AccountCallId, viewModelReport.AccountCallIdTo ); return RedirectToAction("ShowReport", "GenericReportViewer");
This place i read session values
string strReportName = System.Web.HttpContext.Current.Session["ReportName"].ToString(); // Setting FromDate string AccountCallId=null; if(System.Web.HttpContext.Current.Session["AccountCallId"]!=null) AccountCallId = System.Web.HttpContext.Current.Session["AccountCallId"].ToString(); var rptSource = System.Web.HttpContext.Current.Session["rptSource"];
Everything working fime with my development machine, but hosting machine raise error
Becouse session variable becoming null when it reading point
lakmal
Contributor
6409 Points
1184 Posts
Apr 29, 2012 11:09 AM|LINK
Make sure your web.config includes
<pages enableSessionState="true"> <sessionState mode="InProc" timeout="30" />
gslakmal
Member
118 Points
425 Posts
Session value get null
Apr 28, 2012 07:15 PM|LINK
Hi,
My local development machine session working sine, when i upload to hosting machine when my page change session value become null, Why that
Here i set session values
this.HttpContext.Session["ReportName"] = "MerchandiserReport.rpt"; this.HttpContext.Session["rptSource"] = GetDetailsfordate(viewModelReport.VendorId, viewModelReport.AccountCallId, viewModelReport.AccountCallIdTo ); return RedirectToAction("ShowReport", "GenericReportViewer");This place i read session values
string strReportName = System.Web.HttpContext.Current.Session["ReportName"].ToString(); // Setting FromDate string AccountCallId=null; if(System.Web.HttpContext.Current.Session["AccountCallId"]!=null) AccountCallId = System.Web.HttpContext.Current.Session["AccountCallId"].ToString(); var rptSource = System.Web.HttpContext.Current.Session["rptSource"];Everything working fime with my development machine, but hosting machine raise error
Becouse session variable becoming null when it reading point
lakmal
mm10
Contributor
6409 Points
1184 Posts
Re: Session value get null
Apr 29, 2012 11:09 AM|LINK
Make sure your web.config includes
<pages enableSessionState="true">
<sessionState mode="InProc" timeout="30" />