我在startup.cs上有这个
using Microsoft.Owin;
using Owin;
[assembly: OwinStartupAttribute(typeof(xx.yy.Startup))]
namespace xx.yy
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
}
}
}
我有这个 Startup.Auth.cs
using System;
using Microsoft.Owin;
using Microsoft.Owin.Security.Cookies;
using Owin;
namespace xx.yy
{
public static class xxAuthentication
{
public const String ApplicationCookie = "xxAuthenticationType";
}
public partial class Startup
{
public void ConfigureAuth(IAppBuilder app)
{
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = xxAuthentication.ApplicationCookie,
LoginPath = new PathString("/Login"),
Provider = new CookieAuthenticationProvider(),
CookieName = "ComisionesCookie",
CookieHttpOnly = true,
ExpireTimeSpan = TimeSpan.FromHours(12), // adjust to your needs
});
}
}
}
如果没有使用此错误编译:
答案 0 :(得分:6)
简单但很难找到,问题是另一个开发人员在项目结构的不同文件夹中创建了一个具有相同签名的startup.cs文件。这里会留下证据,因为它可能对其他开发人员有用
答案 1 :(得分:0)
您可能必须像这样在Startup类中构造成员:
react-intl