forms-authentication

How do I require asp.net forms authentication to send a validation email when registering a new account?

I have just set up a new ASP.NET MVC website and I would like to change it to force the user to authenticate their email address by clicking a validation link in an email. I googled the answer with as many search terms as I could think of, but I guess I never hit the correct one. I started playing with the membership objects to see wha...

Support for multiple domains in Forms AUthentication.

Hi, Is there a Forms Authentication provider for ASP.Net which supports multiple domains? The problem we are trying to solve is: External users access our website using xxx.yyy.com Internal users access our website using IP x.x.x.x We want Forms authentication to work for both these groups of users. Adding an entry to the internal ...

asp.net authentication - use credentials from web.config - problem

Hi, I have a simple problem which is giving me headaches for a couple of days. I've created very simple application with login control. I keep user data in web.config file: <authentication mode="Forms"> <forms name=".RzeskoLoginCookie"> <credentials passwordFormat="Clear"> <user name="test" password="test"/> ...

ASP.FormsAuthentication - Having two login pages

I have two different login pages for two different sub-sections of my site. I would like to declare two sets of defaultUrls and loginUrls for each login page/section. Is this possible? Does anybody have a code sample to do this? I am securing both sections with similar code in the web.config files in each sections folder. Theoretical...

SQL Agent and Web.Config. WAS: SSRS Forms Authentication, Running subscriptions

I have successfully implemented Forms Authentication in SSRS, so it now uses both Roles and Users from my website, using the ordinary asp.net membership framework. I can log in to the portal and run any report, as long as I have the correct role from my original app. All good. However, if I create a subscription, then, when the subscri...

Change Extensions of FBA / AD Authentication Zones in SharePoint?

I have a SharePoint site that is configured with FBA and AD authentication. Currently, the Forms Site is extended by the AD site. Due to various factors, I need to reverse this, so the forms based site is an extension of the AD site. How would I go about doing this? The side is full of content, so there is no margin for error. Will un-...

Sharepoint Forms authentication Run with different account

Hi, I a console application that creates a sub sites under a site collection The site collection accepts only forms based user. Now, when i run the console application, its with windows credentials. I need some way to run the code in console app that creates sub site to run under forms user who is admin to that site collection. Pleas...

Forms Authentication - Display currently logged in user information in FormView using Object Data Source

In my web application I use Forms Authentication with a cookie. In a page I wish to display the information for the currently logged in user, inside a FormView powered by an ObjectDataSource. My data source has a select method accepting as parameter the user name by which the user data will be requested from the database. How do i get th...

Forms Authentication cookie seems to stop working

I want to have functionality on my application that lets a user check off that they wish to stay logged indefinitely (arbitrarily setting the cookie expiration at 3 months from NOW). The code I have for dealing with this is private static HttpCookie GetFormsAuthenticationCookie(string userNameResponse, ...

FormsAuthentication.SetAuthCookie

hi we are using FormsAuthentication.SetAuthCookie(profile.Id, false); Now the question is when does this cookie expires? It ofcourse expires once i close all the browsers but it doesn't i keep the browser open and i dont know the timelimit. ...

Forms Authentication permanent login option along with non persistant option with sliding expiration.

Is there any way to configure Forms authentication that I can make the cookie and ticket persistent with an indefinite expiration while having a non persistent option that doesn't require setting the ticket timeout to be infinite? Use case, checkbox "keep me logged in" Checked User gets persistent non session cookie with a ticket timeo...

Custom Authorize attribute not working on expired ajax requests.

Hi. I have a custom authorize attribute on my controllers and it is not being called on expired ajax requests. I'm using forms authentication, and call controller methods via $.ajax (jQuery). The ajax request returns my login page and I don't seem to be able to intercept this. Thank you. UPDATE: I figured out why: I commented the auth...

Forms Authentication with Sitemap and asp:Menu control

I have a site with 2 sections - one for customers and one for admins, in essence. Each section is in its own directory with its own web.config and sitemap. Security and access works fine. When I am logged in as admin, I want to see menu items that link to the other section, however. I added links to the sitemap, e.g.: <siteMapNode url...

how to decrypt a string

Hi, How to restore the value of a string after using FormsAuthentication.HashPasswordForStoringInConfigFile() i have a string s1 = "abc" then FormsAuthentication.HashPasswordForStoringInConfigFile(s1, "SHA1") = A9993E364706816ABA3E25717850C26C9CD0D89D How can i decrypt "A9993E364706816ABA3E25717850C26C9CD0D89D" back to "abc"?? ...

Is it possible to strengthen forms authentication in ASP.NET with certificates?

My ASP.NET Internet application uses Forms authentication. There is a limited number of users that will sign up to use application. I don't want to use Windows authentication because it will require me to create Windows accounts for all of them (a few thousand). Is it possible that users must provide a certificate in addition to a userna...

Lock down a site using Forms Auth in IIS7 with Windows Auth

I've posted this on Server Fault, but as there is sort of a programming aspect to it, I'll post it here too. I have an ASP.NET MVC 1.0 application that uses Forms Authentication. We are using Windows Server 2008. I need to lock down the site so that only certain users (in AD Groups) can access the site. Unfortunately, though, when I set...

SharePoint FBA: Membership email vs. "People and Groups" email

I have a WSS 3.0 site with FBA and a custom user management web part. To track user email address, I have been using the Email property of the MembershipUser object. I just realized today that if you go into People and Groups and look at the email address for a user, the email address is blank, and can be edited there independent of the ...

ASP.NET MVC FormsAuthentication Cookie timeout cannot be increased

Using the default ASP.NET MVC template, I cannot figure out how to increase the FormsAuthentication timeout. It seems to always use 30 minutes. I have followed Scott Gu's recommendation from this blog post, but it does not seem to make a difference. Does anyone have a suggestion? His suggestion was to set the timeout value in the web...

ASP.NET Forms Authentication Ticket Timeout

Hi, Whats the best way to create a custom ASP.NET forms authentication ticket with a specified timeout? The timeout value is coming from a database not the web.config. Thanks ...

Authentication Token Not Working Properly in ASP.NET Web Application

I've converted a web site to a web application and am now experiencing a strange behavior with the application. Essentially, there are 2 webs. One web site is the main, front-facing site written in ASP.NET 1.1 but with the Membership piece added from 2.0. The other is a former web site now grown up to a web application. It seems as tho...