D
David Lozzi
Howdy,
I have an ASP.Net 2.0 web application for which all i need to do is grab the
user's login name. Currently, IIS is configured for anonymous access, which
i need to keep. I tried request.servervariables("LOGON_USER") and
REMOTE_USER, both return nothing. If I disable anonymouse security in IIS it
works and returns my login name.
I have also enabled forms authentication on my application, see below, and i
simply get page cannot be found, which is getting annoying. I don't need to
do anything with AD except get the user name, so using the full membership
class for AD is a little over kill. I am storing all of the user's
permissions for the app in the application using basic session strings. But
i'll do what it takes. Any ideas??
<connectionStrings>
<add name="ADConnectionString"
connectionString="LDAP://delphi.local/CN=Users,DC=delphi,DC=local" />
</connectionStrings>
<authentication mode="Forms">
<forms name=".ADAuthCookie" timeout="30" >
</forms>
</authentication>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
<membership defaultProvider="MyADMembershipProvider">
<providers>
<add name="MyADMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnectionString" connectionUsername="delphi\dlozzi"
connectionPassword="12345"/>
</providers>
</membership>
Thanks!!
David Lozzi
Blog: http://www.lozzi.net
I have an ASP.Net 2.0 web application for which all i need to do is grab the
user's login name. Currently, IIS is configured for anonymous access, which
i need to keep. I tried request.servervariables("LOGON_USER") and
REMOTE_USER, both return nothing. If I disable anonymouse security in IIS it
works and returns my login name.
I have also enabled forms authentication on my application, see below, and i
simply get page cannot be found, which is getting annoying. I don't need to
do anything with AD except get the user name, so using the full membership
class for AD is a little over kill. I am storing all of the user's
permissions for the app in the application using basic session strings. But
i'll do what it takes. Any ideas??
<connectionStrings>
<add name="ADConnectionString"
connectionString="LDAP://delphi.local/CN=Users,DC=delphi,DC=local" />
</connectionStrings>
<authentication mode="Forms">
<forms name=".ADAuthCookie" timeout="30" >
</forms>
</authentication>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
<membership defaultProvider="MyADMembershipProvider">
<providers>
<add name="MyADMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnectionString" connectionUsername="delphi\dlozzi"
connectionPassword="12345"/>
</providers>
</membership>
Thanks!!
David Lozzi
Blog: http://www.lozzi.net