Tips and Tricks in a world of Mix

Posts tagged ‘User’

HttpContext.Current.User.Identity.Name is Empty

OS: windows 7 x64 bit

IIS: 7.5

run –> inetmgr –> click your website –> enter in features view Authentication –>

 

image

 

Enable Windows Authentication

Disable Anonymous Authentication

image

Pay attention that you did this definitions on your website specificly!!

Another solution is to add to web.config in the system.web section:

<authentication mode="Windows" />

<authorization>
   <deny users="?"/>
</authorization>

 

Now you”l get your Identity back!

 

(if you don’t have the right Authentication options then :

Turn Windows features on or off

image

image

 

image

Turn Windows features on or off  –> IIS –> WWWS –> Security –> Basic, Digest and Windows.

 

At the end restart your machine for the changes to take effect.

Now do the beginning of the post. )

Advertisements

Tag Cloud

%d bloggers like this: