C# - Choose Landing Page After User Logs In?
Jan 31, 2011I was wondering when a user logs in using the login control for ASP.NET, how do we choose where the user goes after? Do we configure this in the web.config file?
View 2 RepliesI was wondering when a user logs in using the login control for ASP.NET, how do we choose where the user goes after? Do we configure this in the web.config file?
View 2 Repliesi use formsauthentication for login. but i wanna register user logs logs table. i can access username page.user.identity.name, but how can use userid?
View 4 RepliesI'm going to add my own user control LoginBox to my MasterPage.
I want to just refresh the page the user is currently on when he logs in to the system. How can I accomplish this?
Building asp.C# shopping app that is using a hosted payment page to process payments (using posting of data to a hosted payment page). SSL certificate is signed and installed.
Flow:
Prelim) (HTTPS) Users authenticate using asp Login control
1) Users add items to cart.
2) (HTTPS)Users go to checkout page.
3) Users finalize their order, then click pay now after agreeing to T&C.
4) Server gets cart data (from MSSQL2005) and sets a transaction cookie (expiry set to 20 mins).
5) (HTTPS) Server Response.Redirects to an html page (in the same folder as the login protected pages).
6) Html page reads transaction cookie data and generates form fields.
7) (HTTPS) Html page posts data to hosted payment page (php).
8) User enters payment info and clicks pay now.
9) (HTTPS) hosted payment page posts info back to a .aspx page that checks if payment OK.
10a) If payment !OK, redirects to a declined page.
10b) (HTTPS) If payment OK, sets a verification cookie (expiry set to 20 mins). Then redirects to another html page.
11) Html page reads cookie data and generates form fields.
12) (HTTPS) Html page posts data to hosted verification page (php).
13) Verification page verifies (of course), if transaction ok.
14) (HTTPS) verification page posts data to a .aspx page that checks if verification OK.
15) If verification OK, process orders and do receipt stuff.
Issue:
This control flow was tested on an unsigned dev environment. SSL was being enforced, if needed on the unsigned SSL certificate. So we'd get prompts that certificate may be bad, but the control flow worked seamlessly.
However, now live with a signed SSL certificate, going from step 5 to 6, we are encountering a situation where some users (not duplicated every time, but verified that it does occur) when they click pay now and are redirected to the html page, they are forced back to the ~/login.aspx page (as if they were logged out).
Things to note:
a) The session did not time out.
b) The browsers have cookies and javascript enabled.
c) I can process the entire flow seamlessly on the same machine with other accounts, and occasionally, the same account.
So, basically, I'm stumped... Is this a viewstate error? A login control bug that won't let me redirect to an html page because it is now using a real SSL? Anyone have any experience with this kind of deal? I'm at a loss for solutions at this point.
I have a site - www.thesite.com - and I want to temporarily send users to www.thesite.com/landing.aspx when they go to www.thesite.com. And then from landing.aspx, I want them to be able to "continue to home page" What is the best way to do this?
View 4 RepliesCoding Platform ASP.NET 4.0 WebForms
I have two pages that are relevant here
Login.aspx
LandingPage.aspx
On Login.aspx when I click an ImageButton, I redirect to Facebook site with the following code
protected void FacebookLoginButton_Click(object sender, ImageClickEventArgs e)
[code].....
i want to find out the websites that are people are coming from when they come on my website. so lets say someone comes from [URL] or [URL] or someone came through email or somewhere else. how can i do this?
View 2 RepliesI am using asp.net 3.5. My Hosting provider has given me a folder to upload my publish application, now when I am entering [URL], I am not getting my homepage, but when I am running the same application on my local I am getting home page. let me know what I have to modify so that when usertype [URL] it will open like [URL]
View 2 Repliesi am trying to develop a webapplication from where a user could set the landing page by his own.like i have an Directory named demo.. in which i have multiple pages...ex.
Default.aspx
index.html
etc.aspx
now i want to create a pnnel, via this pannel user could set his landing page....ex when user enter the URL(www.example.com/demo), the set page should be open..i dont know the exact keyword for searching...so i have no, how this would be possible....
This is what I have in the RegisterUser.aspx and yet when the admin registers a new user, then on clickiing the register button, the site logs in as the user who was just created.
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
Roles.AddUserToRole((sender as CreateUserWizard).UserName, "Department");
}
if user login first time in application in how i promot for change password in Asp.Net C#.
View 1 RepliesNowadays having activity logs of the system is needed for history and if someone who is trying to mess your site, it is easily to define who is it and when it happen. And even Facebook have it.
View 1 Replieshow to add notification facility same as facebook in our c# website, clients get the notification on their profile whenever any new feature is aaded to website..?
View 1 Replieshow to maintain the session that doesn't expire unless and until user logout.
View 1 Repliesi'm using ASP.NET membership for a silverlight application that makes use of Wcf Ria Services.
my problem is that i don't want multiple logins on the same account and i need to logout the user when he logs in on another machine. (I don't want the account to be used by many people at the same time, and the last who logs in must kick out everyone else)
I want to log out the user when he (or someone else) logs in from a diferent computer using the same user name.
Basicaly i want to prevent multiple individuals from staying loged in under a single user name by signing out the previous users. Any ideeas about how i can acomplish that ?
I need to show the user a different page when he loggs in for first time alone..
How can i do this..
We have take over a classic asp site. Everything works fine, but we are making improvements to some reports and adding new reports, so we are doing this in .NET, with that said, after reviewing the secuirty code, there are 2 sessions that are set and used thru-out the site as part of some of the individual page queries.
I know that the sessions are being populated, because the reports that use those values return records.. now with a new report we are working on, i need to pass those values into my query. But when i try using the session names the page is coming up saying the following:Object reference not set to an instance of an object.
Is there anyway to add something to my page code to see what sessions are actually being created and their values.. maybe im using the wrong variable names.. but the security code is pretty straight forward.. at login, if successful, 2 values are returned and stored in 2 sessions.. i need to use those with my new page.. so trying to figure out why the existing pages work fine with that and my new page does not..
Basically, i'd like to write to the screen the session variables that are being created on the login page.
i am using membership to create an account page that a user enters after logging on.
In the page load of "MyAccountPage.aspx" I have the following which gets the userid and add it as a paremeter
Guid userid = (Guid)Membership.GetUser().ProviderUserKey;"ClientId"].DefaultValue
= userid.ToString();
ObjectDataSource7.SelectParameters[
"ClientId"].DefaultValue = userid.ToString();
This works fine - I have now added to the page a LoginStatus as when they arrive they are loggen in. The problem is when the user clicks the Logg off link I get the error on the page below -
Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
[Code]....
Is this because the page load is trying to get the logged on user ID
but they have just logged out?
How can I allow the User to logg out without getting the error?
I need to do something when the user logs out. I have used ASP.NET Forms Authentication.
What should I override or implement?
I have an ASP.NET login control and I want to empty the basket-viewer when the customer logs out of the system.
I've been trying to work out this error for a while now and i still dont understand it because i have been following a tutorial online step-by-step but i recieve this error when i log in ?
What i am trying to acheive is when the user logs in then they are able to view their 'profile' such as their name, address etc. The login is validated against a table in a database, ...this is the error i am recieving:
Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
[Code]....
I have an web application which requires login. When users finish their activities they simply logout. What I need is to clear browser history when user click logout button. This should disable BACK button in browser.
View 1 RepliesI'm only a novice asp.net developer and have never done this before. I have a developer working on a new web application for me. Part of the application allows the user to select a time when they receive an email, containing information collected throughout the day. The user can select a time, e.g. 5pm, then at 5pm every day they receive an automated email of information from the system. They can log in to their control panel and change this time.My developer says there is only two ways to schedule this batch, but it's not possible to let the user select a time. They have suggested:
a) Using a console application that will trigger the event everyday and send the batch update
b) Using a Windows Service that will deploy on your server and do the operation.
I really need the system to be able to let the user choose the time of their email. I hoped this would be possible with ASP.NET. Is it? If so, how?
Roles: - administators
If it administator shows menu "Admin".
If I want to display the menu: "Create new employee ', have to create Roles: new_employee?
If so, how to choose a user and store specify their rights in c#?
I want to put up a table with a couple columns, and have the user select a row. This will all be from code; not through a DataConnection. GridView seems like it wants to deal with bound controls. What control should I use? ListView doesn't do columns. A table doesn't seem to allow selection. Specifically, what I'm doing is letting the user find a person in active directory. They'll enter the name, and I'm going to present a list of the Active Directory matched results that they can choose from. Is there already some built in control or package that will do this?
View 1 Replies