forms-authentication

asp.net - FormsAuthentication.Initialize()

What does the FormsAuthentication.Initialize() method actually do? Plz be specific. ...

aspnet_Membership_UpdateUserInfo called twice for single failed login

I'm using the SqlMembershipProvider and have a problem where aspnet_Membership_UpdateUserInfo is being called twice for a single failed logon. This means that a user will be locked out after only two attempts, not the 3 that I have configured. Unfortunately I can't simply bump the login attempts count to a higher number as the problem o...

Detecting forms authentication timeout in login page

When you have forms authentication setup to redirect to login.aspx when accessing a protected page, what's a good way to detect in login.aspx whether the user was sent there because they haven't logged on yet, or because their forms auth ticket is expired? I'd like to display a "you've timed out" message. (I do not mention the word sess...

How do I grant anonymous access to a url using FormsAuthentication?

For the most part, my webapp requires authentication to do anything. There are a few pages, namely the homepage, that I'd like people to be able to access without authenticating. Specifically, I'd like to allow anonymous access to these urls: /home /default.aspx I'm using asp.net MVC and FormsAuthentication. Both urls point to t...

ASP.NET ajax authentication service problem

Although I've set isPersistent to false, the authorization cookie is persisted between sessions. This only happens with IE8. With other browsers it works as supposed. Sys.Services.AuthenticationService.login(username, pw, false, null, null, null, null, "User Context") ...

ASP.NET override the default returnto parameter within the redirect when a user is not authenticated

We are using forms authentication with roles to restrict access to certain pages and areas of a website. When a user is not authorised, either because they are not logged in or do not have the required role, they are redirected to the login page with a returnto url. We define what access is required in the web.config using the authoriza...

ASP.NET MVC + Silverlight + Forms Authentication

So i am trying to get a simple system working where i have an asp.net mvc web app with the forms authentication already up and running with a user created. i can login with no problem using the mvc controller/view. I then added a silverlight app to the solution, using the existing web app as the host. I created a silverlight-enabled web...

forms authentication works under VS development but not on iis

My asp.net app is using Forms Authentication. Running the project from the Visual Studio .NET 2008 has absolutely no problem, but it doesn't work on IIS, after clicking the Login button, the authentication code run with no error, but the Login page kept getting reloaded and reloaded. any ideas? tks in advance, james ...

ASP.Net MVC, role based security and other person-based data

I have an ASP.Net MVC application and I'm using Forms authentication in SQL Server. This sets up the authentication and authorization for me. However, I have other person-based data that I need to track as well, such as the person's phone number, department, their charge-out rate, start date, etc. WHAT the person can do (which is contr...

ASP.NET MVC Forms Authentication + Authorize Attribute + Simple Roles

I'm trying to add simple Authentication and Authorization to an ASP.NET MVC application. I'm just trying to tack on some added functionality to the basic Forms Authentication (due to simplicity and custom database structure) Assuming this is my database structure: User: username password role (ideally some enum. Strings if need b...

C# Forms authentication with form data

I have two applications, say app. A and app. B. App A. sends form data (using the post method) to app B. B however, is a web application and uses forms authentication. The post data is send to a webpage (viewdocument.aspx) which is secured by forms authentication. But when the data is send to viewdocument, the login page is displayed bec...

Asp.net Mvc FormsAuth with LogonUserControl in Site.Master

We have an email confirmation page for registration which can be hit with a use-once link to activate the account. The nature of the site is such that we can allow this link to log the user in automatically. This requirement is under review (at my request!). The following situation is proving a little confusing: The user follows the...

SQL Server 2008 Report Builder Forms Authentication

Has anyone ever successfully gotten forms authentication to work with report builder? I have a client who wants to use report builder outside my company's domain. Would forms authentication work for this? ...

ASP.NET MVC FormsAuthentication.SignOut doesn't work

Hi! I'm trying to use forms.signout but sometimes it does not log out the user and he still can navegates through the website. How can I resolve this? I also configured web.config forms authentication, but it's still not working. I'm using FormsAuthentication to autenticate an user passing he's login. Thanks!! ...

Get Logged In User

My company has a large application we are finishing up. It utilizes WCF as the back-bone with Active Directory for authentication. This works perfectly for one of the two sites as the authentication model is Windows and you have to be part of the domain to sign into the site. The question I have relates to the other site which is externa...

asp.net mvc formsauthentication : when to do it manually ?

Can someone clarify when to use .SetAuthCookie and when to manually create a ticket and cookie in code. And then why would you need to have additional web config settings? ...

Forms authentication issue in ASP.NET

I am using Visual Studio Team System 2008 (VSTS), C#, .NET 3.5, IIS 7.0, and ASP.NET. I have two IIS web sites, site A and site B. Their related domain names are, http://sitea.example.com and http://siteb.example.com. I heard when using Form authentication, we could enable domain level cookies, that is, if two sites are in the same doma...

.net: Shorten a string, store it as a new string, and later 'rehydrate'

I have an application that stores each user role as a comma-delimited string in the userData portion of the forms authentication ticket. We have run into a situation where a user was part of many roles, and those roles all have long names. There is a maximum # of characters that you can put into the userData, likely a limitation of cook...

Active Directory Authentication when server is not Member of Domain

Hi, I've following situation we have a server which is not memebr of a domain. On this server there is an asp.net application with forms authenticaton enabled. Is it possible to change to active directory provider without putting the server into a domain? thanks ...

SharePoint Forms Authentication Provider Name Prefix on Username

I have setup a SharePoint site with forms authentication and My Sites. The users username displays correctly on the main site collection, however whent he user creates a My Site the user is always referred to as : for example it might be: sqlMembershipProvider:testuser This can be seen in this image: http://img141.imageshack.us/img141...