Security :: FormsAuthentication.RedirectFromLoginPage In IE8

May 5, 2010

I have the following code in my secure/login.aspx page using .NET 3.5 and VB.NET

[Code]....
[Code]....

I read some articles that mentioned specifying the domain attribute within the <forms tag but that did not seem to work either. e.g.

View 4 Replies


Similar Messages:

Security :: What Is The Difference FormsAuthentication.RedirectFromLoginPage And FormsAuthentication.SetAuthCookie

Mar 16, 2010

What is the difference between:

FormsAuthentication.RedirectFromLoginPage

AND

FormsAuthentication.SetAuthCookie(Text_txtUserName.Text, true);
HttpContext.Current.Response.Redirect(RedirectFromLoginAddress);

View 3 Replies

Security :: FormsAuthentication RedirectFromLoginPage Change Default.aspx

Oct 14, 2010

I know this post is the same than other around but I can't get it to work the way I want, the thing is that the Login.aspx page have it in a folder not in the root of the directory, also the page that I want to redirect the user to is in the same folder, so far I got this in my web.config file

[Code]....

All pages contained in the Admin folder want it to be protected, the administrator needs to authenticate first, so my question is what I am doing wrong? need to take the Login.aspx and the admin.aspx out of the admin folder?

View 5 Replies

Security :: How To Set Request.IsAuthenticated To True When Not Using FormsAuthentication.RedirectFromLoginPage

Dec 19, 2010

How to set Request.IsAuthenticated to true when not using FormsAuthentication.RedirectFromLoginPage?

View 3 Replies

FormsAuthentication.RedirectFromLoginPage Does Not Return To Orignal URL?

Jan 5, 2010

I reach my login page with the parameter "returnUrl" set to the URL I was on. Then, I login via OpenID (DotNetOpenAuth), and call FormsAuthentication.RedirectFromLoginPage(). The login is successful, however I am not returned to the original page I was on.

I'm having the same problem on logout - when I log out I don't remain on the same page, even though the logout link contains the correct "returnUrl" parameter.

What am I doing wrong?

Here is the code snippet. I am returning EmptyResult() after the call to RedirectFromLoginPage, because I don't really know what to do (see this related question)

using (var relayingParty = new OpenIdRelyingParty())
{
var response = relayingParty.GetResponse();[code]....

View 1 Replies

Call FormsAuthentication.RedirectFromLoginPage 10'000 Times?

Dec 30, 2010

Is it OK to call FormsAuthentication.RedirectFromLoginPage many times?

On login page we test if user is already logged in, and if it is we just redirect him to default page with FormsAuthentication.RedirectFromLoginPage...

Question is if user sets a script that loads login page 10'000 times, would calling the FormsAuthentication.RedirectFromLoginPage that many times make problems?

View 2 Replies

FormsAuthentication.RedirectFromLoginPage - Fragment Not Preserved On Redirect?

Mar 3, 2010

I have a page, URI looks like this:

http://domain.example.com/Profiles/Profile.aspx?username=blah#blahtab

When that fragment (#blahtab) is present, some jQuery picks up on that and displays a different section of the page initially. However, that page requires a user to authenticate first. Coming back from the authentication step using FormsAuthentication, the fragment is discarded, regardless of the UrlEncode step.

I don't see the fragment actually sent to the server when I use a debugger on my local machine. Is this standard fare and the fragment is only for the client side?How can I keep that tacked on without writing my own redirection code on the login page?

Alternately, should I use another method to preserve the view of the page?

View 1 Replies

C# - ASPX FormsAuthentication.RedirectFromLoginPage Function Is Not Working Anymore

Mar 23, 2010

I have an ASPX web site and I have code in there to redirect from the login page with the call to

"FormsAuthentication.RedirectFromLoginPage(username, false);" This sends the user from the root website folder to 'website/Admin/'. I have a 'default.aspx' page in 'website/Admin/' and the call to redirect works on a previous version of the website we have running currently, but the one that I am updating on a separate test server is not working. It gives me the error "Directory Listing Denied. This Virtual Directory does not allow contents to be listed." I have this in the config file:
<authorization>
<allow users="*" />
</authorization>

under the "authentication" option and...

<location path="Admin">
<system.web>
<authorization>[code]....

for the location of Admin.Also, there is no difference in the code between the web.config, Login.aspx, or the default.aspx files on the current server and the one on the test server, so I am confused as to why the redirect will not work on both. It even works in the Visual Studio server environment, for which the code is also identical.

View 1 Replies

Using The FormsAuthentication.RedirectFromLoginPage For The User Login And For Redirect To Default

May 24, 2010

i'm using the FormsAuthentication.RedirectFromLoginPage for the user login and for redirect to default.aspx page. I want that if a user called admin do the login is redirected to the page admin.aspx

View 3 Replies

Security :: Specify URL For RedirectFromLoginPage Method?

Mar 17, 2010

How can I do this?I want to be able to manually specify the location that I want the user to be redirected to using this method....?

FormsAuthentication.RedirectFromLoginPage

View 4 Replies

Security :: RedirectFromLoginPage For Multiple Sites?

May 12, 2010

I have created two iis web sites (site1,site2) both have the following configuration

[Code]....

from site1 i do

[Code]....

and in site2 if i checked if the user is authenticated ,i get a true, and i see "user1" as the current user.i know that what i have done above use a cookie,and as i know cookie are visible in the same domain (site) or sub domain,how form authentication make the cookie visible for both sites , this scenario must work for a site with two virtual directory inside it(sub site or application), but what is happening here any explanation.

View 5 Replies

Security :: What Is The Use FormsAuthentication.user.identity

Oct 7, 2010

what is the use formsAuthentication.user.identity

is it one of the property of page

View 1 Replies

Security :: FormsAuthentication LoginUrl Messing With CSS?

Apr 23, 2010

I have a login page that is set to the loginUrl property in the authentication section of my web.config file. I am trying to reference a CSS stylesheet, but it doesn't seem to be doing anything. Here is my markup:

[Code]....

I am able to do this just fine on my other page. One thing I noticed was when I click on "View Source" and try to click the link to the stylesheet, it doesn't take me there, and instead changes the "action" property of the form element to this:

[Code]....

View 2 Replies

Security :: Password Encryption Using Formsauthentication?

Dec 1, 2010

Just a quick question i've been asked to look at enhancing security but encrypting passwords we store in a db table, essentially the data thats linked to the user account isnt sensitive however its more to stop someone reading passwords out of the table directly etc

I've read multiple ways of implimenting hashing etc i've started using FormsAuthentication.HashPasswordForStoringInConfigFile
//create new salt and update the password
Hashtable newInfo = new Hashtable();
newInfo["salt"] = GenerateFriendlyPassword(5);
string tmppass = FormsAuthentication.HashPasswordForStoringInConfigFile(txtNewPass1.Text.ToString() + newInfo["salt"].ToString(), "SHA1");
newInfo["passwordHash"] = tmppass;

Generate friendly password returns a 5 char string based on a random position in a valid char array containing a - z and 0 - 9At present the functionality is at page level in the code behind, re this is the forms authentication HashPasswordForStoringInConfigFile function thread safe? Or do i need to look at implimenting this in a different wayCheers appreciate your response as im always jubious about multi threading etc,

View 1 Replies

Security :: FormsAuthentication.SetAuthCookie () Isn't Working

Jan 8, 2010

In my account controller I am calling FormsAuthentication.SetAuthCookie( emailAddress, rememberMe ).

Response.Cookies has my cookie. However, after the redirect the cookie is gone and the request is not authenticated.

View 6 Replies

Security :: Formsauthentication Works In All Browsers Except IE?

Nov 6, 2010

We have a windows 2003 webserver which hosts .NET applications. Since last Microsoft security updates formsauthentication on all websites works only on non IE browsers? Before the update we experienced no problems.

View 2 Replies

Security - FormsAuthentication - Unable To Redirect After Login?

Aug 9, 2010

I am using Forms Authentication in my VS-2005 website.In case of wrong credentials or while explicitly requesting protected pages the website is able to redirect user to login page. However, when correct login credentials are provided the application is not able to redirect the user to the desired page.While debugging I found that 'Request.IsAuthenticated=False' just before I redirect the user to the desired page.While coding I thought that this property will be set to true automatically after I generate the Authentication ticket. So do I need to set it explicitly inside the submit button click on Login page after validation?BTW I have not used the 'GetAuthcookie', 'SetAuthCookie' or 'RedirectFromLoginPage' methods.
I am posting the code inside the submit button click on the Login page as well as the Authentication and Authorization tags in web.config.

<authentication mode="Forms">
<forms name=".ASPXFORMSDEMO" loginUrl="~/Login.aspx" cookieless="UseCookies" path="~/"/>
</authentication>
<authorization>
<deny users="?"/>
</authorization>

Protected Sub btnsubmit_click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnsubmit.Click
'here first validate if the user is valid user
ad = New Aranya_Data

[code]....

View 1 Replies

Security :: Which Identity Is Authenticated By FormsAuthentication.SetAuthCookie

Mar 15, 2011

i have created a custom principal class, and a custom Identity.

named SystemIdentity and SystemPrincipal.

SystemIdentity class has some additional properties ( UserID, UserName, Age, ...)

in my Global.asax file I changed PostAuthenticateRequest event as bottom

[code]....

i wonder theese questions answer now:

1. where i can assign the additional properties of SystemIdentity ( UserID, UserName, Age, ...)
2. which Identity is Authenticated by FormsAuthentication.SetAuthCookie? is my custom Identity, or GenericIdentity?

View 2 Replies

Security :: FormsAuthentication.Authenticate Always Returns False?

May 9, 2010

I have configured Forms Authentication in my web config file as below.

Following is my code

[Code]....

The issue is that FormsAuthentication.Authenticate never returns true. This is a very simple website with only two pages and no other code(The code too was copied from MSDN).

[Code]....

View 3 Replies

Security :: Custom Membership Provider And FormsAuthentication?

Sep 9, 2010

I've implemented my custom membership provider. I use third server for authentication (call web method that validates user/password). I need this user/password for retrieve some additional data from this server. Asp.net MVC uses FormsAuthentication and cookie for keep 'login state' by default. It works well when I login on site first time. But when I close and open site again sometime after, cookie keeps it 'login'but I don't have credential for access to server data. I can change cookieless attribute (to 'UseUri' for example) in configure file but in this case I should login again if I open second tab with this app in same browser.My questions:

Is way to call SingOut of FormsAuthentication (remove authentication ticket from browser) when user closes asp.net mvc app?Is secure way to pass user/password data through session? Because server is unstable and interrupt connection often and app should have possibility for silent reconnect.

View 3 Replies

Security :: Formsauthentication Timeout And 2 Login Pages?

Jun 29, 2010

My client wants 2 separate login pages for an ASP.Net app, one for regular users, one for support staff. I am using the standard FormAuthentication component for authentication. Is it possible to redirect a regular user to one login page after a timeout, and also to redirect an admin user to a different page after a timeout? The loginUrl attribute of <forms> in web.config is read-only, and cannot be edited at runtime.

Regular User -> Timeout -> Login.aspx
Support User ->Timeout -> SupportLogin.aspx

View 1 Replies

Security :: Authenticate User By Using FormsAuthentication.SetAuthCookie?

Mar 12, 2010

I Need to Authenticate a User by using FormsAuthentication.SetAuthCookie and Check User is Authenticated in Another page Load How to Do this anyone?

Login Page

if (txtuname.Text == "mike")
{
FormsAuthentication.SetAuthCookie("mike", true);
Response.Redirect(FormsAuthentication.DefaultUrl);
}
Welcome Page
PageLoad()
{
}

View 1 Replies

Security :: Keep User Logged In (through New Sessions) With FormsAuthentication?

Jun 19, 2010

I'm trying a lot a things in these days around the Login control. What I want: to keep the user logged ind also when she close the browser. When se returnes to the page, she should be moved to the DestinationPageUrl of the login control.

My Login control:

[Code]....

My Codebehind file for the login control:
[Code]....

My web.cofig settings:
[Code]....

As you can se, I have learned (from google and here in forums.asp.net) that I need to do a FormsAuthentication.SetAuthCookie but I have one problem....... If I do nothing in the page_load the control doesn't keep me logged in through sessions.Is there anyone who can help me, and either explain og link me to a page, where I can see, how I can get the UserName and Password from the FormsAuthentication.SetAuthCookie I maid. I also need to know if when I get UserName and Password from cookies andthen redirect to the /Content/Default.aspx page in page_load the system knows (formsauthentication) the user is logged in?

View 3 Replies

Security :: Session Varial Expire But Not The FormsAuthentication Cookie?

Feb 20, 2010

I have a littel problem.

In my asp.net application iam using Form FormsAuthentication.... and also use a session var to save a userID..

The problem is that ´when my session espire, the Form cooki is not expired.

I want form cooki to expire, when session expires....how?

Do i have to do it in Session_end event..

How do the code look like?

View 2 Replies

Security :: FormsAuthentication.SignOut() Results In System.NullReferenceException?

Aug 26, 2010

I am getting a "System.NullReferenceException" when I call

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved