How Does IIS Persist A User's Identity From Page To Page In An Application

May 28, 2010

Web pages are, by nature, state-less objects. When you click from page to page in an ASP.net application, each request for a page is treated as a brand-new request. We use things like cookies, session-variables, and query strings to maintain state from page to page.

When you log in to an ASP.net web application using Windows Authentication, how does IIS persist your identity between pages?

View 3 Replies


Similar Messages:

Security :: Using Page.User.Identity.Name To Fetch User Information From A MsSQL Database?

Dec 23, 2010

I have implemented Forms authentication in an ASP.NET MVC 2 website

By using <%: Page.User.Identity.Name %> on the Site.Master page I can display the userid of the logged in user.

I would like to use this value and display other information about the user that is stored in a User table in a MsSQL database, like:

<%: GetFirstname(Page.User.Identity.Name) %>

View 2 Replies

Security :: Isolating The User Name In Page.User.Identity.Name?

Mar 4, 2010

Is there a simple way to just retrieve the user's name, and not the Domain name, when using this function:

string quizTaker = Page.User.Identity.Name.ToString();

Right now it returns "DOMAIN_NAMEUserName"

I would like to just use isolate and use the user's name, without the Domain name.

View 2 Replies

C# - Accessing User.Identity From Master Page?

Jan 11, 2011

I'm trying to access User.Identity from my master page so I can figure out which user is logged in, however I can't get it to work. If I import System.Security.Principal in my master page it makes no difference:

<%@ Import Namespace="System.Security.Principal" %>

I can access it fine if I try within a Controller.

View 3 Replies

Iis 7.5 Dns Windows Authentication Page User Identity Not Working?

Feb 7, 2011

In IIS 7.5 server I have a website apps.mydomain.com. Site binding for this website is:

IP: All Unassigned

Port: 80

Host name: apps.mydomain.com

In DNS there is an ip address pointing to apps.mydomain.com. Site comes up fine when browsing to this hostname.

I want to get current windows logged in username from asp.net web apps. I enabled windows authentication and disabled anonymous. Using this ASP.Net code to test:

Response.Write(Page.User.Identity.Name);

However, browsing to http://apps.mydomain.com/site/ the application pool identity shows as the Page.User.Identity.Name value and not the current windows logged in username.

If I browse to http://servername/site/ then Page.User.Identity.Name will return current windows logged in username.

Is there something else I need to configure to get the current windows logged in username when using host header?

web.config:
<?xml version="1.0"?>
<configuration>
<system.web>
<authentication mode="Windows"/>
</system.web>
</configuration>

App pool config (left out "handlers" for brevity, there's a 30000 char limit):

[Code]....

View 2 Replies

Web Forms :: Accessing User Identity From Master Page?

Jan 23, 2010

When I use a Master Page with a Content Page, in the Content Page script I find that User object is defined, with Identity and IsInRole properties. However, when I enter script on the Master Page itself User comes up as "not declared".

I am guessing that User is embedded in some namespace that is automatically imported to Content pages, but haven't been able to track it down.

View 1 Replies

Security :: User Identity. Name Is Blank On Page Load?

Jul 29, 2010

I have an aspx page which displays a user's details in a Label. It takes their User.Identity.Name and queries Active Directory using the following code:

[Code]....

View 1 Replies

State Management :: Page.User.Identity.Name Not Set When Authenticated?

Mar 21, 2011

In this code Page.User.Identity.Name is null

[Code]....

I thought the Name always was set when user was Authenticated?

If this is not the case, how should I do instead?

View 10 Replies

C# - Differences Between Page.User.Identity Versus Request.LogonUserIdentity

Feb 2, 2010

What are the differences (behind the scenes) between Page.User.Identity and Request.LogonUserIdentity? Not the differences in type, name, etc but the differences in how they're implemented behind the scenes (i.e. one calls windows xxx api and the other calls asp.net xxx api...).

View 1 Replies

Web Forms :: Sequence Order For Page.IsPostBack And User.Identity.IsAuthenticated?

Apr 22, 2010

What is the best sequence order for Page.IsPostBack and User.Identity.IsAuthenticated? From what I have search for, this comes up most common:

If Not Page.IsPostBack Then
If User.Identity.IsAuthenticated Then
~Some kind of code~
End If
End If

Is this considered "best practice" or can the two items - Page.IsPostBack and User.Identity.IsAuthenticated -be split into their own sections so the fuctions of these can be independent of each other?I am trying to troubleshoot a placeholder that disappears from a master page when a content page button is pressed to change the content pages active view (I have a multiview w/ 5 views inside of it).

View 2 Replies

Forms Data Controls :: Filter On User.Identity.Name - FormView Disappearing From The Web Page?

Oct 21, 2010

I have a FormView and the SELECT statement I have is as follows:

SelectCommand="SELECT [UserName], [Full_Name_1], [Full_Name_2], [Email], [Address], [City], [State], [Zip_Code], [Home_Phone], [Cell_Phone] FROM [Homeowners] WHERE ([UserName]='<%$ User.Identity.Name %>')"... but it results in the FormView disappearing from the web page. Note: at the top of the page,
<%= user.identity.name %> displays the name fine, so user.identity.name does contain the info I'm looking for.I am trying to figure out how to correctly format the SELECT filter to feed user.identity.name to the SELECT statement as a filter. ... or if there is an alternative way.

View 4 Replies

State Management :: ReNew Life Time Of The Session Of Page.User.Identity.UserId?

Feb 23, 2011

i have Using aspnetmembership

i want to know how i can ReNew The Life Time Of Page.User.Identity.UserId Session, , how i can increase the Time Of this session ??

i want this scenario in case when the user LogOn for 15 minutes , then the page refreshed ,then renew the TimeOut Of Session by adding addtional 15 minutes and so on

note that im using Page.User.Identity.UserId Session

View 2 Replies

Which One Should Use For "anonymous User Identity" - "specific User: IUSR" Or "application Pool Identity"?

Feb 2, 2011

In IIS Manager center pane, there is an icon titled "Authentication" as follows: Clicking the icon, we get 3 items as follows: Right clicking the Anonymous Authentication and select edit, we have: Question: which one should I use? What is the difference?

View 3 Replies

Web Forms :: Get Currently Login Windows User Identity In Application

Jan 4, 2011

I have this web application where I need the currently logged in windows user Identity. I server on which I deployed this application does not support virtual directories. And I am not sure if that server is configured for "Integrated Windows Authentication."

I tried using:
System.Security.Principal.WindowsIdentity.GetCurrent().Name;
Request.ServerVariables["AUTH_USER"];
HttpContext.Current.User.Identity.Name;

All these work and retrieve the appropriate currently logged in windows username when the application isn't deployed. But when I deploy it on this particular server, these methods do not give me nothing.

View 4 Replies

Page.User.Identity.IsAuthenticated Returns Object Reference Not Set To Instance Of Object?

Dec 23, 2010

this works fine on my local site but as soon as i upload the site to my live server i get stem.NullReferenceException: Object reference not set to an instance of an object

on the first line of this:

if (!Page.User.Identity.IsAuthenticated)
{
pnlSignIn.Visible = true;
pnlSignOut.Visible = false;
}

View 1 Replies

How To Persist Page State Across Pages

Mar 24, 2011

I need a way to save and load the Page State in a persistent manner (Session). The Project i need this for is an Intranet Web Application which has several Configuration Pages and some of them need a Confirmation if they are about to be saved. The Confirmation Page has to be a seperate Page. The use of JavaScript is not possible due to limitations i am bound to. This is what i could come up with so far:

[code]....

I can't seem to find a way to load the Page State after being redirected from the Confirmation.aspx to the PageToConfirm.aspx.

View 1 Replies

MVC :: Persist Viewdata That Changes In The Master Page?

Dec 21, 2010

I have a nested master page with radio button controls and one or two dropdowns (depending on the radio button chosen). The dropdown(s) contains either carriers or our customers. If the dropdown type is customer, we display another dropdown to determine what type of customer (current, former, or test). Once a carrier or customer is chosen, an action is called to "set" the customer information in the session. This all works great. The problem is trying to persist the dropdown type, customer type, and customer or carrier chosen over each action/view. Once a customer or carrier is set, the user can chose different menu options (also on the master page) to perform different tasks against the customer or carrier data. I am still fairly new to asp.net mvc and to jquery and ajax. I have racked my brain and tried several different scenarios to get this to work. I tried a master view model which got inherited by the other view models. I couldn't get that to work. Now I am trying a base controller and just setting things in viewdata, but I still can't get it to work once I move to next controller/action/view. Can someone please let me know the best practice for doing this? And or tell me where I'm going wrong? I am at a pretty critical point in this project and am running out of time. The code follows:

Global.asax:

[Code]....

Site.Master:
[Code]....

View 4 Replies

State Management :: How To Persist A Class Object When Page PostBack

Oct 5, 2010

i have created a user control UserControl.ascx, in Code behind file of UserControl.ascx i have created an object of a class MyClass.cs,

Like

if(!Page.IsPostback) {
objMyClass= new MyClass();
}

but when i click on button of UserControl.ascx page and try to access objMyClass object then it set as null, so how to persist MyClass object when page PostBack, i wanted to keep object persist till the user access the page, when user goes out of this page then object should distroy?

[code].....

View 9 Replies

Make Telerik TabStrip Tabs Persist Between Page Requests

Aug 27, 2010

in Telerik ASP.NET MVC TabStrip, I want the page to remember which tab was selected last and persist the selection through multiple page requests.

What I have is a partial view that shows in multiple pages and it contains the TabStrip. With SelectedIndex the set tab always get selected, which nullifies user's selection.

View 1 Replies

State Management :: How To Make A Custom Property Or A Page Persist Across Postback

Sep 29, 2010

I have an object to hold some specific state information in my web application - I pass it back & forward between pages by making it a property of a basepage which works fine, but I lose it on postback.

Is there any way to persist this property without manually adding & reading it again from viewstate?

View 3 Replies

Page Life Cycle Sequence Between Master Page And Child Page And User Control?

Jun 4, 2010

I want to share a common page load and page init events sequence between Master page and child page and User Control as described below:

Let us have the following components:-

1. TestMaster.master -> It is the master page

2. TestChild.aspx -> It is the Child page

3. TestUserContrl.ascx -> It is the UserControl present within the TestMaster.master page.
[code]...

View 6 Replies

Forms Data Controls :: Web Application To Go To User's Error Page

Mar 6, 2010

I can't catch what error is causing my web app to go to the user's error page when I use Profile.Save. I use the following code and nothing is caught:

[Code]....

Any ideas on why this doesn't catch the error, or where the error might be coming from?

View 5 Replies

User Controls :: How To Redirect To Login Page If User Directly Visits Page In MVC

Jun 11, 2013

i am developing one application in mvc my problem is after login it will redirect to some page if i copy url and paste it in another browser its showing error in application but i need to display home page? 

how to solve this ?

View 1 Replies

Users Identity Is Verified At The Page Load?

Mar 8, 2010

In my web application, an users identity is verified at the page load using his n/w credentials.Now i have this 'Adding Attachment' functionality which us creating the problem. I have to store the file in a different server which have access to only one userid. I guess i hv to impersonate the cuurent user with the other user id for this functionality alone

View 11 Replies

Css - Modifying App's Global Visual Identity Without A Master Page?

Nov 23, 2010

I've to fix an old ASP.NET application's appearance so that it can conform to the new web visual identity of my organization. The old application does not have any master page and uses a very basic .include file. Modifying the .include header does not change the overall look of the app's pages much, and I still have to manually import new css definitions, replace the table tags with divs on the 60 odd .aspx pages.How should I proceed? I have long term maintainability in mind, so a master page is the obvious solution.

View 1 Replies







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