Tag Archives: C#

Scripting form post in C# & .net

Earlier I blogged about scripting web browsing in .NET and C#. While automating fetching of simple webpages using GET method is pretty simple, form posting and retrieving response can be even more challenging. I had a tough time getting form posting to work. But once

Script to check available diskspace in C#/.net

Here is a script to check free diskspace in C#/.net. It uses WMI logicaldisk object to retrieve information on the system drives. .NET provides ManagementObject class to encapsulate the Windows WMI interface. Here is the sample code: ManagementObject Disk = new ManagementObject(“win32_logicaldisk.deviceid=”c:””); Disk.Get(); if (double.Parse(Disk[“FreeSpace”].ToString())

Getting your dynamic public IP in C# & .net

For one of my projects I required the dynamic public of my ISP connection. I blogged earlier about getting this through www.network-tools.com but in this case I needed it in my script. I wrote a quick script to scrape it of the same site. This

Dynamic DNS update from .C# and .net

I was setting up a local server at home and wanted it to be publicly accessible from a domain name. Unfortunately my ISP refuses to give a static IP and my only option was to use a dynamic DNS server. After checking some out I