我刚刚更新了Windows到创意套件,现在当我运行visual studio来开发我的应用程序时(使用apache cordova解决方案),当我点击保存文件时,它会从解决方案中删除文件并关闭编辑文件的窗口.
我可以对文件中的内容执行CTRL + F,然后它将再次打开文件并将其恢复到解决方案,但现在解决方案中的文件没有"锁定"图标.
我已经尝试更新visual studio,但显然我已经拥有最新版本的update 3.
它是在今天早上之前没有这样做的,那时我得到了Windows的创建者更新,所以我只能假设它与此有关?
如果有人可以提供帮助,那将非常感激,它让我疯了!我什么都没有得到任何错误.
visual-studio cordova visual-studio-cordova visual-studio-2015
我正在编写一个使用ASP.NET和Identity 2.0的Web API.只有在用户成功"登录"时,才能访问API.登录工作很棒,但注销(注销)似乎不起作用.这是我正在使用的一些代码:
身份配置:
public static OAuthBearerAuthenticationOptions OAuthBearerOptions { get; private set; }
public void Configuration(IAppBuilder app)
{
app.CreatePerOwinContext<IdentityDbContext<IdentityUser>>(HLAccountManager.CreateDbContext);
app.CreatePerOwinContext<UserManager<IdentityUser>>(HLAccountManager.CreateUserManager);
OAuthBearerOptions = new OAuthBearerAuthenticationOptions();
app.UseOAuthBearerAuthentication(OAuthBearerOptions);
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login")
});
GlobalConfiguration.Configuration.SuppressDefaultHostAuthentication();
GlobalConfiguration.Configuration.Filters.Add(new HostAuthenticationFilter("Bearer"));
}
Run Code Online (Sandbox Code Playgroud)
认证控制器:
[HttpPost]
[ActionName("Authenticate")]
[AllowAnonymous]
public String Authenticate(JObject data)
{
dynamic json = data;
string user = json.user;
string password = json.password;
if (string.IsNullOrEmpty(user) || string.IsNullOrEmpty(password))
return "failed";
var userIdentity = UserManager.FindAsync(user, password).Result;
if (userIdentity != null)
{
var identity = …Run Code Online (Sandbox Code Playgroud)