What are different authentication types. How do you
retrieve user id in case of windows authentication?

Answer Posted / shilpa

to retrieve user id in case of windows authentication

if from a ASP.Net page following code

Dim username As String
username = User.Identity.Name

if it is from a class or business object following code

Dim User As System.Security.Principal.IPrincipal
User = System.Web.HttpContext.Current.User

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you pause a timer control?

635


What is form description?

514


Is form action required?

513


What is the use of play() playlooping() functions?

624


Explain how to add resources during runtime?

607






Which of the following position is the default docking position of the statusstrip control on the form?

580


Which window allows viewing the resources of the servers, such as services, processes and the event log?

591


What are the components of gui for windows?

517


To which namespace does the control class belong?

529


Suppose I have two combobox .. And I have some items in both combobox now I need to check the item in both combobox if same item is present in both combobox I need to display that item in message box?

578


What is the use of runworkasync() methods?

577


Which template creates a .net compact framework 2.0 forms application for pocket pc 2003 and later?

561


What is form and its types?

531


What are the forms of database?

525


How to create a set up in vb.net for desktop application please say steps with examples?

529