Microsoft Content Management Server - Active Directory and CMS returning user properties

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > September 2005 > Active Directory and CMS returning user properties





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Active Directory and CMS returning user properties
Chandima

2005-09-21, 2:49 am

Hi There

Our team is working on the company intranet, using ASP.NET and MCMS. Within
the intranet, we are attempting to use Active Directory to return user
attributes (such as email) for a given Windows account name.

However, we cannot authenticate to Active Directory from within the CMS
context as IIS is presenting the demand as "machinename\ASPNET", instead of
"domain\user".

I have created two projects within the same IIS virtual directory (e.g. with
the same Directory Security settings). One is a normal Web application, the
other is a CMS Web application. I'm running the following code in both:

Response.Write(HttpContext.Current.User.Identity.Name + "<br>");

Response.Write(WindowsIdentity.GetCurrent().Name + "<br>");

Response.Write(Thread.CurrentPrincipal.Identity.Name + "<br>");

The web app prints this:

<domainname>\<myname>
<domainname>\<myname>
<domainname>\<myname>

The CMS web app prints this:

<domainname>\<myname>
<machinename>\ASPNET
<domainname>\<myname>

What do we need to get IIS to authenticate to Active Directory using
Integrated Windows security from within a CMS context?

--
Regards
Chandima
++++++++++++++++++++++++
http://www.digitalmelon.com/


Stefan [MSFT]

2005-09-21, 2:49 am

Hi Chandima,

an MCMS project is just another ASP.NET project.
But I assume that you set impersonate = true for the ASP.NET project where
it works.

If not: please follow up on an ASP.NET related newsgroup as this is not a
MCMS related topic.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"Chandima" <digitalmelon@gmail.com> wrote in message
news:%23iiX9ymvFHA.3152@TK2MSFTNGP12.phx.gbl...
> Hi There
>
> Our team is working on the company intranet, using ASP.NET and MCMS.
> Within the intranet, we are attempting to use Active Directory to return
> user attributes (such as email) for a given Windows account name.
>
> However, we cannot authenticate to Active Directory from within the CMS
> context as IIS is presenting the demand as "machinename\ASPNET", instead
> of "domain\user".
>
> I have created two projects within the same IIS virtual directory (e.g.
> with the same Directory Security settings). One is a normal Web
> application, the other is a CMS Web application. I'm running the
> following code in both:
>
> Response.Write(HttpContext.Current.User.Identity.Name + "<br>");
>
> Response.Write(WindowsIdentity.GetCurrent().Name + "<br>");
>
> Response.Write(Thread.CurrentPrincipal.Identity.Name + "<br>");
>
> The web app prints this:
>
> <domainname>\<myname>
> <domainname>\<myname>
> <domainname>\<myname>
>
> The CMS web app prints this:
>
> <domainname>\<myname>
> <machinename>\ASPNET
> <domainname>\<myname>
>
> What do we need to get IIS to authenticate to Active Directory using
> Integrated Windows security from within a CMS context?
>
> --
> Regards
> Chandima
> ++++++++++++++++++++++++
> http://www.digitalmelon.com/
>



Chandima

2005-09-21, 7:48 am

Hi Stefan

Thanks for your reply, just to clarify what we are trying to do...

What we are trying to get is a posting authors email and user name to be
displayed along with a link to a Posting on a Datagrid as a summary list of
postings for a particular channel.

The idea is to pass the users winnt\\domain\username which MCMS displays and
Search AD for the display name and email as described on your post:

http://blogs.technet.com/stefan_gos...2/21/44902.aspx

However I can get this to work in a normal web app but not in MCMS context
as described in my post. Have i missed something really obvious here? I will
check the web.config to see if Identity impersonate has been set to true.

cheers

Chandima


"Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
news:uoovTnnvFHA.464@TK2MSFTNGP15.phx.gbl...
> Hi Chandima,
>
> an MCMS project is just another ASP.NET project.
> But I assume that you set impersonate = true for the ASP.NET project where
> it works.
>
> If not: please follow up on an ASP.NET related newsgroup as this is not a
> MCMS related topic.
>
> Cheers,
> Stefan
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> New to MCMS?
> Check out this book: Building Websites Using MCMS:
> http://tinyurl.com/6zj44
> ----------------------
>
>
> "Chandima" <digitalmelon@gmail.com> wrote in message
> news:%23iiX9ymvFHA.3152@TK2MSFTNGP12.phx.gbl...
>
>



Stefan [MSFT]

2005-09-21, 7:48 am

Hi Chandima,

this code works fine on my boxes with MCMS.
No idea what the differences are in your environment.

Again: this is not a MCMS related topic. Please post to an AD or ASP.NET
related newsgroup.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"Chandima" <chandima.k@xtra.co.nz> wrote in message
news:uRlV1BpvFHA.3500@TK2MSFTNGP09.phx.gbl...
> Hi Stefan
>
> Thanks for your reply, just to clarify what we are trying to do...
>
> What we are trying to get is a posting authors email and user name to be
> displayed along with a link to a Posting on a Datagrid as a summary list
> of postings for a particular channel.
>
> The idea is to pass the users winnt\\domain\username which MCMS displays
> and Search AD for the display name and email as described on your post:
>
> http://blogs.technet.com/stefan_gos...2/21/44902.aspx
>
> However I can get this to work in a normal web app but not in MCMS context
> as described in my post. Have i missed something really obvious here? I
> will check the web.config to see if Identity impersonate has been set to
> true.
>
> cheers
>
> Chandima
>
>
> "Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
> news:uoovTnnvFHA.464@TK2MSFTNGP15.phx.gbl...
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com