0
web.configに次のキーがあると、umbracoプレビューが正常に動作していますが、正しいコンテンツが表示されますが、私のWebサイトにログインできません。何の問題。Umbracoプレビューで正しいコンテンツが表示されない
次のキーをコメントアウトすると、自分のWebサイトにログインできますが、今回はumbracoプレビューで正しいコンテンツが表示されません。
プレビュー作業を行うために、またフロントエンドサイトにログインするにはどうすればよいですか?私はすでに解決策を探してきましたが、これまでこれを修正することはできませんでした。どんな助けもありがとうございます。
Umbracoバージョン7.4.3アセンブリ:1.0.5948.18141
キー:
<add key="owin:appStartup" value="UmbracoDefaultOwinStartup" />
マイOwinStartupクラス:
[assembly: OwinStartup(typeof(OwinStartup), "Configuration")]
namespace ABC.XYZ.Site
{
public class OwinStartup : UmbracoDefaultOwinStartup
{
public override void Configuration(IAppBuilder app)
{
base.Configuration(app);
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = "Cookies"
});
app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions());
app.Use((context, next) =>
{
var loggedInMarkerCookie = context.Request.Cookies[Settings.CookieLoggedInMarkerName];
var autoLoginAttempt = context.Request.Cookies[Settings.CookieLoggedInMarkerAttemptName];
if (!context.Authentication.User.Identity.IsAuthenticated && !context.Request.Path.Value.StartsWith("/sso/") && (loggedInMarkerCookie != null && autoLoginAttempt == null))
{
context.Response.Cookies.Append(Settings.CookieLoggedInMarkerAttemptName, DateTime.Now.ToString(), new CookieOptions { Expires = DateTime.Now.AddMinutes(30) });
context.Authentication.Challenge();
}
return next.Invoke();
});
}
}
}
お返事ありがとうございます。この質問にお答えするのはあなたの時間ですが、残念ながらあなたの提案は私の問題を解決しません。 –
あなたのアプリケーションの設定も間違っていると思います。上記を参照してください。 –