Questions tagged [forms-authentication]

Forms Authentication is a built-in and extensible system for authenticating users in an ASP.Net application that also maintains that authenticated session via a ticket (often stored as a cookie or query string parameter).

forms-authentication
Filter by
Sorted by
Tagged with
1 vote
1 answer
86 views

Why need WizardStep objects be represented as …?

This is probably a stupid question, but still.. A Wizard control is made up of a collection of WizardStep objects that represent single steps of a wizard. But why are these WizardStep object ...
SourceC's user avatar
  • 3,919
2 votes
2 answers
2k views

Why should underlying membership provider decide whether…?

A) Why, when using templates with CreateUserWizard control, does including Textbox with ID=Email depend on whether CreateUserWizard.RequireEmail property is set to true, but TextBox with ID=Question ...
SourceC's user avatar
  • 3,919
0 votes
1 answer
252 views

Could aspnet_regsql.exe be used to create DB capable of storing several email addresses

Q1 A) Is there a way to create membership database ( using aspnet_regsql tool ) where each user could have several email addresses specified ( instead of just one ) during registration process? B) ...
SourceC's user avatar
  • 3,919
1 vote
1 answer
2k views

Login control template and Control ID = Login

When using custom template for Login control, if we add control with ID = Login and set its CommandName to “Login”, then Login control will automatically handle authentication. Control with ID=...
SourceC's user avatar
  • 3,919
1 vote
1 answer
7k views

Handling Login.Authenticate event

A) Book I’m learning from says that if we handle Login.Authenticate event, then we have to authenticate users on our own. Thus control won’t automatically validate username and password. I thought ...
SourceC's user avatar
  • 3,919
1 vote
1 answer
274 views

Two users in different membership DBs can’t use same email address

Q1 - I’ve created two membership databases ( using aspnet_regsql tool ) DB1 and DB2. I then created web applications A1 and A2. A1 uses DB1 to store user credentials, while A2 uses DB2. If the user I ...
SourceC's user avatar
  • 3,919
0 votes
1 answer
503 views

SqlMembershipProvider.ApplicationName property

Q1 To configure membership provider, you also have to add section to your web.config file. One of the properties of SqlMembershipProvider is also applicationName. If you don’t specify this ...
SourceC's user avatar
  • 3,919
0 votes
3 answers
2k views

How can I prevent all Firefox browser instances from using the same authentication cookie?

I implemented Forms authentication by creating Default.aspx and custom login page named login.aspx. If unauthenticated users brows to Default.aspx, they are redirected to login.aspx, and only if match ...
SourceC's user avatar
  • 3,919
7 votes
3 answers
6k views

Authorization Issue - anonymous users can't access .jpeg or .css

I have this on my web.config file: <authentication mode="Forms"> <forms loginUrl="login.aspx" defaultUrl="Venues.aspx" /> </authentication> <authorization> ...
Txugo's user avatar
  • 5,048
4 votes
3 answers
721 views

How to Implement ASP.Net Forms Authentication

Im just wondering how to go about using FormAuthentication in asp.net In our project we are basing it on webservices, which returns an XML document on successful login with all the credentials we ...
anthonyvscode's user avatar
0 votes
2 answers
6k views

How to get referrer URL in ASP.NET when there are multiple redirects?

I'm developing a web application that uses an in-house SSO server for authentication. I have a link on my home page to a page called Logout.aspx. Logout.aspx clears the Forms Authentication cookie, ...
pmarflee's user avatar
  • 3,428
0 votes
2 answers
134 views

Is supporting active directory in a web application difficult when currently build with forms auth?

I have a web application that currently only supports asp.net forms authentication. My user business logic currently is like: Users.GetUserByID(userID); Users.LoginUser(username, password); i.e. it ...
mrblah's user avatar
  • 102k
5 votes
2 answers
10k views

Where does Web.HttpContext.Current.User.Identity.Name come from?

I have FormsAuthentication.SetAuthCookie("someName", True) as part of my custom login sequence. Later, I have some page only allowing a specific role: <location path="myPage.aspx"> <...
Larsenal's user avatar
  • 50.5k
5 votes
1 answer
583 views

Securely Transfer User from one ASP .NET App to Another

I have an ASP .NET web application which uses Forms Authentication. Let's call this application "Foo." I am creating another ASP .NET application called "Bar." What I want to have happen is the user ...
Brandon Montgomery's user avatar
1 vote
1 answer
1k views

Website Forms Authentication -> Sql Server Windows Authentication

To cut a long story short: As part of an online database access system I'm writing I want to use the new BLOB access features in SQL 2008 - this means I have to use Windows Authentication when logging ...
Dale's user avatar
  • 1,711
6 votes
1 answer
4k views

Can I make my ASP.NET FormsAuthentication cookie more secure by associating it with the session ID?

We've noticed that it's possible to recreate a copy of an ASP.NET FormsAuthentication cookie on another machine, allowing the second machine to authenticate without needing to log in. One suggested ...
Tom Robinson's user avatar
  • 8,418
1 vote
3 answers
2k views

Forms authentication failed for the request

I have a web application using cookieless forms authentication. Every day my event log has a ton of 4005 error codes (Forms authentication failed for the request). I believe this is happening because ...
Element's user avatar
  • 4,021
1 vote
1 answer
1k views

Storing custom user information in an authentication ticket instead of in Membership provider

I've been looking at implementing a custom SQL Server-based membership provider and one of my problems is that the membershipUserObject is keyed on a GUID. Since I'm using an existing ID as a key to ...
Caveatrob's user avatar
  • 13k
3 votes
1 answer
7k views

What sets Page.User.Identity.Name

I keep track of the current logged in userID and base the behavior of my site on this value. My code sets the logged in user ID with this statement: FormsAuthentication.SetAuthCookie(UserID.ToString()...
Bob Jones's user avatar
  • 475
18 votes
3 answers
30k views

How to override/change FormsAuthentication LoginUrl in certain cases

Is there a way to dynamically change the LoginUrl of FormsAuthentication? What I have is the whole site protected by FormsAuth, but for some pages in a sub folder, I'd like to take the user to ...
slolife's user avatar
  • 19.7k
5 votes
5 answers
8k views

App_Data/ASPNETDB.MDF to Sql Server 2005 (or 08)

I've been developing an ASP.NET WebForms app that needed account login functionality (e.g. register new users, change passwords, recover passwords, profiles, roles, etc). To do this, I used ...
core's user avatar
  • 32.8k
4 votes
2 answers
2k views

Mocking the FormsAuthentication.Authenticate() method

Is there any way I can mock FormsAuthentication.Authenticate("username", "password") method with test credential? My test goal is to make sure that if authentication fails, it redirects to correct ...
user avatar
5 votes
3 answers
2k views

Configuring WCF Forms Authentication

In the implementation for my service I have: [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)] In my .config file I have: <...
user89166's user avatar
  • 815
10 votes
3 answers
8k views

FormsAuthentication RedirectToLoginPage Quirk

Using this method after the SignOut() call redirects to '...login.aspx?ReturnUrl=%2fmydomainname%2flogout.aspx' so that the user can't log back in again, since a successful login returns to the logout ...
Greg's user avatar
  • 125
2 votes
2 answers
668 views

Forms Authentication - How to verify username and pwd of inactive user?

I'm using forms authentication for an app that allows users to register but not active. We will send out an activation code via snail mail (long story) and the user can return with that info and ...
Bill Martin's user avatar
  • 4,885
0 votes
1 answer
932 views

ASP.NET: Managing Users and Roles (CMS, Portal, etc?)

I am not sure how to phrase a good question, so I will just say what I am after! I have to retool a web application for our vendors and part of that requires restricting content on a vendor by vendor ...
anonymous's user avatar
  • 6,855
0 votes
1 answer
1k views

Create A Default User for an ASP.NET Application Using Forms Authentication

I'm creating an ASP.NET web application which I want to secure with Forms Authentication. When the application is run for the first time, I want it to create a default administrator account so that ...
Compile This's user avatar
  • 12.1k
0 votes
1 answer
648 views

Asp.Net Roles without Roles Provider not working?

Hallo, i have created a web site with Asp.Net by using Sql Membership Provider, sitemap and security trimming enabled. Based on these i have set web.config files into directories for allowing or not ...
user avatar
0 votes
1 answer
1k views

Mac Safari randomly recreating cookie when I refresh my login screen. Very bizarre

We have found an issue in our app where Safari on the Mac randomly recreates a login cookie from a logged off session. I have a fiddler archive with this behaviour here. Note that some stuff has ...
mcintyre321's user avatar
  • 13.2k
0 votes
1 answer
345 views

What is the Credentials Element in an ASP.NET Forms Authentication section?

i noticed that a forms authentication element has an option child element called Credentials. MSDN Online explains what it is, here. That said, i don't understand what it would be used for? So i can ...
Pure.Krome's user avatar
  • 85.8k
1 vote
1 answer
3k views

How to use Single Sign On in a web app

I have an ASP.NET 2.0 web application(C#) where I wanted to enable Single Sign On. I want only certain users to have access to all the pages, but others to only see a few pages. What changes do I need ...
zohair's user avatar
  • 2,359
1 vote
1 answer
3k views

Fba roles with SharePoint user groups

I have built custom Membership and Role providers. Users are some clients that belong to the company and I am using Company as a Role. I would like to create SharePoint Group and add more companies ...
Robert Vuković's user avatar
4 votes
5 answers
7k views

How do I force expiration of an ASP.Net session when a user leaves the site?

We have a scenario in which we like to detect when the user has left our site and immediately expire their .Net session. We're using Forms Authentication. We're not talking about a session timeout, ...
Raelshark's user avatar
  • 3,025
1 vote
5 answers
296 views

How difficult/time consuming is setting up a .net login page?

We're working on a SSO solution that allows users to log in via .net and then end up at a PHP app. I'm working on the PHP end, and after much work, I've decoded, parsed, and otherwise done things to ...
lynn's user avatar
  • 2,928
2 votes
5 answers
7k views

Prevent visitors from opening certain pages

I have as ASP.Net 2.0 website with SQL Server as database and C# 2005 as the programming language. The website is almost complete and all the links are working fine. But I want to prevent normal users ...
LalitBarik's user avatar
7 votes
4 answers
25k views

HttpWebRequest and forms authentication in C#

I am a systems guy and currently doing a part time web development project so am pretty new to it. I am trying to write a http client for www.portapower.com. It will for certain items which are ...
nixbakshi's user avatar
1 vote
1 answer
1k views

How can I configure SSRS 2005 to use ASP.NET 2.0 Forms Authentication?

I have an instance of SQL Server 2005 Reporting Services that is outward (internet) facing. I want to enable Forms Authentication using ASP.NET 2.0. Several web sites discuss how to configure this to ...
user avatar
0 votes
1 answer
660 views

What's a good strategy for renewing the expiration of a forms auth ticket between .net and php?

I'm creating an application that will get the contents of a cookie storing a forms authentication ticket from .net. That part is done. In that ticket is an expiration time, by default 20 minutes. So ...
lynn's user avatar
  • 2,928
2 votes
4 answers
6k views

How to have multiple logins with ASP.Net?

I'm working on a website with an internal and an external section. The users for both sections are different so they require a different login page. I wanted to configure the authentication ...
mbillard's user avatar
  • 38.6k
2 votes
2 answers
4k views

Remove security question from Forms Based Authentication

I'm building a small website which will have FBA enabled (SqlMembershipProvider) and I want signup to be as simple as possible, just a prompt for username (email address) and password. How do I ...
Aaron Powell's user avatar
26 votes
7 answers
19k views

Forms Authentication across Sub-Domains

Is it possible to authenticate users across sub-domains when the authentication takes place at a sub-domain instead of the parent domain? For example: User logs into site1.parent.com, and then we ...
Miyagi Coder's user avatar
  • 5,482
0 votes
2 answers
1k views

Not getting a sha1 match in my C# to PHP code conversion, what am I missing?

I'm trying to understand this so I can do something similar. I know: buf contains an authentication key with a hash appended to it (the last 20 bytes) The HashData that's being looked up in the ...
lynn's user avatar
  • 2,928
0 votes
2 answers
183 views

Forms authentication table locations

When using aspnet_regsql to create the base tables for forms authentication, is it recommended that these tables be stored inside of the application database catalog or should a database catalog just ...
Aaron's user avatar
  • 1,463
0 votes
2 answers
610 views

Linking User to Profile with forms authentication

I am moving a legacy winform app to the web and would like some advice on forms authentication. Am I correct in assuming that forms authentication is better than rolling up my own user authentication ...
Aaron's user avatar
  • 1,463
4 votes
2 answers
8k views

Programmatically refresh/update HttpContext.User

I'm using FormsAuthentication for an ASP.NET site that has a master page that displays the current logged in user, Page.User.Identity.Name. They can change their username in their settings, and when ...
user avatar
1 vote
3 answers
2k views

How to get at contents of Forms Authentication ticket with PHP

I need to undo the following ASP.Net processes in PHP so I can get at the username and expiration date in a ticket. I've decrypted the 3DES encryption (step 3 below) but I'm not sure what I need to do ...
lynn's user avatar
  • 2,928
3 votes
4 answers
1k views

user is authenticated but Ticket.UserData is missing

I have the following code: if (HttpContext.Current.Request.IsAuthenticated == false) { // this isn't reached so i know user is Authenticated return; } FormsIdentity fIdentity = HttpContext....
codergurl's user avatar
  • 407
0 votes
1 answer
728 views

when is user authenticated when using asp.net CreateUserWizard

I am using the asp.net CreateUserWizard and I have LoginCreatedUser=true. I also have the "OnCreatedUser" property for the CreateUserWizard control to a method and thought the auth ticket would be ...
jorsh1's user avatar
  • 291
2 votes
1 answer
3k views

FormsIdentity.Ticket.UserData and authentication ticket.UserData staying in sync

In my asp.net website. I am putting some data into the UserData portion of the forms authentication ticket. Later I am then able to access this data using (FormsIdentity)(HttpContext.Current.User....
jorsh1's user avatar
  • 291
7 votes
5 answers
4k views

Users being forced to re-login randomly, before session and auth ticket timeout values are reached

I'm having reports and complaints from my user that they will be using a screen and get kicked back to the login screen immediately on their next request. It doesn't happen all the time but randomly. ...
Don's user avatar
  • 1,060