none
Very very urgent. How to validate the login credentials? RRS feed

  • Question


  • Hai..

    Currently I am developing a Exchange server task using vb.net and my task is only run in client side machine. In my task  I have create a login page form. The client to give the valid Exchange server admin credentials. In my lab I have Exchange server 2003, 2007, 2010 and all are available in separate domains(Windows server 2003). My task working all Exchange servers. Now how can I validate the login credentials in my task. Please help me.

    By

    A Path Finder..

    Jo Swa..
     

    Sunday, January 30, 2011 5:32 PM

Answers

  • Well, the Exchange version is not relevant for validating credentials.  All you can do is try the LDAP query for the domain and user and password, and see if it succeeds without error.  Maybe you are more interested in permissions, which is something you'd have to check after validating the credentials?  Validating is just making sure that you have a valid domain/user/password combination - it isn't in itself concerned with permissions once we have decided that the combination is valid.

    Regarding the LDAP example above - do you know how to implement it?  Since you are posting in the Development forum, I am assuming that you know how to create some code once you are pointed in the right direction.


    Outlook Web Access For PDA , OWA For WAP
    www.owa-pda.com
    email a@t leederbyshire d.0.t c.0.m
    Friday, February 4, 2011 2:04 PM

All replies

  • Hi Jo,

     

    You can perform authentication via multiple ways

     

     

    ExchangeService service = new ExchangeService();
    
    // You can use any one of methods below
    ´
    service.Credentials = new WebCredentials("username", "password", "domain");
     
    // or
     
    service.Credentials = CredentialCache.DefaultNetworkCredentials;
    service.PreAuthenticate = true; ;
     
    
    // or 
    service.Credentials = new NetworkCredential("user", "pass", "domain");

    You can also mention, the version of Exchange Server you are going to interact with using Versioning EWS Requests

     

     

     

    Sunday, January 30, 2011 7:04 PM
  • Thanks Falak..

    But In my task I feel the login validation is via directory acces or  WMI is suitable.

     So please help me.. How can I perform via WMI or LDAP?

    Please help and reply me.

    By

    A Path Finder...

    Jo Swa.

    Monday, January 31, 2011 4:49 AM
  • MS don't recommend it, but if you want to use LDAP, try an authenticated Opendsobject:

    http://msdn.microsoft.com/en-us/library/aa706065(VS.85).aspx

    A major problem, though, is that it's hard to work out the reason for any logon failure.  Also, look at the link a quarter of the way down the page.


    Outlook Web Access For PDA , OWA For WAP
    www.owa-pda.com
    email a@t leederbyshire d.0.t c.0.m
    Monday, January 31, 2011 3:48 PM
  • Thanks for your reply. I need to validate all type of exchange severs. like Ex-2000, 2003, 2007 sp1,sp2, 2010 service packs. when I use webManaged api how can I validate all type of Exchange servers..?

     Please help me..

     I want to create a login page..

    By

    A Path finder..

    Jo Swa..

    Monday, January 31, 2011 4:50 PM
  • I think you said you wanted to use WMI or LDAP?  The Managed API won't help you with these at all.  Also, Managed API won't do anything with E2000 or E2003.
    Outlook Web Access For PDA , OWA For WAP
    www.owa-pda.com
    email a@t leederbyshire d.0.t c.0.m
    Tuesday, February 1, 2011 1:34 PM
  • yes. I know EWS webManagedAPi dont do these operations. Thats why I mentioned LDAP or WMI. SO how can I validate the login credentials. Please help me.. By A Path Finder.. Jo Swa..
    Tuesday, February 1, 2011 4:47 PM
  • Well, I don't know about WMI.  I don't imagine that you could use that for validating credentials.  We're left with LDAP, and the link I gave yuo in an earlier post:

    http://msdn.microsoft.com/en-us/library/aa706065(VS.85).aspx

    if you use the code from that page

    Set dso = GetObject("LDAP:")
    Set obj1 = dso.OpenDSObject( _
        "LDAP://DC=yourdomain,DC=com", _
        szUsername, _
        szPassword, _
        0)

    You will get an error if the credentials are not valid.  But MS say that it is not a good idea to use OpenDSObject for this.  It has always worked for me, though, and the alternatives seem like very hard work:

    http://support.microsoft.com/kb/180548


    Outlook Web Access For PDA , OWA For WAP
    www.owa-pda.com
    email a@t leederbyshire d.0.t c.0.m
    Wednesday, February 2, 2011 2:09 PM
  • Thanks Lee

    I have Explanied my situtation Now. I have creating  Exchange server related task. My tak performing different operations for different versions. The user select the Exchange version first second the user give the credentials like domain name, Machine name, Username and password. The user can run my task in their own machine not Exchange server machine. In  my lab have more than 50 servers mostly windows servers 2003 and 2008.some servers only have the Exchange server 2003,2007 and 2010. all the machine have connected via network(local network). 

    for Exchample

    Serevr1
    server2
    server3(have Exchange 2007)
    server4
    server5
    server6(have Exchange server2010)
    server7
    server8
    server9
    server10(Exchange server 2003)
    server11
    server12
    etc..

    My problem, Supose the user want to perform the Exchange server 2010 operations. So they can select exchange server 2010  after the user can give the  server 12 domainName,MachineName.Username, password (OR)  Server10 credentials. All the machine is are available in network.

    Here how can I validate? Please help me.. method is not a problem. that means WMI or LDPA or etc.. I need validate whether the given credentials have the selected Exchange servver version or not?

    Please help me and reply me...

    By

    A Path Finder

    Jo Swa...

    Thursday, February 3, 2011 5:45 PM
  • Well, the Exchange version is not relevant for validating credentials.  All you can do is try the LDAP query for the domain and user and password, and see if it succeeds without error.  Maybe you are more interested in permissions, which is something you'd have to check after validating the credentials?  Validating is just making sure that you have a valid domain/user/password combination - it isn't in itself concerned with permissions once we have decided that the combination is valid.

    Regarding the LDAP example above - do you know how to implement it?  Since you are posting in the Development forum, I am assuming that you know how to create some code once you are pointed in the right direction.


    Outlook Web Access For PDA , OWA For WAP
    www.owa-pda.com
    email a@t leederbyshire d.0.t c.0.m
    Friday, February 4, 2011 2:04 PM