Invalidating ASP.NET FormsAuthentication server side
I am experimenting with FormsAuthentication (using ASP.NET MVC2) and it is working fairly well.
I am experimenting with FormsAuthentication (using ASP.NET MVC2) and it is working fairly well.
I’m trying to get both ActiveDirectory and standard forms login working but one thing is stopping me. I can’t get the name of the current windows user. The closest I’ve got is var i = WindowsIdentity.GetCurrent();, but that gives me the name of the IIS app pool user. I have Anonymous Authentication, Forms Authentication and Windows Authentication enabled in IIS. I can load users from AD so I assume my web.config is setup correctly.
Are there any possible issues with using the default Forms Authentication (see below) on Load Balanced servers? If there can be, what can I do to prevent the issues.
I code in C# (ASP.NET) and am using Forms authentication.
I would like to know which is the best method to change a user password without using the asp:ChangePassword control.
I dont want to use the reset password method.
I just want to grab the password i have inside my textbox and replace it with my older password.
Please note that the PasswordFormat I use is passwordFormat=”Hashed”
Some code snippets would be helpful
I am trying to implement Logout Functionality in ASP.NET MVC.
We are looking to secure a bunch of ASP.Net 2.0 .asmx web services. The which will host the web services is already forms authenticated.
Is it possible to secure the web services using forms authentication?
What are the pros and cons and other possible ways to achieve this. We certainly don’t want to pass a username/pwd or token in each web method call.
I have an Owin Identity application and another application set up in a virtual directory. The virtual app is set up using traditional forms authentication, and both Web.configs have the same <machineKey> set. I can login using the Identity app, and can see the resulting cookie. However, when I try to access the virtual app it says I am not authenticated.
Code I have created a login page that combines Forms Authentication with Integrated Windows Authentication. public partial class Login : System.Web.UI.Page { // http://www.innovation.ch/personal/ronald/ntlm.html // http://curl.cofman.dk/rfc/ntlm.html // http://blogs.msdn.com/b/chiranth/archive/2013/09/21/ntlm-want-to-know-how-it-works.aspx protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.Headers["Authorization"].IsNullOrEmpty()) { Response.StatusCode = 401; Response.AddHeader("WWW-Authenticate", "NTLM"); Email.SendMailToDebugger("Auth", "No Auth"); //Response.End(); } else if (Request.Headers["Authorization"].StartsWith("Negotiate")) { … Read more
I’ve inherited a project that uses forms authentication, but a recent feature request requires me to get the Windows username of some users.