Click here to Skip to main content
15,894,017 members
Everything / Authentication

Authentication

authentication

Great Reads

by Aram Tchekrekjian
JWT is a very common and easy way to protect APIs in a standard, URL safe and cross-platform methodology.
by DotNetLead.com
Azure AD for authentication and authorization of users for your website
by ASP.NET Community
Reference about Forms Authentication in ASP.NET
by Thang Believe
Deep dive into cookies generation to support Remember Me at login

Latest Articles

by Nicolas DESCARTES
How to implement authentication in Blazor and ASP.NET Core ?
by Jim_Gray
Example code showing how to use Subtle Crypto to sign your request to Azure API in pure JavaScript or jQuery
by Ohad Redlich
authentication-flows-js is a powerful and highly customizable middleware for Node.js that covers all flows that any express-based authentication-server needs
by DotNetLead.com
Azure AD for authentication and authorization of users for your website

All Articles

Sort by Title

Authentication 

23 Jan 2013 by Jeroen E
I have the following situation:An android app is calling my c# webservice. In the HTTP header there will be a token which I have to check each time my webservice is called in order to validate the identity of the caller.I would like to stress that my webservice is not a WCF service, its...
23 Jan 2013 by Manish_nautiyal
You will have to create the token derived from soapheader class.public class TokenHeader : System.Web.Services.Protocols.SoapHeader{ public string tokenNo; }in the web service class use public TokenHeader token;[WebMethod] [SoapHeader("token",Required=true)] ...
24 Jan 2013 by Jeroen E
This is what I came up with:namespace TestServiceHttpAuthentication{ public class AuthenticateRequestHttpModule : IHttpModule { private HttpApplication mHttpApp; public void Init(HttpApplication httpApp) { this.mHttpApp =...
5 Jul 2012 by Sumit Chawla
2-Legged OAuth Authentication in .NET (C#)
1 Jun 2023 by Member 15418280
We want to implement microsoft 2FA in our mvc application. our network team asked 2 things to share. 1-Entity ID 2- ACS URL How can we implement entity ID and ACS URL in MVC application. Any help will be highly appreciated. What I have tried:...
25 Oct 2021 by sanjayv.gade
Hi All,I am getting below error message:"401 - Unauthorized: Access is denied due to invalid credentials"When i trying to login our website remotly it gives access denied error.if i changed authentication mode "Windows" in IIS7.5 on our staging server then i can logged into...
10 Jul 2012 by sanjayv.gade
Issue solved:1. Open iis and select the website that is causing the 4012. Open the “Authentication” property under the “IIS” header3. Click the “Windows Authentication” item and click “Providers”4. Move NTLM at topand BAM that's fixed it.
4 Sep 2014 by Rajendra Varadaraju
Step 1] Go to the respective path for example D:\...\ImagesStep 2] Open web.config and comment authorization/allow for specific users
17 Nov 2014 by AjeetYadav
Right click on folder and choose Properties. In Security tab add ‘IUSER’ and 'NETWORK SERVICE' and give full control to both user.
10 Jan 2015 by scemis
1. Open IIS and select the website that is causing the 4012. Open the "Authentication" property under the "IIS" header3. Right Click the "Anonymous Authentication" item and click "Edit"4. Select "Application Pool Identity" in popup5. Click OK
21 Feb 2016 by nAggIs
Another solution to the above error is;1. Open IIS Manager and select the website that is causing the 4012. Open the "Authentication" property under the "IIS" header3. Click the "Windows Authentication" item and click "Advanced Settings" from the right4. Set "Extended Protection" to "OFF"
1 Jul 2021 by Lucio Flavio
Check if the user has access granted to the folder. In my case, the trouble was because someone has removed the group SERVER\Users (that contains DOMAIN\Users inside group) from folder.
25 Nov 2015 by Venkata Durga Rao
My application is working fine on my system but while deploying on server(having load balancer).After signin into application some pages are open fine after navigating into some time after a while it going to startup.auth.cs and it going to never ending redirects.
30 Sep 2020 by Ana Carolina Zambon
How to consume authorized back-end services while transparently handling refresh token renewals
5 Aug 2012 by taha bahraminezhad Jooneghani
dotnetOpenAuth is a good stuff!this is all I know , I am looking for two days to find a good an step by step video or even a sample project for asp.net webforms not MVC but I find nothing!can any body help me to start from zero with dotnetOpenAuth(with webforms not MVC!)?
5 Aug 2012 by Sandeep Mewara
Did you had a look at this: Integrating OpenID - You can find code snippets whether your using ASP.NET web forms or ASP.NET MVC - Web forms[^]
1 Aug 2017 by Sebastiaan Meijerink
Hi, In our product setup we have some separate webservices that are hosted as a single site. The webservices come from separate .NET projects. This is so that all webservices can be maintained as separate products with separate release versions. They are installed together within a single...
1 Aug 2017 by Thomas Nielsen - getCore
For what you're trying to do, connecting from one web service to another service without using passthrough authentication it seems you'll need to authenticate usage of that service in another way. So there's always indigo or WCF as it came to be called. Windows Communication Foundation is the...
17 May 2018 by Chillin92
Currently, my project is using Hmac-SHA256 to do the authorization in APIM. We are struggle with how to generate, transmit and store the secret key between client side and ours. Is there any secure way to do this? What I have tried: For now, we are generating the secret key through openssl...
9 Sep 2015 by Norbert F.D.
Hello.I want to create a user/password form and authenticate a user from Active Directory using ASP.NET MVC X.Lot of thanks.
9 Sep 2015 by Passion4Code
HelloAD Authentication[^]Please follow the article. Very nicely and precisely written.Hope it helps.Thanks
14 Sep 2015 by Norbert F.D.
Lot of thanks. But, I don't know why, but it doesn't works.Can you help me please?This is my code:Web.config
22 Jan 2023 by GKP1992
Hello, We have a .NET core web application where we add and authentication scheme that creates an authentication ticket with claims identity. services.AddAuthentication(options => { options.DefaultScheme ...
22 Jan 2023 by Richard Deeming
Your authentication and authorization policies are nothing to do with CSRF. CSRF occurs when an authenticated user on your site visits another site, and that site is able to trick them into issuing a request to your site to perform an action...
28 Nov 2012 by DanaH85
Hi,I have an MVC3 project with custom form authentication.I got the authentication to work fine (I used the "HttpContext.Current.User.Identity.IsAuthenticated" property in order to make sure it worked)I use on my of my forms an Ajax:$(document).ready(function () { ...
18 Dec 2014 by Lucaxyz2
I'm new to android and as the title says I'm trying to build very simple chat with the following code. //1. connection ConnectionConfiguration connConfig = new ConnectionConfiguration("talk.google.com", 5222, "gmail.com"); try{ connection.connect();} catch (XMPPException ex) { ...
16 Jun 2018 by Member 13875491
I have made a login api which will return an id when i pass username and password in android app. public class LoginApiBody { public string UserName { get; set; } public string Password { get; set; } } Say the link is http://abcd.org/efg/login. Currently the link is showing: { ...
20 Jul 2018 by Member 13363727
I am trying call a get method with angular, using windows authentication, but i've had this error: IIS 7.5 Detailed Error - 401.2 - Unauthorized "status: 401, ok: false, statusText: 'Unauthorized', headers: Headers { _headers: Map { ...
20 Jul 2018 by RmcbainTheThird
Have you tried posting this in an Angular forum?
30 Jun 2019 by Member 10180933
I have hosted a new Angular 7 App in Azure app service. Also added Azure AD authentication for same based on https://docs.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad the AD authentication is working (when i take site, it goes to microsoft login page and once...
10 Apr 2016 by Shaahinm
I am trying to learn Angular2and I am trying to create a simple blog with authentication.this here is my add a new post method:[Authorize]// POST: api/Postpublic PostModel Post([FromBody]PostViewModel model){ var post = new PostModel { Body =...
26 Aug 2014 by Pramod Sharma Tech
Securing routes in Angular is not available out of the box. This tip would help in securing routes in Angular based applications.
3 Feb 2015 by Member 10755845
Hi,I have a website portal deployed on Azure in which I need to implement Azure Multi-Factor Authentication. We are not yet sure on how we are going to provide Authentication whether using AD or a database which stores user credentials. My understanding till now about MFA is that it need...
3 Feb 2015 by Richard MacCutchan
See http://azure.microsoft.com/en-gb/documentation/services/multi-factor-authentication/[^].
2 Jul 2012 by Luk Vandevyvere
Hi,I've just started learning ASP.Net (VS2008) and have two questions concerning authentication and authorization.I want to build a website where each users needs to login using a link on the top right of the page. After the login has succeeded, the username (and log off link) must be...
2 Jul 2012 by OriginalGriff
Start by looking at an Introduction to Membership[^] - it includes a Role provider which allows you to classify users as you require.
2 Jul 2012 by Raghunatha_Reddy_S
Hi,This is one of the samplehttp://www.asp.net/web-forms/tutorials/deployment/deploying-web-site-projects/users-and-roles-on-the-production-website-cs[^]
2 Jul 2012 by Prasad_Kulkarni
Refer:ASP.NE...
30 Apr 2014 by Sajid Qayyum
Describes authentication management using cookies
9 Apr 2018 by Pramod Singh (C)
I have implemented claim based authentication in asp.net core 2.0 application. but " var identity = (ClaimsPrincipal)Thread.CurrentPrincipal; return null spme time not always. What I have tried: Startup.cs: services.AddAuthentication("TalesSecurityScheme") ...
9 Apr 2018 by Dinesh Singh Kushwaha (Dev)
You can find you solution from here : ASP.NET Core 2.0 Cookie Authentication[^]
9 Apr 2018 by Dinesh Singh Kushwaha (Dev)
You can find your answer from here : [^]
9 Apr 2018 by Ryan Peden
It seems like the code where you're running: var identity = (ClaimsPrincipal)Thread.CurrentPrincipal; is probably running on different thread than the one where you saved the claims principal. Instead, try using ASP.NET Core's dependency injection to inject an IHttpContextAccessor. Then...
17 May 2018 by Sriganesha Rao
This article provides an overview of ASP.NET Core security features.
10 Oct 2019 by Joseph Rozario
This article explains how to implement Token Authentication and Authorization using JWT in ASP.NET CORE.
18 May 2017 by Chriz12
Hello, I have 2 applications running on IIS 8.5. Both of the applications need authentication. For the Authentication I used the Identity Data Model. When I run the applications from the debugger I have no problem login more than one user at the time. When I take them to the IIS the...
18 Oct 2017 by Chriz12
Here's the solution if someone else is facing similar issues. Katana Project - Documentation[^]
1 Nov 2015 by Neohuman Software
How to: Using ASP.NET Identity using Azure Storage Tables
8 Oct 2017 by Member 7870345
I am not very sure about the solution, but i can offer you two options: 1) In your UserLogin class add a property called returnUrl. Then, in the html form puet a input of type hidden whit this value (in order to be included in the UserLogin). Obviously in the controller you will recibe only one...
11 Oct 2017 by RashaSalim
OK after much search I found my answer here authentication - Asp.net MVC ReturnUrl value always null - Stack Overflow[^] I had to add these line in my web.config's modules inside system.WebServer
10 Jul 2023 by RashaSalim
OK I'v researched and tried every single suggestion (individually of course) before posting this and I hit a wall every time This is my log in view I used ViewBag to pass the ReturnUrl value as I've seen in many answers to this problem Login @using...
22 Dec 2014 by Siddharth R Barman
Implementing a custom UserStore for ASP.NET MVC5 authentication
31 Mar 2015 by Member 11559934
I'm currently playing around with ASP.NET MVC 5 web application so I had an idea I wanted to create a WPF login so I can use the login the WPF app with my ASP.NET info. I assume I have to Create a login form onto WPF and send it to you MVC website, the server verifies them and if the credentials...
31 Mar 2015 by Afzaal Ahmad Zeeshan
For this project, I would suggest that you continue with using ASP.NET Web API[^]. Web API would let you use REST services, and send responses in JSON format and also accept the request with JSON format of objects that are to be sent e.g. username and password data. You can consume these...
16 Feb 2015 by John Atten
Identity is fully compatible with the OWIN Authorization model, and when used in this manner, represents a very useful, ready-to go concrete implementation.
8 Apr 2024 by Member 16239575
Hello, I want to do user-based page authorization with asp.net web forms. What I want to do is to take the role of the user while logging in from the users table in the database and control which pages he can access there, for example, let the...
9 Apr 2024 by Pete O'Hanlon
You probably want to start by reading and implementing authentication using Use ASP.NET forms-based authentication - ASP.NET | Microsoft Learn[^]. To control access to web pages, and folders of pages, use Control authorization permissions in...
10 Oct 2017 by kulile
Good day I have this scenario regarding our websites at work where we deploy our applications. One of these websites must be accessible from both inside the network and outside the network. The people accessing it from outside will not be out network users in most cases. On our QA server the...
14 Jun 2014 by tahirgr8_2000
Dear Experts,I have following filesDisplay.aspx- Main File to displayWorkingsheet.Aspx- Working sheet which navigate from display.aspx Now whenever i submit button in Display.aspx, it will redirected to workingsheets.aspx.BUTBut i want to ask user credential from user with form...
14 Jun 2014 by ziad imad
Hi,there is a simple way I used:1- create users table which contain:user_id,user_name,password,role_id,......2- create login spcreate procedure login@user_name nvarchar(50),@password nvarchar(50)asselect * from userswhere user_id=@user_idand password=@password3-...
24 Jun 2014 by tahirgr8_2000
Dear Freindsi have used someone else code and modified according to my need. It works and run smoothly. here login name and password authenticate with window domain as we used our login id and password for login. Now after successful running of this code, I have one issue that How to...
1 Dec 2013 by DUNGNV100509
Hello buddyI am creating a Web application (MVC4). I intend to use windows logon information for LDAP authentication. Imaging that: User logon windows with username and password, after that click a link to access web application. Web application needs to be authenticated with LDAP to check...
1 Dec 2013 by Madhu Nair
Yes it is possible. Refer this Link for more details
2 Dec 2013 by DUNGNV100509
Thanks Madhu Nair!But my concern is not authentication method on LDAP. What i want is how to get UserName (Window Logon) and DomainName (Machine where the http Request send from) using C# (MVC). I have searched and used method like: Environment.UserDomainName, or string...
23 Apr 2013 by ADotNetDev
Hello,I am massing with Yahoo IMAP server to get authentication using Lumisoft IMAP library. I am using Lumisoft IMAP_Client.Authentication method to get authentication from Yahoo IMAP server using access token which I get from Yahoo using OAuth API. But I am getting [CLIENT BUG] Invalid...
15 Dec 2013 by Developer Hemu Patel
Hello,I have Created WCF REST API which use the EWS Managed API to use the Exchange server functionality. WCF REST API provides the request and and response format in json.But for each client request, I need to do authentication and to create Exchange service object on WCF Rest...
12 Dec 2013 by Chetan Patel
Use PerSession instead of PerCall instance mode.
1 Jun 2015 by Mathi Mani
Authenticate WebAPIs with Basic and Windows authentication
11 Oct 2013 by ASP.NET Community
Authentication means figuring out who you are and Authorization means figuring out what you can do. Both are fundamental parts of the ASP.NET
18 Sep 2016 by Zijian
Real world WCF project structure, Authentication and Authorization
20 Apr 2018 by AkiStar
Aunthentication of user using canActivate routing in Angular
25 Nov 2013 by Naredla Nithesh Reddy
can any one help me to found deep explanation of Authentication in asp.net.......
25 Nov 2013 by ♥…ЯҠ…♥
Hi Reddy,You can find your deep explanation over here[^]Hope this helps you a bit.Regards,RK
11 Feb 2015 by Yesudass Moses
I am trying to learn asp.net authentication. I learned about authentication through codeBehind. But, I cannot understand the mechanism behind ASP.NET Autogenerated Login/Register forms in Visual studio 2010. I don't see a codebehind for the forms Login.aspx and Register.aspx. How this...
12 Feb 2015 by suthar parth
Hello,Please check below link, I think you got idea from this link.http://runnable.com/UhmVlGxyiEVcAABv/how-to-use-forms-authentication-in-asp-net-for-login[^]
17 Nov 2013 by Maciej Los
Walkthrough: Using Forms Authentication in ASP.NET MVC[^]It should be enough for start ;)
17 Nov 2013 by Sampath Lokuge
For MVC 4Forms Authentication in ASP.NET MVC 4For MVC 5Authentication in ASP.NET MVC with SimpleMembership and OAuthI hope this will help to you.
9 Jul 2015 by malhotraisha3388
hiyou can use the following link to do the form based authenticaionhttp://tutorial.techaltum.com/Form-based-atuthentication-in-MVC.html[^]
17 Nov 2013 by Manish Sahdeva
Hi, Dear all, I just want to implement authentication in my mvc application, actually, I do not know the procedure of authentication mvc, like in asp.net we use the forms authentication, create the authentication ticket with our custom data tables and create the page base for authentication...
19 Jun 2013 by id-athul
HI,Is there any method other than authenticating a user other than forms auth. In MVC forms authentication hoe can we use sessions, Or is there any method to get the loggged in user details. I did by checking count of a user in DB for loggging in and use sessions for maintaining and clear...
19 Jun 2013 by Christian Graus
You can just store the id of the logged in user in the session and write an authentication method which checks that, and add that attribute to your logged in methods.
2 Aug 2015 by Member 9129971
My Database Groups:GroupId,NameModules:ModuleId,NameModulePermissions:ModulePermissionId,ModuleId,PermissionValue,PermissionKeyApproach 1:GroupModule:GroupModuleId,GroupId,ModuleId,Permissions(varchar)Approach...
27 May 2014 by Syed M Hussain
Authenticating an application using IMAP
27 Nov 2015 by Member 12172128
I'm wanting to design an program that requires users to insert an smart card into the reader and the program to detect and authenticate it theres very few articles on the net on this issuehow would i go about achieving this and what is the best way to authenticate?any help will be greatful
26 May 2018 by Ines Trabesli
I have an authentification page I used to create it Web Api and aspnet Mvc . I created all my Views in a floder "pages" every thing works fine but when I wanted to change the views under the Views folder so i can respect MVC nothing works now .I can't understand the issue. this is what...
3 Oct 2012 by Keifiechief
I have a very simple asp.net mvc4 application with Windows authentication enabled and deployed to IIS7. This application is then accessed via a Sharepoint Page view Web part.The web application itself consists of a single controller, model and view with an Html helper Ajax form. The applcation...
4 Oct 2012 by Keifiechief
Resolved.I recreated the project using the intranet template as opposed to the internet one. Which is what I should have done from the start of course.The reason I used the wrong one in the first place was that I followed a tutorial when I started and didn't even look at what other options...
11 Aug 2016 by sencsk
var client = new AuthyClient(goodApiKey, true);check the parameter for test or prod.
7 Aug 2013 by hasmukhsumra2005
Open remote url webpage with Basic authentication by asp.net,I have done code likeInternetExplorer IEControl = new InternetExplorer();IWebBrowserApp webBrowserCtl = (IWebBrowserApp)IEControl;string strAuthenticationHeader = "Authorization: Basic " +...
7 Aug 2013 by Manas Bhardwaj
I guess you need to really go back to the design board and decide what you want to do. Are you seriously creating InternetExplorer object on server in ASP.Net? That would never work and does not make sense at all.
10 Sep 2019 by krishnakali pal
I am trying to connect to an Analysis service server using basic authentication from the application which already uses SQL authentication to connect to the SQL database. Can I use both SQL authentication and Basic authentication from the same application. It is a .Net application What I have...
10 Sep 2019 by Maciej Los
Quote: ... the application is throwing error 'The page you are requesting cannot be served because of the ISAPI and CGI restrictions list settings on the web server' Please, read this to resolve your issue: 404.2 The page you are requesting cannot be served because of the ISAPI and CGI...
24 Sep 2014 by Brian C Hart
I am trying to find out what is the basic software pattern for authentication. I've written up some toy code in LINQPad:void Main(){ // Login with a specific username and password. // If success, then token will contain a new GUID. // If failure, Guid.Empty is returned. var...
22 Jul 2021 by Member 9678724
Hi. I would like to create multiple blazor projects. Example: documentation.domain.com tasks.domain.com process.domain.com authentication.domain.com I have authentication enabled and I wish to redirect all of these different projects to the...