|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Is there a function that I can call to validate a domain?Hi, I'm using vs2005 and C#. In my application I am allowing the user to
enter a string representing a domain that they would like the appl to connect to and build a TreeView control based on AD objects in the domain that they entered. Is there a function that I can call to validate the string that the user entered is a valid domain? -- Thanks. How about the static Domain.GetDomain method in
System.DirectoryServices.ActiveDirectory? That function takes a DirectoryContext which could contain alternate credentials, so it would be up to you to decide whether you want to rely on the current security context or prompt the user for different creds. Joe K. -- Show quoteHide quoteJoe Kaplan-MS MVP Directory Services Programming Co-author of "The .NET Developer's Guide to Directory Services Programming" http://www.directoryprogramming.net -- "Pucca" <Pu***@discussions.microsoft.com> wrote in message news:4586630D-B47D-466F-AD8B-0D32690F7BD6@microsoft.com... > Hi, I'm using vs2005 and C#. In my application I am allowing the user to > enter a string representing a domain that they would like the appl to > connect > to and build a TreeView control based on AD objects in the domain that > they > entered. Is there a function that I can call to validate the string that > the > user entered is a valid domain? > > -- > Thanks. Thanks Joe. I use that and it does the job but it's kind of slow. I
remember calling some function in my other C++ program, ext property page, that verifies the domain for me. I guess we don't have one like that in .net but it does the job for now. Thank you. -- Show quoteHide quoteThanks. "Joe Kaplan" wrote: > How about the static Domain.GetDomain method in > System.DirectoryServices.ActiveDirectory? That function takes a > DirectoryContext which could contain alternate credentials, so it would be > up to you to decide whether you want to rely on the current security context > or prompt the user for different creds. > > Joe K. > > -- > Joe Kaplan-MS MVP Directory Services Programming > Co-author of "The .NET Developer's Guide to Directory Services Programming" > http://www.directoryprogramming.net > -- > "Pucca" <Pu***@discussions.microsoft.com> wrote in message > news:4586630D-B47D-466F-AD8B-0D32690F7BD6@microsoft.com... > > Hi, I'm using vs2005 and C#. In my application I am allowing the user to > > enter a string representing a domain that they would like the appl to > > connect > > to and build a TreeView control based on AD objects in the domain that > > they > > entered. Is there a function that I can call to validate the string that > > the > > user entered is a valid domain? > > > > -- > > Thanks. > > > That's the only function built in to the framework as of now. You could
always p/invoke the Win32 function if you wanted to. Joe K. -- Show quoteHide quoteJoe Kaplan-MS MVP Directory Services Programming Co-author of "The .NET Developer's Guide to Directory Services Programming" http://www.directoryprogramming.net -- "Pucca" <Pu***@discussions.microsoft.com> wrote in message news:DC0C84EE-1EF3-4FB6-B835-7115B687BBD3@microsoft.com... > Thanks Joe. I use that and it does the job but it's kind of slow. I > remember calling some function in my other C++ program, ext property page, > that verifies the domain for me. I guess we don't have one like that in > .net > but it does the job for now. Thank you. > -- > Thanks. > > > "Joe Kaplan" wrote: > >> How about the static Domain.GetDomain method in >> System.DirectoryServices.ActiveDirectory? That function takes a >> DirectoryContext which could contain alternate credentials, so it would >> be >> up to you to decide whether you want to rely on the current security >> context >> or prompt the user for different creds. >> >> Joe K. >> >> -- >> Joe Kaplan-MS MVP Directory Services Programming >> Co-author of "The .NET Developer's Guide to Directory Services >> Programming" >> http://www.directoryprogramming.net >> -- >> "Pucca" <Pu***@discussions.microsoft.com> wrote in message >> news:4586630D-B47D-466F-AD8B-0D32690F7BD6@microsoft.com... >> > Hi, I'm using vs2005 and C#. In my application I am allowing the user >> > to >> > enter a string representing a domain that they would like the appl to >> > connect >> > to and build a TreeView control based on AD objects in the domain that >> > they >> > entered. Is there a function that I can call to validate the string >> > that >> > the >> > user entered is a valid domain? >> > >> > -- >> > Thanks. >> >> >> Right. Thank you very much Joe.
-- Show quoteHide quoteThanks. "Joe Kaplan" wrote: > That's the only function built in to the framework as of now. You could > always p/invoke the Win32 function if you wanted to. > > Joe K. > > -- > Joe Kaplan-MS MVP Directory Services Programming > Co-author of "The .NET Developer's Guide to Directory Services Programming" > http://www.directoryprogramming.net > -- > "Pucca" <Pu***@discussions.microsoft.com> wrote in message > news:DC0C84EE-1EF3-4FB6-B835-7115B687BBD3@microsoft.com... > > Thanks Joe. I use that and it does the job but it's kind of slow. I > > remember calling some function in my other C++ program, ext property page, > > that verifies the domain for me. I guess we don't have one like that in > > .net > > but it does the job for now. Thank you. > > -- > > Thanks. > > > > > > "Joe Kaplan" wrote: > > > >> How about the static Domain.GetDomain method in > >> System.DirectoryServices.ActiveDirectory? That function takes a > >> DirectoryContext which could contain alternate credentials, so it would > >> be > >> up to you to decide whether you want to rely on the current security > >> context > >> or prompt the user for different creds. > >> > >> Joe K. > >> > >> -- > >> Joe Kaplan-MS MVP Directory Services Programming > >> Co-author of "The .NET Developer's Guide to Directory Services > >> Programming" > >> http://www.directoryprogramming.net > >> -- > >> "Pucca" <Pu***@discussions.microsoft.com> wrote in message > >> news:4586630D-B47D-466F-AD8B-0D32690F7BD6@microsoft.com... > >> > Hi, I'm using vs2005 and C#. In my application I am allowing the user > >> > to > >> > enter a string representing a domain that they would like the appl to > >> > connect > >> > to and build a TreeView control based on AD objects in the domain that > >> > they > >> > entered. Is there a function that I can call to validate the string > >> > that > >> > the > >> > user entered is a valid domain? > >> > > >> > -- > >> > Thanks. > >> > >> > >> > > >
accessing emails using owa ... traceable?
Unhandled exception vs handled (security issue) System.String vs SecureString Kerberos Token Renewal Forms Authentication with Active Directory, login control crashes Impersonation testing Security Exception Help!! InvalidOperationException in GetProcessesByName!! Can I retrieve Unix box OS info using DirectoryEntry Property OS? Is all .NET assembles are vulnerable to decompilation ? |
|||||||||||||||||||||||