我们有一个ASP.NET MVC 5应用程序,它一直使用带有滑动过期的表单身份验证.我们最近切换到OWIN Cookie身份验证,并且遇到了我们的会话无法正常扩展的问题.
以前,可以从AJAX xhr请求扩展会话.但是,使用此配置,它们不会扩展.即使在服务器终止会话之后,我也会收到应该扩展的每个请求(GET和POST)的200.
目前的设置是:
app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
UrlHelper url = new UrlHelper(HttpContext.Current.Request.RequestContext);
app.UseCookieAuthentication(new CookieAuthenticationOptions()
{
AuthenticationType = "Cookies",
CookieSecure = CookieSecureOption.SameAsRequest,
CookieName = Constants.CatalystPortalCookieName,
LoginPath = new PathString(url.Action(nameof(LoginController.Index), "Login")),
SlidingExpiration = true,
ExpireTimeSpan = TimeSpan.FromMinutes(20),
CookiePath = "/",
});
Run Code Online (Sandbox Code Playgroud)
但是,如果单击导致整个页面作为文档响应加载的链接,则服务器会正确扩展会话.
我的团队正在从git merge工作流转向rebase工作流,我不明白我做错了什么.我主要是从这篇博文作为模板.最终,希望能够提交一个github pull请求,其中包含来自我的分支的提交,该请求与master没有合并冲突.如果拉请求只能包含我的提交(用于代码审查),那就太好了.
方案如下:
我从主人到我当地的分支机构:
git fetch
git rebase origin/master
Run Code Online (Sandbox Code Playgroud)我处理任何合并冲突,然后继续变基
git mergetool
git rebase --continue
Run Code Online (Sandbox Code Playgroud)因为我是唯一一个在我的分支上工作的人,所以我希望能够将我当前的状态推到一起
git push origin myBranch
Run Code Online (Sandbox Code Playgroud)但是,当我尝试推动时,我得到以下内容
$ git push origin myBranch
To <github address>
! [rejected] myBranch -> myBranch (non-fast-forward)
error: failed to push some refs to <github address>
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See …Run Code Online (Sandbox Code Playgroud)