<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tag 'FormsAuthentication'</title><link>http://forums.asp.net/search/SearchResults.aspx?q=&amp;tag=FormsAuthentication&amp;orTags=0&amp;o=DateDescending</link><description>Search results matching tag 'FormsAuthentication'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Processing in status bar keeps processing after all done!</title><link>http://forums.asp.net/thread/3364433.aspx</link><pubDate>Mon, 24 Aug 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3364433</guid><dc:creator>premchandrasingh</dc:creator><description>&lt;p&gt;Hi Lyra,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for your reply and time. I have check my javascript and web services there I could not find any extra call in both service and javascript.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am sorry I cant give the souce code and I think souce will not help to understand my problem. Yes I can explain more detail.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Its a popup to edit profile detail, when I complete editing I click to save and profile is successfully get updated and I closed the popup (no js error, no server error nothing, evething is working fine as expected). &lt;b&gt;But the processing&amp;nbsp; in the status bar keeps processing (&lt;/b&gt;&lt;b&gt;for IE&lt;/b&gt;&lt;b&gt;) work fine in FF Mozila&lt;/b&gt;. Yes in this profile update I also allow to change the existing user name so I added following two line of code to unauthenticate old user and authenticate the new user.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="c-sharp"&gt;// unauthenticate the current username
FormsAuthentication.SignOut();

//authenticate the new username
FormsAuthentication.SetAuthCookie(UserName, false);&lt;/pre&gt;&lt;br /&gt; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Now my question is could this SetAuthCookie be the problem?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Forms authentication and multiple login pages</title><link>http://forums.asp.net/thread/3100800.aspx</link><pubDate>Sat, 18 Apr 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3100800</guid><dc:creator>todbr</dc:creator><description>I&amp;#39;m building a web-based solution for a camera repair shop. The site structure is basically as follows:&lt;ul&gt;&lt;li&gt;www.foo.com - main page, public site&lt;/li&gt;&lt;li&gt;www.foo.com/internal/ - used by staff to manage orders, clients, etc. Requires login (user/pass) against DB table &amp;quot;users&amp;quot;.&lt;/li&gt;&lt;li&gt;www.foo.com/clients/ - accessed through a link in the main page, allows users to consult the status of the repair. Requires login with order number and a password that is printed in the order receipt (6-digit hex hash based on order number).&lt;/li&gt;&lt;li&gt;www.foo.com/partners/ - accessed by clients who have an annual contract (like a photo studio) and sends lots of equipments for repairing. Requires login (user/pass) against DB table &amp;quot;partners&amp;quot;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;What I&amp;#39;d like to do is set different authorizations for each subfolder - and different login pages. I&amp;#39;ve been toying around with &amp;lt;location&amp;gt; in web.config, or multiple web.configs for each subfolder, but no luck so far. I know there a lots of post with similar issues, but none of the solutions fits my case. Different &amp;quot;roles&amp;quot; isn&amp;#39;t a solution: the staff members even have different roles, up to &amp;quot;admin&amp;quot;, but an &amp;quot;admin&amp;quot; logged in /internal/ shouldn&amp;#39;t have access to /clients/.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;All of these subdirectories share the same DB (Access database stored in /App_Data) and resources like images, css, etc. (stored in /img, /css etc.), so they are NOT independent applications - creating different virtual directories in IIS was a solution suggested in some posts and also in an ASP.Net error.&lt;/p&gt;&lt;p&gt;My&amp;nbsp; &amp;quot;intuitive&amp;quot; solution, which didn&amp;#39;t work, obviously, was on web.config in the root:&lt;/p&gt;&lt;pre class="coloredcode"&gt;&amp;lt;location path=&amp;quot;&amp;quot;&amp;gt;
	&amp;lt;&lt;span class="tag"&gt;system.web&lt;/span&gt;&amp;gt;
		&amp;lt;&lt;span class="tag"&gt;authorization&lt;/span&gt;&amp;gt;
			&amp;lt;&lt;span class="tag"&gt;allow&lt;/span&gt;&lt;span class="attr"&gt; users=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;*&amp;quot;&lt;/span&gt; /&amp;gt;
		&amp;lt;/&lt;span class="tag"&gt;authorization&lt;/span&gt;&amp;gt;
	&amp;lt;/&lt;span class="tag"&gt;system.web&lt;/span&gt;&amp;gt;
&amp;lt;/&lt;span class="tag"&gt;location&lt;/span&gt;&amp;gt;
&amp;lt;&lt;span class="tag"&gt;location&lt;/span&gt;&lt;span class="attr"&gt; path=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;~/internal&amp;quot;&lt;/span&gt;&amp;gt;
	&amp;lt;&lt;span class="tag"&gt;system.web&lt;/span&gt;&amp;gt;
		&amp;lt;&lt;span class="tag"&gt;authentication&lt;/span&gt;&lt;span class="attr"&gt; mode=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Forms&amp;quot;&lt;/span&gt;&amp;gt;
			&amp;lt;&lt;span class="tag"&gt;forms&lt;/span&gt;&lt;span class="attr"&gt; name=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;.ASPXFORMSAUTH&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; loginUrl=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;~/internal/login.aspx&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; timeout=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;30&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; defaultUrl=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;~/internal/default.aspx&amp;quot;&lt;/span&gt; /&amp;gt;
		&amp;lt;/&lt;span class="tag"&gt;authentication&lt;/span&gt;&amp;gt;
		&amp;lt;&lt;span class="tag"&gt;authorization&lt;/span&gt;&amp;gt;
			&amp;lt;&lt;span class="tag"&gt;deny&lt;/span&gt;&lt;span class="attr"&gt; users=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;?&amp;quot;&lt;/span&gt;/&amp;gt;
		&amp;lt;/&lt;span class="tag"&gt;authorization&lt;/span&gt;&amp;gt;
	&amp;lt;/&lt;span class="tag"&gt;system.web&lt;/span&gt;&amp;gt;
&amp;lt;/&lt;span class="tag"&gt;location&lt;/span&gt;&amp;gt;
&amp;lt;&lt;span class="tag"&gt;location&lt;/span&gt;&lt;span class="attr"&gt; path=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;~/clients&amp;quot;&lt;/span&gt;&amp;gt;
	&amp;lt;&lt;span class="tag"&gt;system.web&lt;/span&gt;&amp;gt;
		&amp;lt;&lt;span class="tag"&gt;authentication&lt;/span&gt;&lt;span class="attr"&gt; mode=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Forms&amp;quot;&lt;/span&gt;&amp;gt;
			&amp;lt;&lt;span class="tag"&gt;forms&lt;/span&gt;&lt;span class="attr"&gt; name=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;.ASPXFORMSAUTH&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; loginUrl=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;~/clients/login.aspx&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; timeout=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;30&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; defaultUrl=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;~/clients/default.aspx&amp;quot;&lt;/span&gt; /&amp;gt;
		&amp;lt;/&lt;span class="tag"&gt;authentication&lt;/span&gt;&amp;gt;
		&amp;lt;&lt;span class="tag"&gt;authorization&lt;/span&gt;&amp;gt;
			&amp;lt;&lt;span class="tag"&gt;deny&lt;/span&gt;&lt;span class="attr"&gt; users=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;?&amp;quot;&lt;/span&gt;/&amp;gt;
		&amp;lt;/&lt;span class="tag"&gt;authorization&lt;/span&gt;&amp;gt;
	&amp;lt;/&lt;span class="tag"&gt;system.web&lt;/span&gt;&amp;gt;
&amp;lt;/&lt;span class="tag"&gt;location&lt;/span&gt;&amp;gt;
&amp;lt;&lt;span class="tag"&gt;location&lt;/span&gt;&lt;span class="attr"&gt; path=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;~/partners&amp;quot;&lt;/span&gt;&amp;gt;
	&amp;lt;&lt;span class="tag"&gt;system.web&lt;/span&gt;&amp;gt;
		&amp;lt;&lt;span class="tag"&gt;authentication&lt;/span&gt;&lt;span class="attr"&gt; mode=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Forms&amp;quot;&lt;/span&gt;&amp;gt;
			&amp;lt;&lt;span class="tag"&gt;forms&lt;/span&gt;&lt;span class="attr"&gt; name=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;.ASPXFORMSAUTH&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; loginUrl=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;~/partners/login.aspx&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; timeout=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;30&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; defaultUrl=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;~/clients/default.aspx&amp;quot;&lt;/span&gt; /&amp;gt;
		&amp;lt;/&lt;span class="tag"&gt;authentication&lt;/span&gt;&amp;gt;
		&amp;lt;&lt;span class="tag"&gt;authorization&lt;/span&gt;&amp;gt;
			&amp;lt;&lt;span class="tag"&gt;deny&lt;/span&gt;&lt;span class="attr"&gt; users=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;?&amp;quot;&lt;/span&gt;/&amp;gt;
		&amp;lt;/&lt;span class="tag"&gt;authorization&lt;/span&gt;&amp;gt;
	&amp;lt;/&lt;span class="tag"&gt;system.web&lt;/span&gt;&amp;gt;
&amp;lt;/&lt;span class="tag"&gt;location&lt;/span&gt;&amp;gt;&lt;/pre&gt;&amp;nbsp;&lt;br /&gt;&lt;p&gt;Any suggestions? &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: &amp;quot;Remember me next time&amp;quot; not working for Login control? Here's why!</title><link>http://forums.asp.net/thread/3017216.aspx</link><pubDate>Wed, 18 Mar 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3017216</guid><dc:creator>skydiverMN</dc:creator><description>&lt;p&gt;To keep&amp;nbsp;the maintenance to a minimum and not require compiling, remember to use the defaultUrl property in the response.redirect when the user is authenticated during the page_load.&amp;nbsp;&amp;nbsp;Use the following in your login page Page_Load event:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;span class="kwd"&gt;protected void&lt;/span&gt; Page_Load(&lt;span class="kwd"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwd"&gt;if&lt;/span&gt; (User.Identity.IsAuthenticated == &lt;span class="kwd"&gt;true&lt;/span&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;strong&gt;Response.Redirect(&lt;/strong&gt;&lt;strong&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;FormsAuthentication&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.DefaultUrl, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;true&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/strong&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&amp;nbsp;&amp;nbsp; 
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Now, you just need to modify the redirect location in one place, assuming you actually added the defaultUrl into the web.config forms tag!&amp;nbsp; &lt;br /&gt;&lt;/font&gt;
&lt;p&gt;&amp;lt;authentication mode=&lt;span class="st"&gt;&amp;quot;Forms&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;Login.aspx&amp;quot;&lt;/span&gt; protection=&lt;span class="st"&gt;&amp;quot;All&amp;quot;&lt;/span&gt; &lt;strong&gt;defaultUrl=&lt;span class="st"&gt;&amp;quot;default.aspx&amp;quot;&lt;/span&gt;&lt;/strong&gt; timeout=&lt;span class="st"&gt;&amp;quot;20&amp;quot;&lt;/span&gt;&amp;nbsp; name=&lt;span class="st"&gt;&amp;quot;.SecurityFormsAuth&amp;quot;&lt;/span&gt; slidingExpiration=&lt;span class="st"&gt;&amp;quot;true&amp;quot;&lt;/span&gt; cookieless=&lt;span class="st"&gt;&amp;quot;UseCookies&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;[quote user=&amp;quot;anandgothe&amp;quot;] 
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;protected&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;font size="2"&gt; Page_Load(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;font size="2"&gt; sender, &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;EventArgs&lt;/font&gt;&lt;font size="2"&gt; e)&lt;br /&gt;{&lt;/font&gt;&lt;font size="2"&gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/font&gt;&lt;font size="2"&gt; (User.Identity.IsAuthenticated == &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;true&lt;/font&gt;&lt;font size="2"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/font&gt;&lt;font size="2"&gt;Response.Redirect(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Success.aspx&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;font size="2"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font size="2"&gt;}&lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;/p&gt;&lt;/font&gt;[/quote]</description></item><item><title>Re: Best way to maintain Session for many concurrent users</title><link>http://forums.asp.net/thread/2969170.aspx</link><pubDate>Thu, 26 Feb 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2969170</guid><dc:creator>mammu</dc:creator><description>&lt;p&gt;&amp;nbsp;I think u can make use of the &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.httpcontext.user.aspx" target="_blank"&gt;HttpContext.Current.Use&lt;/a&gt;r Object&lt;/p&gt;&lt;p&gt;This has many&amp;nbsp; more features like Roles, Identities..etc&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Stopping a direct url browser entry redisplaying an authenticated page</title><link>http://forums.asp.net/thread/2924414.aspx</link><pubDate>Sat, 07 Feb 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2924414</guid><dc:creator>ExGliderPilot</dc:creator><description>&lt;p&gt;Hi I have a page which needs forms authenication to view. That fine and it works via the standard asp membership provider. If a user logs in , views the secure page, then closes a web page in their (ie) browser (without logging out) and then opens the browser again and enters the url of the secure page&amp;nbsp;at the moment the &amp;quot;secure&amp;quot; information is redisplayed. Any attempt to post back results in a redirect to the login page.&amp;nbsp;Any ideas on how to stop this? That is to say cause a redirect to the login page when their browser is closed (sort of auto&amp;nbsp; log off)&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>Need to integrate CAC Card Authentication with ASP.NET Membership Provider</title><link>http://forums.asp.net/thread/2785315.aspx</link><pubDate>Thu, 04 Dec 2008 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2785315</guid><dc:creator>bfancett</dc:creator><description>&lt;p&gt;I have worked on two web development projects for the DoD, and they use CAC cards for authentication.&amp;nbsp; I have gotten as far as being able to pull information off of the CAC card, store it in a UserAuth table (SQL Server 2005 Std), however the problem is that my web.sitemap is using roles authentication to determine if the user has rights to see certain areas of the web application.&amp;nbsp; When I allow the user access to the application based on thier valid CAC information, and then bypass the member login form, I loose my sitemap. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;How can I allow CAC card authentication and still use the ASP.Net Membership provider to provide roles authentication for my web application?&lt;/p&gt;
&lt;p&gt;This is a huge deal, so any suggestion would be great.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;</description></item><item><title>FormsAuthentication cookie persists in Firefox?</title><link>http://forums.asp.net/thread/2660189.aspx</link><pubDate>Thu, 02 Oct 2008 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2660189</guid><dc:creator>chillah21</dc:creator><description>&lt;p&gt;&amp;nbsp;Hi guys, I&amp;#39;ve got a question here about a FormsAuthentication cookie in Firefox.&amp;nbsp; In IE, if a user closes their browser, opens a new window, and tries navigate to a page within my site, they&amp;#39;re redirected to the login page.&amp;nbsp; Works perfectly.&amp;nbsp; In Firefox, if they close the window, open a new window, and navigate to a page within the site, the page is displayed to them.&amp;nbsp; I want them to be redirected to the login page.&amp;nbsp; I&amp;#39;ve tried looking at the cookies in Firefox and the FormsAuthentication (and ASP.NET_SessionId) cookies are there with &amp;#39;Expires: at end of session&amp;#39;, and they are still there after I close the browser.&amp;nbsp; Is there any way I can force these cookies to disappear when Firefox is closed, or any properties I can use to reliably detect whether they&amp;#39;re coming to the site in what should be a new session?&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;My code is:&lt;/p&gt;
&lt;p&gt;&amp;lt;forms name=&amp;quot;...&amp;quot; loginUrl=&amp;quot;...&amp;quot; defaultUrl=&amp;quot;...&amp;quot; protection=&amp;quot;All&amp;quot; path=&amp;quot;/&amp;quot; slidingExpiration=&amp;quot;true&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;FormsAuthentication.RedirectFromLoginPage(userId, false); &lt;/p&gt;</description></item><item><title>Forms Authentication - How to Kill previous login credintails of the same user? </title><link>http://forums.asp.net/thread/2615247.aspx</link><pubDate>Thu, 11 Sep 2008 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2615247</guid><dc:creator>Jzeb</dc:creator><description>&lt;p&gt;HI,&lt;/p&gt;&lt;p&gt;&lt;b&gt;Scenario: &lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; I&amp;#39;ve been trying to use Forms Authentication in my application. I&amp;#39;ve my user credentials stored in the custom database tables as of now...will upgrade it to ads later.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; When a user Logs in, I validate the credentials from my database and then use &lt;b&gt;&lt;i&gt;FormsAuthentcaiton.RedirectFromLoginPage()&lt;/i&gt;&lt;/b&gt; to set the cookies. &lt;/p&gt;&lt;p&gt;&lt;b&gt;Problem:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; Say a user &amp;quot;X&amp;quot; logs in the system from his machine. Now, when &lt;b&gt;another user &amp;quot;Y&amp;quot;&lt;/b&gt; tries to log in from another machine with &lt;b&gt;&lt;u&gt;user &amp;quot;X&amp;quot; credentials&lt;/u&gt;&lt;/b&gt;, I want that the user &amp;quot;X&amp;quot; should be logged off, when he tries to do anything further on the system.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;I know this: &lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I know I can handle it through session ID management - but for this each request to the server has to validate the user session.&amp;nbsp; &lt;/p&gt;&lt;p&gt;&lt;b&gt;What I want to know:&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.&amp;nbsp; I wanted to know that is there a better way to do this?&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; 2.&amp;nbsp; Is there anything inbuilt in the .Net Framework which I can use?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks a lot!&amp;nbsp; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>FormsAuthentication.Encrypt . Why is this necessary ?</title><link>http://forums.asp.net/thread/2582088.aspx</link><pubDate>Tue, 26 Aug 2008 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2582088</guid><dc:creator>skobyjay</dc:creator><description>&lt;p&gt;This isn&amp;#39;t required for FormsAuthentication to work( at least I don&amp;#39;t think so)&amp;nbsp; so what is special about this feature?&lt;/p&gt;</description></item><item><title>FormsAuthentication.SetAuthCookie() Profile issue</title><link>http://forums.asp.net/thread/2572793.aspx</link><pubDate>Thu, 21 Aug 2008 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2572793</guid><dc:creator>test_dummy</dc:creator><description>&lt;p&gt;I have forms authentication setup on my web app.&amp;nbsp; I&amp;#39;m having one little problem though.&amp;nbsp; After I call the method FormsAuthentication.SetAuthCookie(string, bool), I went to set some profile properties.&amp;nbsp; I can not do it before calling the method because the profile doesn&amp;#39;t get created until after authentication.&amp;nbsp; The problem is the Profile object is not accessible at this point and i&amp;#39;m not sure why, therefore my code will through an exception at line 3.&amp;nbsp; Is there any point in the page life cycle I can access the profile object after authentication or do I have to call another page to set the profile object&amp;#39;s properties?&amp;nbsp; Any help in understanding this problem would be appreciated.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;My code:&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;pre class="coloredcode"&gt;&lt;b id="1"&gt;1    &lt;/b&gt;FormsAuthentication.SetAuthCookie(user.UserID, user.RememberID)&lt;br /&gt;&lt;b id="2"&gt;2    &lt;/b&gt;&lt;br /&gt;&lt;b id="3"&gt;3    &lt;/b&gt;Profile.UserIDNumber = user.UserIDNumber&lt;br /&gt;&lt;b id="4"&gt;4    &lt;/b&gt;Profile.FirstName = user.FirstName&lt;br /&gt;&lt;b id="5"&gt;5    &lt;/b&gt;Profile.LastName = user.LastName&lt;br /&gt;&lt;/pre&gt;&amp;nbsp;&lt;br /&gt;&lt;/pre&gt;&lt;pre class="coloredcode"&gt;&amp;nbsp;&amp;nbsp;&lt;/pre&gt;&amp;nbsp;&amp;nbsp;</description></item></channel></rss>