OK, I'm going to go ahead and build a "second generation example." What we did here was an experiment and it appears the "gamble" paid off, so I'd like to roll the dice again. Would you like me to also include the code mentioned by the second poster,
Chetan? The reason I bring it up, I'm planning to anyway, simply so we have the value of the experience of trying something new and exploring it--but also, if you used it and you found something you liked better about it then we could use that specifically.
I don't want to promise it but I'm thinking the next generation could have a folder called Admin which has stuff that is accessible only if a logged in person happens to have been approved as an Admin role person. Maybe also have a customer Role too. Please
note (if you haven't come across this already)--when a person registers they immediately have a status change--but maybe that person who registered is your business competitor so you want to create a role for Customers so that you have to approve them before
they actually are granted access (in this case to a folder called Customers).
I haven't done it for a while but my memory says we can do something in the web.config file to specify folder access and then maybe once a day you go into the page (can't remember the name but it is the hammer and world icon furthest to the right under Solution
Explorer) and you look at people who are registered and you give them approvals there (I'm pretty sure this can also be done programmatically.)
Are you working on a "local machine" like a laptop or a desktop, or are you working on server (like a server at work or a commercial web site provider)?
OK, this new example might have even more files to copy but, hey, we're ready to gamble that it will be worth it, right? (and the gamble is that another person coming here for the original question is going to want to go down this same path).
Also, when you reply post, keep telling me what you would like. It helps to have several things because I'll start with what I know right away and then I'll work on what I need to learn while doing the rest (I'll also have a long page that has all the files
and I'll update it periodically until all are finished).
ldechent
Contributor
6326 Points
1577 Posts
Re: Display user name in the header when logged in
Jan 07, 2009 01:24 PM|LINK
OK, I'm going to go ahead and build a "second generation example." What we did here was an experiment and it appears the "gamble" paid off, so I'd like to roll the dice again. Would you like me to also include the code mentioned by the second poster, Chetan? The reason I bring it up, I'm planning to anyway, simply so we have the value of the experience of trying something new and exploring it--but also, if you used it and you found something you liked better about it then we could use that specifically.
I don't want to promise it but I'm thinking the next generation could have a folder called Admin which has stuff that is accessible only if a logged in person happens to have been approved as an Admin role person. Maybe also have a customer Role too. Please note (if you haven't come across this already)--when a person registers they immediately have a status change--but maybe that person who registered is your business competitor so you want to create a role for Customers so that you have to approve them before they actually are granted access (in this case to a folder called Customers).
I haven't done it for a while but my memory says we can do something in the web.config file to specify folder access and then maybe once a day you go into the page (can't remember the name but it is the hammer and world icon furthest to the right under Solution Explorer) and you look at people who are registered and you give them approvals there (I'm pretty sure this can also be done programmatically.) Are you working on a "local machine" like a laptop or a desktop, or are you working on server (like a server at work or a commercial web site provider)?
OK, this new example might have even more files to copy but, hey, we're ready to gamble that it will be worth it, right? (and the gamble is that another person coming here for the original question is going to want to go down this same path).
Also, when you reply post, keep telling me what you would like. It helps to have several things because I'll start with what I know right away and then I'll work on what I need to learn while doing the rest (I'll also have a long page that has all the files and I'll update it periodically until all are finished).
-Larry