Sunday, April 29, 2007

Geotag your Photos, Youtube videos and more!

Check this out, mountains where I've ski'd or snowboarded over the last few years... Viewable in Google Maps or if you have Google Earth you can check it out using that by downloading this KML file and opening it up(right click, save as.... IE saves it as an XML file so you may have to rename the file extension to .KML).

I added some YouTube clips to some locations, and some photo's to some others... It's a pretty nice way to document your trips.. The easiest way to create these files is with Google Maps - My Maps feature, which just requires a Google account to use.. The other way is through Google Earth, and even another way to do this is with a GPS device and some software --

I've been working with the Google Map API a lot recently, and you can now also use these files with KML/GeoRSS Overlays

Monday, April 16, 2007

What is my ip address? And why would I care?

Some of you may know what an IP address is, and some may not have any idea... or care. But after enough friends have asked me about it, I figured it's time to write something up on the subject. It stands for Internet Protocol address, and if you prefer to read the wiki article, go for it...

Before I explain it, I'll offer some reasons as why you would want to know about it.
-Do you ever wish you could get to your home computer's desktop when you are not at home?
-Do you ever wish you could get to some files on your computer at home?
-Do you want to setup your own web-server, file-server, internet-radio station, email-server or game-server?
-Have you ever tried to do something like play a video-game, send a file over instant messenger, or used a p2p file sharing application and have gotten an error message saying your firewall has blocked you?

My way of explaining it to people best is, it is like your 'phone-number' for your computer using the internet. Although you may rarely care which number you are 'called or make calls with' , behind the scenes your ISP is using it to let you use their services... It is pretty easy to figure out your external IP address on the internet, is one of my quick ways to identify it. If you hooked your computer directly up to the Cable/DSL modem this would truly be your IP.

Now for the tricky part, home routers, wireless access points, and hardware firewalls.... Your home access point is the device that is directly connected to your Cable/DSL modem and it gets your external IP assigned to it. Every computer/laptop that connects to your access point gets a different 'phone number extension'.. To make things confusing, this extension is usually an internal IP address... but the good news is they are in a range specifically designed for home/private use, 192.168.x.x being the most popular range for home use..

So great, my router has an external IP address, for example: it also has an internal IP address, for example, and my computer plugged into my wireless router has an IP address too, given to me by my router.

Ok I get it.
What about Port Forwarding? What if my external IP address from my ISP changes? What if my internal IP address from my wireless router changes?

Wednesday, April 11, 2007

ASP.NET 2.0 - Sending Email with your application

This is a very simplistic example of how to send an email within your ASP.NET 2.0 application. This example uses Google's gmail service, although it should work with any SMTP email server as long as you have the correct server settings (Host, Port, SSL) Good luck with your application!

public bool SendEmail(string strTo, string strSubject, string strBody)
bool bReturn=false;

System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient();

mail.From = new MailAddress("", "Senders Name");
mail.ReplyTo = new MailAddress(""); // optional
mail.Subject = strSubject;
mail.Body = strBody;
mail.IsBodyHtml = true;

smtp.Host = "";
smtp.Port = 25;
smtp.EnableSsl = true;
smtp.Credentials = new System.Net.NetworkCredential("", "password");

bReturn = true;
return bReturn;