forms-authentication

FormsAuthentication class c#

Hi, If I call FormsAuthentication.SetAuthCookie("john", true), is the users name stored in the cookie? What I'm trying to find out is if the users session times out and then the user revisit the site again, Request.IsAuthenticated is set to true, but where is the users name coming from? ...

Check User.Identity.IsAuthenticated in ActionFilter right after login

I'm basically using the AccountController from the ASP.NET MVC samples. It uses FormsAuthentication to handle the user login. Just to be sure, here is the code to handle user login: public ActionResult LogOn(string userName, string password, bool rememberMe, string returnUrl) { if (!ValidateLogOn(userName, password)) ...

Problems opening documents using SharePoint forms based authentication

I am trying to build a WSS 3.0 site. I am having difficulty with the dialog box that pops up when I try to check out a document. I tried to solve this by enabling forms based authentication but when I click on the document, Microsoft Word opens and I get garbage (MS Office also fails). All I want to accomplish is to log into my WSS 3...

IIS 7 Forms Authentication

In IIS 7 is there a way to edit the forms authentication portion of the web.config without editing the web.config directly? That is, using the IIS 7 GUI to make changes to the authentication? ...

Use email as user name in ASP.NET LogIn Control

I want to use the regular login system in an ASP.NET app, but I want to use the user's email address as their user name (as is common in many web sites.) However, there seems to be no property or attribute to allow me to do something like this; user name and email address always seem to be separate. Is it possible to do this or is some c...

SharePoint forms authentication (FBA) roles

Can anybody help me... Is it possible to target audiences in SharePoint using FBA roles instead of using SharePoint groups? Or is there an alternative solution available? ...

SharePoint FBA Roles Audience Targeting

Can anybody help me... Is it possible to target audiences in SharePoint using FBA roles instead of using SharePoint groups? I've tried creating a group in SharePoint and adding the FBA role to that group. This didn't seem to work. Is there another alternative solution available? Thanks Kash ...

FBA based SharePoint Application Backup restore

Has anyone tried to back up a SharePoint web application using forms based authentication (FBA) to another SharePoint server? We are facing some issues in backup\restore of FBA based sharepoint web applications: We have a server where we have created a web application based on FBA, it has an FBA database as well. We have backed up the...

How can I read text from cache into user name field of ASP.NET login control

I have a primary ASP.NET site that asks for a user name. When the user gives a user name and clicks the submit button, he/she is redirected to the respective application (actual site) based on their user name (user name goes into cache here). User names across all sites are unique. I want to use the cache to read back the user name en...

When CreatedUser handler is called, profile for that user is not available

When using CreateUserWizard and setting LoginCreatedUser property to true, I would expect that since user is already authenticated by the time CreatedUser event handler is called, that profile for authenticated user would already be available. But that doesn’t seem to be the case. So when exactly does profile for authenticated user bec...

ASP.NET MVC - Set custom IIdentity or IPrincipal

I need to do something fairly simple: in my ASP.NET MVC application, I want to set a custom IIdentity / IPrincipal. Whichever is easier / more suitable. I want to extend the default so that I can call something like User.Identity.Id and User.Identity.Role. Nothing fancy, just some extra properties. I've read tons of articles and questio...

Broken ASP.Net Login Control

Help! I'm using the ASP.Net Login control on a Login page, but the Login button no longer appears to be working and the Authenticate event is not firing. On clicking Log In, the page just returns to the Login page. web.config extract <authorization> <deny users="?" /> <allow users="*" /> </authorization> <authentication mode="Forms...

Impersonate using Forms Authentication

I have an ASP.NET site that must use Forms Authentication and not Windows Authentication to access a ActiveDirectoryMembershipProvider. The site must use forms because they need a designed input form instead of the browser authentication popup that Windows authentication uses. The site needs to impersonate the user logged in via Active...

ASP.Net Store User Data in Auth Cookie

Hi, I want to store some data like the user nickname and user ID (table primary key) in the user data section of the auth cookie. The reason I'm doing this is to retain this data when the browser is closed, without having the user relogin. Edit: Whoops! Realized I'd not explained myself well. I am not trying to reauthenticate a user b...

What initializes the security context in forms authentication?

If FormsAuthenticationModule detects forms authentication ticket in the request, it automatically creates security context by initializing HttpContext.Current.User property. This happens during Application.AuthenticateRequest event. Assuming we log in user via CreateUserWizard control, then by the time CreatUserWizard's ContinueButtonCl...

Passing FormsAuthentication cookie to a WCF service

Hi, I have a website that talks to a remote WCF web service. Both use the same custom FormsAuthentication Provider. I would like to authenticate with the WCF service impersonating the user currently logged in the site. I already did this manually, using UserName client credentials but I need to know the user password. So, what works so f...

How can I forms authenticate a user in a custom webservice?

I am working on integrating a silverlight site into our existing application and am trying to get the login functionality working. The Silverlight application needs to have it's own login page, and the login needs to utilize the existing ASP.NET forms authentication. As part of the login procedure, we are calling some external code, so...

Rails Auth Token and Ajax

Okay so from what I've read on other websites and on stack overflow, Rails throws this Authentication token error because my form doesn't pass the token -- and it's a security feature. This I understand. However I don't really have a form. I have ajax here -- my javascript posts the id'ed information into a processing function. So my q...

Problem in Form authentication.

I am using form authentication inmy ASP.NET 2.0 website. Today during testing i was faced major probleM. After authentication, i have default page createuser.aspx. From that page i am creating new user.It is working fine. There is logout button in which i am clearing all sessions and redirecting it in login page. All was working fine. ...

<machineKey decryptionKey="AutoGenerate"... being ignored by IIS. Won't invalidate previous session's cookies.

(See question below for more context): Are there any situations in which <machineKey validationKey="AutoGenerate,IsolateApps" decryptionKey="AutoGenerate,IsolateApps"/> in web.config would fail to AutoGenerate a new machineKey on App Pool recycle? This is the behavior I'm seeing... I'm using standard ASP.NET FormsAut...