.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Kaviya Balasubramanian
Sgraph Infotech
Imran Ghani
Post New Web Links

Too many bad loging attempts?

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :.NET Framework
 

I have the following code to demonstrate the problem:

 private static bool CheckCredentials(string userName, string password)
 {
  bool valid = false;
  using(PrincipalContext context = new PrincipalContext(ContextType.Domain, "DOMAIN"))
  {
  UserPrincipal user = UserPrincipal.FindByIdentity(context,userName);
  Debug.WriteLine(string.Format("{0} has {1} bad password attempts", user.DisplayName, user.BadLogonCount));
  valid = context.ValidateCredentials(userName, password);
  }
  return valid;
 }
 static void Main(string[] args)
 {
  Debug.WriteLine(string.Format("Credentials are {0}", CheckCredentials("user@DOMAIN.COMPANY.COM", "inval


View Complete Post


More Related Resource Links

Wicked Code: Foiling Session Hijacking Attempts

  

Let's face it: every minute of every day, someone, somewhere, is patrolling the Web looking for sites to hack. ASP. NET developers must constantly be on their guard to ensure attempted hacks can't be successful.

Jeff Prosise

MSDN Magazine August 2004


Framework Errors - During Many Install Attempts

  
2.0 SP1 is installed.  However, something is broke.  Trying to install the 3.5 SP1 update or VS2008 SP1, I receive the below errors:[08/26/08,19:44:40] Microsoft .NET Framework 2.0a: [2] Error: Installation failed for component Microsoft .NET Framework 2.0a. MSI returned error code 1603[08/26/08,19:45:48] WapUI: [2] DepCheck indicates Microsoft .NET Framework 2.0a is not installed.[08/26/08,20:04:10] Microsoft .NET Framework 2.0a: [2] Error: Installation failed for component Microsoft .NET Framework 2.0a. MSI returned error code 1603[08/26/08,20:05:14] WapUI: [2] DepCheck indicates Microsoft .NET Framework 2.0a is not installed.[08/27/08,09:56:12] Microsoft .NET Framework 2.0a: [2] Error: Installation failed for component Microsoft .NET Framework 2.0a. MSI returned error code 1603[08/27/08,09:57:32] WapUI: [2] DepCheck indicates Microsoft .NET Framework 2.0a is not installed.[08/27/08,12:16:44] Microsoft .NET Framework 3.0 SP2 x86: [2] Error: Installation failed for component Microsoft .NET Framework 3.0 SP2 x86. MSI returned error code 1603[08/27/08,15:56:17] Microsoft .NET Framework 2.0a: [2] Error: Install package not found: ASPNET.msp[08/27/08,15:56:17] Microsoft .NET Framework 2.0a: [2] Error: No valid install package found for component Microsoft .NET Framework 2.0a[08/27/08,15:56:18] setup.exe: [2] ISetupComponent::Pre/Post/Install() failed in ISetupManager::InternalInst

Did a dumb thing with Sql Server Loging IS / Offline / Single Integrated User / sa disabled [dumb?]

  
Have been using a single database (targetDb) outside of the master with Integrated Security Fairly new installation.... sa login is not enabled (?) Default database for my integrated ID is this "targetDb" And then took targetDb "offline", instead of Detaching during a machine swap process. No I can get in to the server/database, because the IntegratedWindowsLogin cannot login, because the tragetDb (default database) is offline.  sa cannot login, either - because is is not active. What do we do?  Travis McGee
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend