Tag Archives: csharp
WebRequest throws IOException “The specified registry key does not exist.”

When you are using .NET 2.0 or .NET 3.5 and you are trying to make a web request with WebRequest…

The key LocalizedPerfCounter does not exist

When you are using .NET 2.0 or .NET 3.5 and you are trying to make a web request with WebRequest…

RSA 2048 using CryptoAPI and C#

RSACryptoServiceProvider performs asymmetric encryption and decryption using the implementation of the RSA algorithm provided by the cryptographic service provider (CSP)….

AES 256 and Base64 using CryptoAPI and C#

Rfc2898DeriveBytes implements password-based key derivation functionality, PBKDF2, by using a pseudo-random number generator based on HMACSHA1. – MSDN Generate salt…

A full implementation of the VirusTotal 2.0 API

VirusTotal.NET – A full implementation of the VirusTotal 2.0 API. Here you will find project’s source code. Features Based on…

Get Windows Users with C# and WMI

class SystemUser { public enum AccountType { DUPLICATE_ACCOUNT = 256, NORMAL_ACCOUNT = 512, INTERDOMAIN_TRUST_ACCOUNT = 2048, WORKSTATION_TRUST_ACCOUNT = 4096, SERVER_TRUST_ACCOUNT…

Update NoIP Host with c#

More about NoIP dynamic dns update request click here. private void UpdateNoIPHost() { try { HttpWebRequest request = (HttpWebRequest)WebRequest.Create( string.Format("http://dynupdate.no-ip.com/nic/update?hostname={0}",…

Check if user is Idle with C#

GetLastInputInfo function – Retrieves the time of the last input event. LASTINPUTINFO structure – Contains the time of the last…

Get System Uptime with C#

public string GetSystemUptime() { try { string systemUpTime = string.Empty; string query = "SELECT * FROM Win32_OperatingSystem WHERE Primary=’true’";  …

Is64BitOperatingSystem for C# and .Net 2.0

public bool Is64BitOperatingSystem() { try { string osArch = string.Empty; string query = String.Format("SELECT * FROM Win32_OperatingSystem");   using (ManagementObjectSearcher…

Next Page