Coldfusion 迁移到CF2018并在会话中遇到问题

Coldfusion 迁移到CF2018并在会话中遇到问题,coldfusion,application.cfc,Coldfusion,Application.cfc,我最近将一个应用程序从CF2010迁移到CF2018,当用户登录时,我们的会话出现问题 添加一些转储和中止后,我发现会话已成功地在有效登录名上设置,但使用cflocation或cfheader时会丢失会话(application.cfc重新运行onSessionStart)。My application.cfc看起来像: this.applicationTimeout = createTimeSpan(0,8,0,0); this.sessionmanagement = true; this.c

我最近将一个应用程序从CF2010迁移到CF2018,当用户登录时,我们的会话出现问题

添加一些转储和中止后,我发现会话已成功地在有效登录名上设置,但使用cflocation或cfheader时会丢失会话(application.cfc重新运行onSessionStart)。My application.cfc看起来像:

this.applicationTimeout = createTimeSpan(0,8,0,0);
this.sessionmanagement = true;
this.clientmanagement = false;
this.sessiontimeout = createTimeSpan(0,0,20,0);
this.scriptProtect = "all";  
this.setClientCookies = true;
this.showDebugOutput = false;
this.enablecfoutputonly = false;
onSessionStart非常简单:

public void function onSessionStart() {
  lock scope="session" type="exclusive" timeout="10" {
    session.started = now();
    session.loggedIn = false;
  };
  lock scope="application" type="exclusive" timeout="5" {
    application.sessions = application.sessions + 1;
  };

  writeLog(file = "g-session-log", type = "information", application = "no", text = "session started:");
};

在处理登录页面时,我可以看到日志文件获得一个条目。在服务器管理中,我选中了“使用J2EE会话变量”和“启用会话变量”。Cookie超时为1440,选中HTTPOnly,并选中“禁用使用ColdFusion标记/函数更新ColdFusion内部Cookie”。

发现问题-如果其他人有此问题,则回答问题。在我的应用程序启动()中设置了http和https siteroot。在
上调用
application.secureSiteRoot
,但由于我要将SSL证书移到另一边进行测试,所以将其设置为http,而不是https。这阻止了cookies被设置