|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
sspi in c#I have been trying to use SSPI in validating user credentials in my winform
applications. I have tried looking around the internet but it doesn't seem that there are any code samples for wrapping sspi in c#. Could someone give me a hand? I have found examples in C++ but i am not familiar with it so I would greatly appreciate if someone would offer help. p.s. I have found examples in VB.net but i am having difficulties in defining the correct datatypes in c#. i have also found a simple solution on work around in sspi using NegotiateStream but that's for framework 2.0 only and i am using framework 1.1 at the moment Why don't you compile the VB.NET version and reverse compile it in
Reflector? That usually works pretty well. The reflector file disassembler plug-in makes it even easier. Joe K. Show quoteHide quote "Vincent" <Vinc***@discussions.microsoft.com> wrote in message news:51D33488-5F89-4E51-BF08-252CA94C0203@microsoft.com... >I have been trying to use SSPI in validating user credentials in my winform > applications. I have tried looking around the internet but it doesn't > seem > that there are any code samples for wrapping sspi in c#. Could someone > give > me a hand? > > I have found examples in C++ but i am not familiar with it so I would > greatly appreciate if someone would offer help. > > p.s. I have found examples in VB.net but i am having difficulties in > defining the correct datatypes in c#. i have also found a simple solution > on > work around in sspi using NegotiateStream but that's for framework 2.0 > only > and i am using framework 1.1 at the moment i cannot do this because i am working for a company which 'does not' allow
VB.Net to be installed. Our VS.Net only have C++ and C# Show quoteHide quote "Joe Kaplan (MVP - ADSI)" wrote: > Why don't you compile the VB.NET version and reverse compile it in > Reflector? That usually works pretty well. The reflector file disassembler > plug-in makes it even easier. > > Joe K. > > > "Vincent" <Vinc***@discussions.microsoft.com> wrote in message > news:51D33488-5F89-4E51-BF08-252CA94C0203@microsoft.com... > >I have been trying to use SSPI in validating user credentials in my winform > > applications. I have tried looking around the internet but it doesn't > > seem > > that there are any code samples for wrapping sspi in c#. Could someone > > give > > me a hand? > > > > I have found examples in C++ but i am not familiar with it so I would > > greatly appreciate if someone would offer help. > > > > p.s. I have found examples in VB.net but i am having difficulties in > > defining the correct datatypes in c#. i have also found a simple solution > > on > > work around in sspi using NegotiateStream but that's for framework 2.0 > > only > > and i am using framework 1.1 at the moment > > > Wow, that's funny. You should still have vbc.exe on your machine so that
you can compile file the command line. The other thing to do would be to follow Dominick's link instead. Joe K. Show quoteHide quote "Vincent" <Vinc***@discussions.microsoft.com> wrote in message news:73400BF8-B112-4FE9-AA8E-D2762B6A2F6F@microsoft.com... >i cannot do this because i am working for a company which 'does not' allow > VB.Net to be installed. Our VS.Net only have C++ and C# > > "Joe Kaplan (MVP - ADSI)" wrote: > >> Why don't you compile the VB.NET version and reverse compile it in >> Reflector? That usually works pretty well. The reflector file >> disassembler >> plug-in makes it even easier. >> >> Joe K. >> >> >> "Vincent" <Vinc***@discussions.microsoft.com> wrote in message >> news:51D33488-5F89-4E51-BF08-252CA94C0203@microsoft.com... >> >I have been trying to use SSPI in validating user credentials in my >> >winform >> > applications. I have tried looking around the internet but it doesn't >> > seem >> > that there are any code samples for wrapping sspi in c#. Could someone >> > give >> > me a hand? >> > >> > I have found examples in C++ but i am not familiar with it so I would >> > greatly appreciate if someone would offer help. >> > >> > p.s. I have found examples in VB.net but i am having difficulties in >> > defining the correct datatypes in c#. i have also found a simple >> > solution >> > on >> > work around in sspi using NegotiateStream but that's for framework 2.0 >> > only >> > and i am using framework 1.1 at the moment >> >> >> Joe,
yeah, that's life. As what you suggested i eventually managed to get the dll compiled from that VB.Net code and disassemble it back to c#, and it works well. Thank you for advice though. Vincent Show quoteHide quote "Joe Kaplan (MVP - ADSI)" wrote: > Wow, that's funny. You should still have vbc.exe on your machine so that > you can compile file the command line. The other thing to do would be to > follow Dominick's link instead. > > Joe K. > > "Vincent" <Vinc***@discussions.microsoft.com> wrote in message > news:73400BF8-B112-4FE9-AA8E-D2762B6A2F6F@microsoft.com... > >i cannot do this because i am working for a company which 'does not' allow > > VB.Net to be installed. Our VS.Net only have C++ and C# > > > > "Joe Kaplan (MVP - ADSI)" wrote: > > > >> Why don't you compile the VB.NET version and reverse compile it in > >> Reflector? That usually works pretty well. The reflector file > >> disassembler > >> plug-in makes it even easier. > >> > >> Joe K. > >> > >> > >> "Vincent" <Vinc***@discussions.microsoft.com> wrote in message > >> news:51D33488-5F89-4E51-BF08-252CA94C0203@microsoft.com... > >> >I have been trying to use SSPI in validating user credentials in my > >> >winform > >> > applications. I have tried looking around the internet but it doesn't > >> > seem > >> > that there are any code samples for wrapping sspi in c#. Could someone > >> > give > >> > me a hand? > >> > > >> > I have found examples in C++ but i am not familiar with it so I would > >> > greatly appreciate if someone would offer help. > >> > > >> > p.s. I have found examples in VB.net but i am having difficulties in > >> > defining the correct datatypes in c#. i have also found a simple > >> > solution > >> > on > >> > work around in sspi using NegotiateStream but that's for framework 2.0 > >> > only > >> > and i am using framework 1.1 at the moment > >> > >> > >> > > > Hello Vincent,
IIRC you can use the SSPI Remoting classes to do the same handshake for validating a credential. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/remsspi.asp --------------------------------------- Dominick Baier - DevelopMentor http://www.leastprivilege.com Show quoteHide quote > I have been trying to use SSPI in validating user credentials in my > winform applications. I have tried looking around the internet but it > doesn't seem that there are any code samples for wrapping sspi in c#. > Could someone give me a hand? > > I have found examples in C++ but i am not familiar with it so I would > greatly appreciate if someone would offer help. > > p.s. I have found examples in VB.net but i am having difficulties in > defining the correct datatypes in c#. i have also found a simple > solution on work around in sspi using NegotiateStream but that's for > framework 2.0 only and i am using framework 1.1 at the moment > hi dominick
I have come across this example, I tried to use the SSPI library provided that but then i found out i cannot use other people's username/password. It enforces me to use my own password and that does not satisfies my purpose of logging in as another user. vincent Show quoteHide quote "Dominick Baier [DevelopMentor]" wrote: > Hello Vincent, > > IIRC you can use the SSPI Remoting classes to do the same handshake for validating > a credential. > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/remsspi.asp > > --------------------------------------- > Dominick Baier - DevelopMentor > http://www.leastprivilege.com > > > I have been trying to use SSPI in validating user credentials in my > > winform applications. I have tried looking around the internet but it > > doesn't seem that there are any code samples for wrapping sspi in c#. > > Could someone give me a hand? > > > > I have found examples in C++ but i am not familiar with it so I would > > greatly appreciate if someone would offer help. > > > > p.s. I have found examples in VB.net but i am having difficulties in > > defining the correct datatypes in c#. i have also found a simple > > solution on work around in sspi using NegotiateStream but that's for > > framework 2.0 only and i am using framework 1.1 at the moment > > > > > >
Form Authentication and new browser instance
System.ExecutionEngineException for certificate object creation Role based security on local machine Web Services and Access Control I keep receiving a file/path access error. CAS and performance NCrypto Encryption & Decryption RE: ADAM, AzMan question CryptoAPI problem IIS Application Pool Identity setting problem |
|||||||||||||||||||||||