Posts

Showing posts from February, 2005

Clocking hours worked using the Event log

If you are a geek you probably don't keep count of the countless hours you spend before your comp. Assuming you use a Windows 2000 (or a newer) OS, you can find the time you logged in & logged out each day (and the time spent in a day) programmatically from the Event log. Place the code below in the Page_load event of a C# webform after adding the namespace ... using System.Diagnostics; string log="System"; string machine="type-your-machine-name-here"; if(!EventLog.Exists(log,machine)) { Response.Write("The log does not exist!"); return; } EventLog aLog = new EventLog(); aLog.Log = log; aLog.MachineName = machine; Response.Write("There are {0} entr[yies] in the log:" + aLog.Entries.Count); foreach (EventLogEntry entry in aLog.Entries) { //the event code for Login event is 6005 if (entry.EventID == 6005) { Response.Write("Login: " + entry.TimeGenerated+ " "); } if (entry.EventID == 6006) { Response.Write("======Log...

Version Control is good for the Standalone Developer too

A source control tool is not not only useful for a team of developers but also to a standalone developer . Tracking and rolling back source code becomes easy. There is a general sequence of events that happens when you use most version control systems. First of all, a database must be set up somewhere. This may be on a local file system or on a TCP file server or somewhere else. Generally, all you need to know is where it is. This is the Connect operation. Now that you have a database, you need to be able to add files to it. This includes all the files you have now and any new files you may wish to add. This is the Add operation. Once you have files in the database, you need to be able to modify them. Some systems require you to tell the database you are working on them, but some (like CVS) allow you to just modify the files at will and submit all the changes when you are done. This is the Checkout operation. If you change your mind, you may want to revert to the last state...

Capacity planning

A rough calculation to find out how much bandwidth your website would consume (and this will also decide what you will have to pay) - Monthly Website Transfer = Number of visitors / expected number of visitors x Page size including the graphics of the page x Page views / expected pages viewed by each visitor x 30 days If you offer downloads, then add the following: Monthly Download Transfer = Average/Expected downloads x File Size x 30 days Also add a small margin of error to take into account email traffic and your own uploads to the server.

Firefox Live Bookmarks

Live Bookmark is a time saving feature in Firefox that lets you see if your favorite website (that supports RSS) has updates or interesting headlines. You will be able to view the RSS headlines directly click without actually visiting the webpage.

"There was an error opening the document; the file does not exist"

If you offer PDF downloads through your web application and some visitors cannot get it due to "There was an error opening the document; the file does not exist" error in Acrobat Reader, suggest them to delete their temporary internet files (MSIE: Tools > Internet Options > General > Delete Files) or to clear out their TEMP directory.

Global Software Development

Basic definitions: Globalization is ensuring that your application handles international data such as writing scripts, calendars, time and date format, numeric separators, currencies etc. Localizability is readying software to be translated for different culture or language. Localization is the actual translation of the resources provided by the application Resources : Application elements (typically error messages and user interface elements such as menus, dialogs, controls..) that are to be translated in localized versions. More^

Top Ten Web Application Vulnerabilities

OWASP's Top Ten Most Critical Web Application Vulnerabilities Unvalidated Input Broken Access Control Broken Authentication and Session Management Cross Site Scripting (XSS) Flaws Buffer Overflows Injection Flaws Improper Error Handling Insecure Storage Denial of Service Insecure Configuration Management

Something phish-y

Phishing is the fraudulent acquisition, through deception, of sensitive personal information such as passwords and credit card details, by masquerading as someone trustworthy with a real need for such information. Banks and financial institutions are prone to phishing attacks caused by cross site scripting (XSS) and script injection Web programmers can prevent most cross-site scripting attacks by validating form input, and ensuring that all user data is correctly encoded before it is displayed or stored. "Never trust user input" is a basic security tenet designed to reduce the risk posed by web forms.