Questions tagged [asp.net-authentication]

Questions regarding ASP.NET identity authentication methods

ASP.NET, in conjunction with Microsoft Internet Information Services (IIS), can authenticate user credentials such as names and passwords using any of the following authentication methods:

  • Windows: Basic, digest, or Integrated Windows Authentication (NTLM or Kerberos).

  • Forms authentication, in which you create a login page and manage authentication in your application.

  • Client Certificate authentication

ASP.NET controls access to site information by comparing authenticated credentials, or representations of them, to NTFS file system permissions or to an XML file that lists authorized users, authorized roles (groups), or authorized HTTP verbs.

ASP.NET Web Application Security

185 questions
5
votes
1 answer

What is the difference between services.AddAuthentication() and services.AddAuthorization() in asp net core?

I have the following code and i want to understand what is the difference between those two extension methods. What each one do? services.AddAuthentication (JwtBearerDefaults.AuthenticationScheme) .AddJwtBearer (options =>…
5
votes
2 answers

Asp.net core 2 - External Authentication in WebApi

Now I know there are lots of post about this already but my case is different. So please bear with me. When I create a WebApi on .Net Framework and choose Individual User accounts, it already scaffolds me a working code for external authentication.…
5
votes
1 answer

How do I issue the corresponding Bearer and Cookie identity in ASP.NET with multiple Authorization schemes?

This documentation describes in part how to use more than one authentication scheme: In some scenarios, such as Single Page Applications it is possible to end up with multiple authentication methods. For example, your application may use…
makerofthings7
  • 60,103
  • 53
  • 215
  • 448
5
votes
1 answer

How to add "ApiController" with token authentication inside Asp Net Core RC1 MVC

I know that this question could receive some downvotes, but I'm searching on Google for three days, with no really usable results. I've created a default ASP.NET Core 1.0 RC1 project in Visual Studio, with Individual User Account…
4
votes
4 answers

Very simple single user login in ASP.NET MVC2?

I'm building my site, and I want to restrict a part of my site (The admin parts) from normal public display. I am using LINQ for database access. I have a Service class to handle calls to the database through LINQ I have the whole site running,…
4
votes
1 answer

Setting Up LinkedIn/OAuth Authentication in ASP.NET Core 2.0

I'm trying to add LinkedIn authentication to my ASP.NET Core 2.0 app but getting the following error: No authentication handler is configured to handle the scheme: LinkedIn Here's how I add LinkedIn/OAuth authentication in the ConfigureServices in…
Sam
  • 26,817
  • 58
  • 206
  • 383
4
votes
1 answer

Replace value in cookie ASP.NET Core 1.0

I'm using the cookie middleware in ASP.NET Core 1.0 without ASP.NET Identity - as described in this article: https://docs.asp.net/en/latest/security/authentication/cookie.html When a user makes certain changes to his/her profile, I need to change…
4
votes
3 answers

ASP.Net MVC 6 + WebAPI Auth - Redirect MVC to logon but 401 if WebAPI

I have a AngularJS + MVC + WebAPI where I'm trying to: - Use standard (individual accounts) for MVC authentication; - Use those same users and password for WebAPI based authentication. Problem, from AngularJS everything works fine, the cookie…
4
votes
2 answers

ASP.NET Identity - What method creates the tables?

When you create a new MVC5 project in VS2013 with Individual User Accounts, the account tables (dbo.AspNet*) are created automatically in the database defined by the DefaultConnection the first time you try to log in or register a new account. Does…
3
votes
1 answer

ASP.net Windows authentication compared to Forms authentication using ActiveDirectoryMembershipProvider

I was wondering if someone could explain the difference between forms authentication using the ActiveDirectoryMembershipProvider, and Windows authentication. When would one be used over the other and what would the benefit be? I am working on an…
Jason
  • 1,226
  • 12
  • 23
3
votes
0 answers

Error setting Twitter external sign-in with ASP.NET Core

I have a ASP.Net Core 2.2 application and the twitter authorization has started showing an Response status code does not indicate success: 403 (Forbidden) error. I have triple checked the ClientId, ClientSecret and also the Website url, callback…
Ajit Goel
  • 4,180
  • 7
  • 59
  • 107
3
votes
4 answers

System.InvalidOperationException: Scheme already exists: Identity.Application

I wanted to add my own custom data for users so I was following the tutorial Add, download, and delete custom user data to Identity in an ASP.NET Core project I already had an existing application so I could not follow that tutorial line by line (my…
Sagick
  • 317
  • 2
  • 6
  • 20
3
votes
2 answers

Increase life time for Asp.net authentication cookie

I used this following code to set authenticate cookie : System.Web.Security.FormsAuthentication.SetAuthCookie(Profile.Email, true); my question is how I can increase life-time for this authentication cookie ?
kamiar3001
  • 2,646
  • 4
  • 42
  • 78
3
votes
4 answers

.NET CMS with custom authentication

I know there's tons of questions about .NET based CMS out there, but I have some specifics things I'm looking for. 1) Be able to leverage our application's existing authentication (We have our own implementation of of…
3
votes
1 answer

Migrating Authentication from dotnet core 1.1 to dotnet core 2.0

We just migrated our authentication middleware from .net core 1.1 to .net core 2.0, following the example from this answer. Everything builds and runs, however, when I try to make a request (even when trying to get to the Swagger UI) I get the…
1
2
3
12 13