I need to create an application with Forms Authentication and/or Windows Authentication. If the application is set to use mixed authentication (Forms + Windows Auth) and the user don't have a Windows user account, the login will fail and he must be redirected to a forms login page. How can I do this?
Are there any different way to provide mixed authentication?
I am Creating a Webapplication. In that i kept Login options where users can login. Some users access the data without login. I want when user want to access without login it should redirect to login page.
I got a role call "Staff", staff registration is done by admin so when creating a new staff only need their name, user name, password and e-mail. After registering, i wan to redirect the staff to the creating profile page to input their contact number and self-description which is a must for later use. For first time login staff, how do i compare and see if the contact and description profile is empty or not? If it is empty, then redirect to the create profile page, else just go to staff page.
I trying to do like making each different role redirect to their own page once they had login. For now when the user login they will remain in the same page showing the login template. How do i do that?
FileUpload works OK on my local site. When I moved my web application to a web host server, I tested to upload a file with this application, It's OK to upload file to the server before login. But after login, the FileUpload kept redirecting to login page without uploading.
My expectation is once the user logs out and if he tries to access any url directly by typing in the browser he should be redirect to login page.But this is not happening now. I have checked the session. it is getting cleared properly while logout. But the user is take in to the screen. How can i fix this? I am looking for something which i can write in the base class so thati need to have to write the same in all the pages. Also this should work in the case of login page(it should not redirect to login page again if try to access login page once user logs out. please not login page also inherits base class).
I'm trying to develop a simple web application where I need to redirect to main.aspx after successful login attempt in login.aspx page.However,it is redirecting the page to defualt.aspx... Is there a way to redirect my application to main.aspx??
I have an option in my website to logout from session and redirect to login page. So I get redirected and if I try to login again it seems like it tries to redirect me to login page over and over, until I click some page in menu and login and it does works. so, doesn't the login control always redirect to same DestinationPageUrl? here the logout code:
I wanted to know how to add the feature- that user should be redirected to an error page where the error will be display, upon entery wrong username/password when trying to login through an asp.net login control?
1. how to redirect the user to an error page upon entering wrong username/password (from a login control which is placed on master page)?
2. how to pass the error to the error page so it can be displayed there?
I have my website in which there are free links and links that require login. Free links open even if the user is not logged in. But in case of links that require login, redirect to login.aspx specified in Web.Config in loginURL tag.
I want some way to override this and show Ajax modal popup (Ajax extender toolkit) with login control for only thos links that require login (not for the free links).
I have a home page that is very design-specific, down to the pixel. It needs to have username/password/login, but I can't have it showing any error messages there. There is a separate standalone login page that is not design-specific and can show any messages. It's using the standard Login control.Is there an easy way to link the two so that if an error occurs on the home page the standalone page comes up with the errors?
Ok, I have been trying with this for many days now and read countless posts on this subject but I still cannot get it working.
I have created 2 roles and memberships one for admin and one for users, as you can guess I want to direct admins to a admin page and users to a user page. When a user logs on, it works fine, whether it's an admin or user, but they both present the home page, default.aspx
I know you have to have a redirecturl, to direct the user to the relevant page, either admin or user, but where and which webconfig would you put this in? I have seen in some post that you need a protected void or a role line in a webconfig file, but I have tried both these and countless other bits of code in different webconfig files. Before you ask about validation, I know this works as the user can log in, but just wont go to the relevant page.
I have a Menu with various Web Pages, as I click to nagivate from one Page to a nother, at random but not often, when I click on to open a Page it took me back to my Login page where user must enter the Name and Password again it then open the page else it doesn't do anything and stay on the login screen. This doesn't occur on my local development test.
On my Pages' Page_Load event I have this code If Not Me.User.Identity.IsAuthenticated Then Response.Redirect("~/Login.aspx") End If
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.
i am using asp.net membership. when users arrive at my sight they can enter user name and password.
I then want to redirect them to a page called "MyAccountPage.aspx" which is unique to them. could someone post the c sharp code that I can use to capture the Unique Id of the user is it best to then pass this as a parameter to a control on the aspx page that displays data for that user. am I correct in thinking that I need a UserId column in my data table as well.
I have created custom a MembershipProvider, SessionIDManager, and SessionStateStore since I need to use custom legacy sessions and logins.. When the Application is ran, it runs the GetSessionID in the SessionIDManager(which is correct) The problem then is if there is no session meaning the GetSessionID method returns null, it tries to create a new session using CreateSessionID.. I want it to redirect to the login application(another application). We only create and store session information for logged in users and the "session id numbers" come from a file that is pre-populated with "session id numbers"(I didnt design this and its out of my control).. So its not feasable to give everyone who visits the site one of the "session id" numbers. I also need for users with an "invalid" session(when checked through Validate()) to be redirected to the login page.