I want to develop a webapplication where the user can login automaticly with the data from the active directory or logout to get a form where the user can enter other user data to login as another user.
I set in the web.config the
<authentication mode="Windows"/>
<authorization>
<deny users="?" />
</authorization>
But then I am always loged in. How can I log out and open a simple form to enter user data of another user?
You can’t logout with Windows authentication, that’s the whole idea of this type of authentication: you log into Windows and from now on it is a Single Sign On. You will need to open the browser under another user.
If you want to enable this functionality you could use forms authentication against AD with impersonation.