Checking if connected to a specific Domain - InfoPath Dev
in

InfoPath Dev

Checking if connected to a specific Domain

Last post 02-09-2006 10:55 AM by Agni Jonnalagadda. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 02-08-2006 10:09 PM

    • rjohnson
    • Top 500 Contributor
    • Joined on 09-01-2005
    • Australia
    • Posts 28

    Checking if connected to a specific Domain

    Is there a way in InfoPath to check if you are connected to a given domain.

    I know that there is a way to get a true/false value if a given user is specified.
    I also know that there is a way to get if the member is part of a certain group within the domain.
    However, I have not figured out a way to check if the user is part of a given domain.

    I have tried to check if the member is part of a certain group, but I haven't found a group containing all members. So instead, I wanted to know if I could do a check on the domain rather than the group.

    Any help would be appreciated.

    - Reg
  • 02-09-2006 01:44 AM In reply to

    Re: Checking if connected to a specific Domain

    Hi Reg,
    "System.Environment.UserDomainName" will give you the domain name. But this line of code requires your form to be full trust.

    Other way is to use a Webservice which gives you the Domain name and GroupName also.
    There is one active directory webservice tool out on this site if you want
    http://www.infopathdev.com/webstore/detail.aspx?itemid=18

    Agni
    InfoPath Dev India
  • 02-09-2006 02:56 AM In reply to

    • rjohnson
    • Top 500 Contributor
    • Joined on 09-01-2005
    • Australia
    • Posts 28

    Re: Checking if connected to a specific Domain

    Thanks for the reply Agni,

    however I wanted to get the domain without going through a webservice (Which I believe requires security Level 2), or requiring the form to be fully trusted.

    I thought there may have been a way, like there is for:
    * User.IsCurrentUser
    * User.IsUserMemberOf
    which both can be run on Security Level 0.

    However, I thank you for your swift reply.
  • 02-09-2006 08:44 AM In reply to

    Re: Checking if connected to a specific Domain

    For more information on security levels, check out this page:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ipsdk/html/ipsdkEmailDeployment_HV01120502.asp

    Restricted = Level 1
    Domain = Level 2
    Full Trust = Level 3

    I'm know that you can access Web Services without full trust, and I'm 98% certain that the active directory solution posted by Agni does not require Full Trust.

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 02-09-2006 10:55 AM In reply to

    Re: Checking if connected to a specific Domain

    I am 100% sure that, Web Service does not require full trust if you take a data connection to it in InfoPath.


    Agni
    InfoPath Dev India
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.