Click here to Skip to main content
15,887,881 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionDynamic Linq Query in vb.net Pin
murali_utr12-Aug-14 18:51
murali_utr12-Aug-14 18:51 
AnswerRe: Dynamic Linq Query in vb.net Pin
Bernhard Hiller12-Aug-14 21:11
Bernhard Hiller12-Aug-14 21:11 
QuestionFetch data from database based checkboxlist selection getting error Pin
Venugopal626412-Aug-14 17:34
Venugopal626412-Aug-14 17:34 
AnswerRe: Fetch data from database based checkboxlist selection getting error Pin
Bernhard Hiller12-Aug-14 21:14
Bernhard Hiller12-Aug-14 21:14 
QuestionSession variable expires even though session time was set to 9 hours. Pin
Kandepu Rajesh12-Aug-14 9:12
Kandepu Rajesh12-Aug-14 9:12 
AnswerRe: Session variable expires even though session time was set to 9 hours. Pin
Kornfeld Eliyahu Peter12-Aug-14 20:20
professionalKornfeld Eliyahu Peter12-Aug-14 20:20 
AnswerRe: Session variable expires even though session time was set to 9 hours. Pin
Swinkaran12-Aug-14 21:28
professionalSwinkaran12-Aug-14 21:28 
QuestionSession_Start not fire in IIS7 - Windows Server 2008 (64bit) Pin
android_lee11-Aug-14 23:01
professionalandroid_lee11-Aug-14 23:01 
Dear all,

I have developed website statistic based on ASP .NET and MVC technology. In local environment, it run corectly but in production Server (IIS 7 + Windows server 2008 - 64bit) it not fire Session_OnStart (or Session_Start) event so I can not check and save the counters.

Could anyone help me to fix this problem?

My web.config is:
XML
<system.web>
    <compilation targetFramework="4.0" debug="true" />
    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login" timeout="2880" />
    </authentication>
    <pages enableSessionState="true">
      <namespaces>
        <add namespace="System.Web.Helpers" />
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Optimization" />
        <add namespace="System.Web.Routing" />
        <add namespace="System.Web.WebPages" />

      </namespaces>
    </pages>
    <sessionState mode="InProc" timeout="20" />
  </system.web>


another parameter:

XML
<system.webServer>
   <validation validateIntegratedModeConfiguration="false" />
   <modules runAllManagedModulesForAllRequests="true">
   </modules>
</system.webServer>


and Session_OnStart & Session_OnEnd event in Global.asax:
C#
public void Session_OnStart()
{
    Application.Lock();
    Application["OnlineUsers"] = (int)Application["OnlineUsers"] + 1;
    Application.UnLock();
}

public void Session_OnEnd()
{
    Application.Lock();
    Application["OnlineUsers"] = (int)Application["OnlineUsers"] - 1;
    Application.UnLock();
}

AnswerRe: Session_Start not fire in IIS7 - Windows Server 2008 (64bit) Pin
Kornfeld Eliyahu Peter12-Aug-14 20:29
professionalKornfeld Eliyahu Peter12-Aug-14 20:29 
GeneralRe: Session_Start not fire in IIS7 - Windows Server 2008 (64bit) Pin
android_lee17-Aug-14 21:49
professionalandroid_lee17-Aug-14 21:49 
QuestionHow do I customize the URL users get sent to after logging out (ServiceStack)? Pin
JMK-NI9-Aug-14 23:37
professionalJMK-NI9-Aug-14 23:37 
AnswerRe: How do I customize the URL users get sent to after logging out (ServiceStack)? Pin
Kornfeld Eliyahu Peter10-Aug-14 2:07
professionalKornfeld Eliyahu Peter10-Aug-14 2:07 
Questionproblem after publishing a website Pin
Member 105108496-Aug-14 22:50
Member 105108496-Aug-14 22:50 
AnswerRe: problem after publishing a website Pin
jkirkerx7-Aug-14 10:45
professionaljkirkerx7-Aug-14 10:45 
GeneralRe: problem after publishing a website Pin
Member 1051084911-Aug-14 21:37
Member 1051084911-Aug-14 21:37 
AnswerRe: problem after publishing a website Pin
Bernhard Hiller7-Aug-14 21:33
Bernhard Hiller7-Aug-14 21:33 
QuestionA custom error instead of built in error Pin
ThetaClear6-Aug-14 22:05
ThetaClear6-Aug-14 22:05 
AnswerRe: A custom error instead of built in error Pin
Richard Deeming7-Aug-14 1:47
mveRichard Deeming7-Aug-14 1:47 
GeneralRe: A custom error instead of built in error Pin
ThetaClear7-Aug-14 4:16
ThetaClear7-Aug-14 4:16 
QuestionNee to prepare for Audit trails for my web application Pin
demoninside95-Aug-14 19:57
demoninside95-Aug-14 19:57 
AnswerRe: Nee to prepare for Audit trails for my web application Pin
Richard MacCutchan6-Aug-14 5:19
mveRichard MacCutchan6-Aug-14 5:19 
QuestionAsp,net web hosting Pin
Otekpo Emmanuel5-Aug-14 15:31
Otekpo Emmanuel5-Aug-14 15:31 
AnswerRe: Asp,net web hosting Pin
Nitin S5-Aug-14 23:08
professionalNitin S5-Aug-14 23:08 
AnswerRe: Asp,net web hosting Pin
Swinkaran10-Aug-14 20:13
professionalSwinkaran10-Aug-14 20:13 
AnswerRe: Asp,net web hosting Pin
Swinkaran10-Aug-14 20:26
professionalSwinkaran10-Aug-14 20:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.