The project is a default ASP.net Website built in vs 2010. I am new to asp.net and was just experimenting with the master page to only show a menu when logged in.
I have the following in the master page.
[Code]....
The AnonymousTemplate works fine. However when I log into my user the entire menu disappears. I have searched the web and the results were to look at my web config auth tag which looks like this.
I having problem in display the username after a user logged in.This is my master page which has label which named Label1 on top right, i want to display the username on there after logged in.
I have a database called TASKMASTER which holds task related details of all employees and which has a primary key TASK-ID.I also have a table called called employeemaster which holds employee records and which contains username and password as well as the primary key employeeid.employee ID is a foreign key in taskmaster.
Now when i log-in with my username and password it should direct me to a page which shows only tasks assigned to that employee who has logged in...i am using gridview for displaying task records....how do i implement this?
this is basically to show a welcome message [welcome user]on the index page after login in as a registered user of my site. i can achieve this with session but i really want to see this work. i read it in a book. it is not working as i want instead it is displaying my pc's name, instead of showing welcome for the current loggrd in user. put into consideraton that i programmatically created my login controls, my database on sqlserver myself, without asp.net custom login controls.
//this is the label that shows the welcome text {welcomeLbl.Text = "you are welcome, "; //user.identity.name+"."; this is suppose to display the name of the current logged in user welcomeLbl.Text += User.Identity.Name + ".";}
i want to access loginname of login view control for some other reason also i tried something like this but not working
My design time code is
[Code]....
and at code behind i tried this normally by string nm= LoginName1.Text ; LoginView1.Findcontrols("LoginName1"), using the LoginView1.Controls[0]. controls collection... (this get only controls from the anonymoustemplate)LoginView1_ViewChanged also doesent work because since the change in 2005 (or sth) logging in doesn't trigger this event (didn't try it, just read that it doesn't :)) but not able to access the value of loginname1.
In my Membership.aspx, I added a LoginView control. Then on the LoggedInTemplate, I typed "You are Logged in. Welcome," and a LoginName control. After testing from ASP.NET Development server and IIS server, now my LoggedInTemplate showed "You are Logged in. Welcome," several times before displayed only one LoginName/UserName. Why? Something wrong when testing in the ASP.NET Development environment or IIS server configuration?
I have issues when developing under Visual Studio 2010 and getting the favicon.ico to display. I have used favicons in production sites (sites running on Windows Server 2008, for example) and have no issues. But when I try to get it to display when testing new code under Visual Studio 2010, then I have difficulties getting it to display. Then sometimes it will display just fine with no assistance (see next paragraph). Before anyone says it...Yes, I have a file in the root directory called "favicon.ico". No, it will not display (in certain projects) when the site is run under VS2010...UNLESS I TREAT THE URL IN THE BROWSER THE SAME AS WHEN RUNNING UNDER FIDDLER2. That is to say, it will only work if I add a period character (.) in the url after the "localhost" entry [URL]. This url will cause the favicon to display every time. If I leave out the period (.), then the favion will not display -- and Fiddler2 will also not display the activity when the page is displayed/refreshed. As I said, this is a sporadic issue. I have some projects where the favicon displays fine. Then I have others where it does not...unless I put the period in the url after the locahost word. Can someone explain to me why:
(a) The period is required in the url to get Fiddler2 to "catch" the activity;
(b) Why does this same phenomenon affect the favicon as well; and,
(C) Why do some projects display the favicon fine when run under VS2010 WITHOUT the period being added?
I just do not understand what the period character in the url string is actually causing to happen and why it doesn't happen when it's missing.
How to keep displaying report filters while displaying the report in CrystalReportViewer.I have a web part that which uses CrystalReportViewer to display the report data. I want to keep displaying the Report parameters (filters) as I rendered the report content.
ASP.Net Page layout is not displaying properly in QA machine but is displaying correctly in Dev Machine. What could be the issue? We are using ASP.Net 2.0
I've set up a page where create logins with createuserwizard. I can login with created account but I get logged out after like 20min if I dont do anything (reload etc). How can I remove this timeframe? I dont want a timeframe at all, i want to stay logged in until i close the browser.
I have a Asp Mvc 2 site using forms authentication. When I run it locally I can log in and stay logged in indefinitely.
However when I put it on the server I seem to only stay logged in for a few minutes and then seems to be logged out. I have looked at the cookies and there are 2 which seem relevant:
.ASPXAUTH which is a session cookie .ASPXANONYMOUS which expires in 3 months.
When I refresh the page the cookies stay the same until I get logged out, when I seem to get a new .ASPXANONYMOUS cookie, but the .ASPXAUTH seems to be the same. It seems that I might be able to stay logged in until I do something after a certain amount of time. If I submit a form as soon as I am logged in then it works ok, but if I keep submitting data again and again then after a minute or so, one of the submits will happen as a logged out user and not as the user who was logged in, which all the other submits worked as. What might cause this behaviour and how can I track down what is different & change it so that I can stay logged in indefinitely?
its a single server, but after some more investigation and searching the likely candidate seems to be that I am using more than 100mb on the server and the application pool is getting recycled. I suppose now i need to know How can I check how much memory I'm using. What advice there is to reduce that.
We have got two distinct lists of users that we need to power logged in access to sections of our site. These lists can't be combined, as one is synced daily to an externally hosted data source, and both tables have to be 100% the same. We have set up two Membership providers onto the site, but my question is, is it possible to allow both to be logged in at the same time?
The issue I find is that HttpContext.Current.User.identity.name contains the username of the last successful logon.
I was trying to incorporate a functionality in my ASP.NET such that a DIV tag which contains the Profile Navigation Menu should only be visible if a person is logged in. I know the condition on how to if the person is logged in or not but wanted to know the method to toggle the div tag on/off based on person's logged in status.
Our users are only only allowed to log into our site from one location at a time. If they attempt to login from a second location, how do I log them out of the first location?
I have tried so many ways but failed to logged in purevolume.com programatically!!![URL]can anybody give it a try and provide sample code to achieve this.
I have a controller that gets data based on current user that is logged in. And I would like to assign a local variable like this:
[Code]....
Somehow I cant get the value for current user logged in. How should I fix this? I need to use that "CustomerID" in lots of places in my controllerclass.
I am using Microsoft visual basic 2010 for a asp.net site using c#.
I am using the asp.net configuration for user registration. I have a comments form which I want to appear only if a user is logged in.
I now there is a toolbox helper thing called Login View which does exactly what I want but as soon as I put a form inside the code won't compile because it cannot find the textbox fields.
I created my own register system with my own register form together with the asp.net login control
the user register and the data is sent to my custom table and I used a method that check if the user exists in my table and the asp.net login control display the correct result "if exists or not"
everything appears to work correctly but I cannot access pages that deny anonymous users with the configuration file.