|
| DLL Sites and LDAP / Active Directory |
 |
Thu, 3 Apr 2008 17:06:10 +0000 |
I have a website that gets the user identity via LDAP, as such:
Me.User.Identity.Name
It works fine when the website is the usual aspx page with accompanying aspx.vb
class. However, when I publish the website (into a DLL) it comes up empty. How
do I set things up so that the website in DLL form will be able to get the user
identity?
|
| Post Reply
|
| Re: DLL Sites and LDAP / Active Directory |
 |
Thu, 3 Apr 2008 17:22:19 +0000 |
Are you saying that it works in Visual Studio but not in IIS? With Visual
Studio the application will run under your credentials. With IIS it depends on
the type of authentication that is being used. What kind of authentication are
you using in IIS?
Here is an article that might help:
http://www.communitycoder.com/archive/2008/02/09/asp.net-security-context.aspx
|
| Post Reply
|
| Re: DLL Sites and LDAP / Active Directory |
 |
Thu, 3 Apr 2008 21:38:40 +0000 |
The web server that comes with Visual Studio run's as your credentials and that
is why it works loally but not at the web site. You need to tell ASP.NET to
force integrated security by denying all anonymous users. To do this simply add
the following to your web.config file: <authorization>
<denyusers="?"/>
</authorization>
Hope that helps.
|
| Post Reply
|
|
|
|
|
|
|
|
|
|