Mark Wagner's .NET C# Cogitation

.NET Architect and Developer - Simple Thoughts from a Simple Mind

  Home :: Contact :: Syndication  :: Login
  90 Posts :: 59 Articles :: 1548 Comments :: 187 Trackbacks

News

You can download this .TEXT blog skin free. Download Cogitation Blue skin.
Updated May 6, 2004

My Sites
- New SharePoint Blog
- My Developer blog
- My Personal blog
ASP.NET Web Hosting
I host my site here. The best value for quality hosting. Read my opinion here. If you decide to join, please use this link. Thank you very much.


Legal
Any and all code, software, examples, suggestions and anything else on this web site is available for you to use at your own risk. No warranty is express or implied.
Views and Opinions
Mark Wagner works for Microsoft in the Consulting Services division and covers the West Region. The views and opinions expressed on this web site are not necessarily the views or opinions of his employer.

Article Categories

Archives

Post Categories

.: Architecture Links :.

.: Developer Links :.

.Text and RSS Links

Blog Roll - Top Guns

Developer: .NET Security

Developer: C# Team

Developer: Flash

Developer: JavaScript

Developer: Pocket PC

Personal: Aviation

Personal: Favorites

Friday, September 21, 2007 #

My blog has moved to:
http://www.wagnerlive.com/mark (or http://www.crsw.com/mark)

posted @ 6:24 AM | Feedback (0)

Thursday, July 06, 2006 #

If your a software developer, computer programmer, software engineer, or even a code monkey; you now have a song written just for you.  You'll enjoy Code Monkey by Jonathan Coulton.  I encourage you to visite Jonathans web site and listen to it and other songs in his list.

Jonathan Coulton
http://www.jonathancoulton.com/songs

Code Monkey:
http://www.jonathancoulton.com/music/thingaweek/CodeMonkey.mp3

posted @ 8:02 PM | Feedback (69)

How to send SMTP email using Telnet

This is an old method of sending email using Telnet.  I've posted it here mostly for a remider to me on exactly how to do this, but thought I would share it with others who may not know of this.  This can be useful when testing if a server can successfully send email.  For example, I use this to confirm if a SharePoint server can successfully send emails for alerts and notifications.

The items in bold are what you should type.

Start a Telnet session from a command line by entering:
Telnet your.mailserver.com 25

220 a.mail.server.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.2499 ready at  Thu, 29 Jun 2006 15:59:02 -0600
helo

250 a.mail.server.com Hello [192.168.125.237]
mail from: fromemail@server.com

250 2.1.0 email@server.com...Sender OK
rcpt to: joe@server.com

250 2.1.5 joe@server.com
data

354 Start mail input; end with .
This is a test.
.  (enter a dot/period to end the data)

250 2.6.0 Queued mail for delivery

quit
Connection to host lost.

posted @ 11:08 AM | Feedback (66)

Monday, January 16, 2006 #

I found the informational balloon tips that appear on my task bar to be very informative - initially, but become very annoying over time.

You can easily disable these network connection balloons in two ways.

The first and easiest is by disabling the Show icon in the notification area when connected option.  To hide the icon and disable the newtork connection balloons, simply open your Network Connections, edit the properties for the network adapter you desire, and uncheck the Show icon in the notification area when connected option.

However, I personally like having the icons appear on the task bar, but the balloons have become very annoying.  To allow your network icons to appear without the balloons, you can do the following. 

These instructions are for Windows XP

  1. Run the REGEDIT.EXE from the Start > Run dialog.
  2. Locate the following registry folder:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
  3. Create a DWORD value called "EnableBalloonTips".  The default value will be zero.  Leave the value as zero.
  4. Reboot your computer for this change to take effect.

This will disable all balloon tips on your task bar.

posted @ 11:21 AM | Feedback (46)

Sunday, December 11, 2005 #

I have been hosting at WebHost4Life how for about three years.  I cannot say enough good things about this hosting service.  Yes, this is something of a shameless advertisement - but it is the honest truth.  If you are in the market for a new hosting service with professional grade products, you should try WebHost4Life. Here is an article I posted a while back that covers my experience with WebHost4Life.

Here are the reasons I find the WebHost4Life hosting service of great value:

  • Excellent self-service control panel.  (I can do it myself)
  • Unlimited Bandwidth/Traffice (no monthly fee suprises)
  • Excellent support with very good response
  • and Professional grade products

posted @ 8:29 AM

Friday, September 30, 2005 #

What is the most difficult thing to find on the Internet?   A telephone number. 

Far to many companies are using their web site as a barrier to contacting a person directly.

I needed to contact Amazon Customer Service to resolve an issue.  Finding their telephone number is an absolute chore and very frustrating, by design in my opinion.  For those of you looking for the Amazon.com Customer Service telephone number, here it is.

Amazon.com Customer Service Telephone Number
1.800.201.7575

Amazon.com Customer Service Telephone Number Amazon.com Customer Service Telephone Number Amazon.com Customer Service Telephone Number Amazon.com Customer Service Telephone Number Amazon.com Customer Service Telephone Number Amazon.com Customer Service Telephone Number Amazon.com Customer Service Telephone Number Amazon.com Customer Service Telephone Number Amazon.com Customer Service Telephone Number Amazon.com Customer Service Telephone Number Amazon.com Customer Service Telephone Number Amazon.com Customer Service Telephone Number

posted @ 8:52 AM | Feedback (53)

Monday, June 20, 2005 #

Web Part Package Installer for Windows SharePoint Services 2003

Click here for the complete article...

For those of us who are familiar with installing and removing SharePoint web parts, it’s a pretty easy process.  However, for those individuals who spend more time using SharePoint than installing and configuring it; locating and using the STSADM command can be a bit tedious.  To help simplify the installation of web parts packages, I have created a simple Web Part Package Installer program.

The purpose of this program is to make the installation of web part packages much easier for less-technical people.  Web Part Packages are stored in files having a .CAB file extension.  The nice thing about a web part package is that a package can define some initial properties and configuration settings for the web part being installed.  This is where my Web Part Package Installer program may be useful.

The installer form is very simple.

 

Click here for the complete article...

posted @ 5:48 PM

Wednesday, June 08, 2005 #

Google Search Web Part

Mark Wagner
http://blogs.crsw.com/mark
June 10, 2005

Article: http://blogs.crsw.com/mark/articles/1009.aspx

I created a custom Google web part a few weeks ago for my demo SharePoint site.  You can see what it looks like on my testing SharePoint home page http://sharepoint.crsw.com.  The Google web part submits a search request by navigating the user directly to the Google search web page and performs a Google search using the Google search engine.  I have since received a number of emails requesting to get this web part for use on their SharePoint sites, so I decided to make it available for others.

First and foremost, the Google name and search service are the property of Google.  I have no affiliation with the Google name and its services.

Google is a must-have resource for my daily work.  If I need to find something, I Google it, and nothing else comes close when searching on the Internet.  With this dependency, I had to have it on my new SharePoint demo site.  My SharePoint demo site is more of a test-harness at this point since it is hosted on a shared/public server, so don’t be too disappointed when you see it.

For those of you not familiar with Google, welcome to the Internet.  Google is the single best Internet search service available on the Internet, for the Internet.  If you need to find something on the Internet, Google will find it for you.  This process of searching is commonly referred to Googling.  If you Google something, your are using Google to search the Internet for it.  For the rest of you, Google is probably how you found this article.

It is important to remember that this Google Search web part is not intended to replace the SharePoint search feature.  In order for Google to find any results, Google must have already searched and indexed your site.  Also remember that Google will not be able to crawl and index pages on your SharePoint site that are not accessible to the public.  This is where the SharePoint search has the upper hand.  Again, this web part is not intended to replace the SharePoint search feature, but to conveniently access the much used Google search from your SharePoint page.

Configuring the Google Search Web Part

Here is a picture of the web part configurations.

Google Image URL

Once you have installed the web part, in the configuration options of the web part is a Google Image URL property which defaults to an image on Google’s web site.  You should use the default url for the Google image.  I have made this property available just in case Google renames or moves their image.

This Google Search Web Part can be configured in three distinct ways.


Standard Google Search

Local Site Search

Custom Site Search

 

Complete article here...

posted @ 4:21 PM | Feedback (81)

Thursday, May 12, 2005 #

I tend to get quite a few emails via my blog so I thought I would post a quick note to say that I will not be able to respond to emails for the next three weeks.  I will be spending most of my free time (evenings and weekends) preparing for a significant career opportunity.  I hope to resurface with good news soon.

For those of you that had questions regarding the licensing for BusyBox, I have entered the free use license agreement as a feedback item on the BusyBox page.  I will update the article to contain the license agreement in the future - hopefully soon.  In short, you can use it for whatever you want as long as you understand that you are using it at your own risk and that I am not liable.

Thanks

posted @ 7:06 PM | Feedback (23)

Wednesday, May 04, 2005 #

The WinFX SDK Community Technology Preview Edition has some very good content.  I recommend the reading the WinFX: Guidelines and Best Practices

http://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_fxguidance/html/2995cebf-2b57-4cdb-8cac-0e171fb7b0b7.asp

posted @ 10:22 AM | Feedback (20)

Monday, May 02, 2005 #

SoftPro bookstore

For those of you who live in the Denver, Colorado area there is an excellent bookstore that specializes in only technical books.  There selection is excellent and they almost always have what I am looking for - in stock.  If you want it now and don’t like paying for overnight shipping, I suggest you stop by their store just south of Denver.

http://www.softpro.com

posted @ 1:55 PM | Feedback (31)

Friday, April 22, 2005 #

BusinessWeek is now trying to dip their toe into the blogging waters with their new blog site BlogSpotting.net.  My initial 4-second impression is they intend to use it to sell online advertising more than anything else.  My popup blocker was the first thing to fire.  They also know how to stir up the publicity by picking a name that immediately begs an explanation – and they most certainly have provided their “oh no, not that” response.

What this does show is how the blogosphere has become big enough and influential enough across the globe to demand attention and participation from more a more major old-media based corporations.

Welcome to the 21 century BusinessWeek!  Remember this; your competition will be much stronger and your subscribers will be more demanding and more critical about what you write.

posted @ 3:54 PM | Feedback (49)

Thursday, April 21, 2005 #

A sharp .NET developer has just started blogging.  Spence is an excellent .NET developer and I expect good things to come from his blog in the future.  He always seems to deliver something just a little extra special when it comes to software development.

posted @ 6:55 PM | Feedback (19)

Wednesday, April 20, 2005 #

Jason Bunting has a cool little trick to keep it running here.  Sometimes the obvious - is just not obvious enough.  Good job Jason.

posted @ 2:40 PM | Feedback (46)

Monday, April 18, 2005 #

Google Maps - very nice!

posted @ 3:18 PM | Feedback (9)

For those of you with an MSDN subscription, Visual Studio 2005 Standard Beta 2 has been released.

posted @ 8:33 AM | Feedback (19)

Friday, April 15, 2005 #

.NET Compact Framework developer links for Pocket PC 2002

This is a quick of the links I found to be useful while creating a Pocket PC 2002 application.  This includes a number of resource links along with a problem I had that seemed to take forever to find the fix.  I hope this post is useful for anyone wanting to start developing Pocket PC applications using Visual Studio .NET 2003.

This post is nothing more than a number of useful links and is not intended to be any sort of concise article.

An article worth reading – or at least quickly browsing.
http://www.sys-con.com/dotnet/articleprint.cfm?id=298

Know what version of the .NET Compact Framework you have installed on our personal device and your emulator.
http://msdn.microsoft.com/smartclient/community/cffaq/default.aspx#Q5u8yhkym

 

I did have a problem connecting to the Pocket PC 2002 emulator in Visual Studio .NET 2003.

Problem:
I was getting the following error when trying to use my emulator

Launching Application

Error while trying to run project: Unable to start debugging.

Unable to start program 'D:\YourProgramPathHere...

Solution:
Install the Windows CE Utilities for Visual Studio .NET 2003 Add-on Pack 1.1
http://www.microsoft.com/downloads/details.aspx?FamilyId=7EC99CA6-2095-4086-B0CC-7C6C39B28762&displaylang=en

 

Resouces

Open NETCF is an excellent library extension for the .NET Compact Framework, and is used by many Pocket PC applications.

Open NETCF Wiki

Pocket PC Developer Network

Microsoft .NET Compact Framework FAQ

Microsoft .NET Compact Framework FAQ (old but good)

Microsoft .NET Compact Framework QuickStarts

Microsoft Mobile Development Center

Microsoft Windows Embedded Developer Center

Microsoft Mobile and Embedded Development Center

Microsofts Thirt-Party Developer Sites

 

Bloggers worth noting

Peter Foot

Jono

Alex Yakhnin

Martin Struys

posted @ 12:09 PM | Feedback (18)

For you Pocket PC developers, Peter Foot points out how to implement a Naked Pocket PC 2002 emulator.

This excellent for creating screen catpures of your Pocket PC appliations - as shown below.

posted @ 11:19 AM | Feedback (16)

I have been on a blitz with the .NET Compact Framework.  I have a number of items I intend to post.  There is so much information available its a significant task just trying to get your arms around where to start.  I have a number of (100?) reminder emails I sent myself as I cruised the Internet for information - just so I would remember to read in more detail later.  The .NET Framework 2.0, .NET Compact Framework 2.0 and Visual Studio 2005 gets more exciting the more I learn.  This will truly become the ultimate enabler for developers.

I have been developing for more than 18 years now.  Yes, I know this may make me a grandpa in the developer community.  lol.  You shouldn't laugh so hard.  You might just hurt my feelings.  lol.  I've barely touched my fourth decade in life and I am as excited about development and technology as I was 18 years ago.  That is why I have chosen to remain a technical resource, and have opted to stay away from the management track.  And, with no regrets.

Microsoft and .NET - a true enabler!

posted @ 10:51 AM | Feedback (15)

Thursday, April 07, 2005 #

There is an interesting article about how FBI agents crack WEP (wireless encryption) in 3 minutes.  The article at TomsNetworking covers this in detail including the tools they used.  There is also a list of steps you can take to secure your wireless home network.

http://www.tomsnetworking.com/Sections-article111-page1.php

posted @ 10:39 AM | Feedback (27)

I try not to have any (OK, many) obsessions; however, one is my consumption for information.  Because of this I have to strictly monitor myself from deviating from my present task.  I am sometimes easily distracted.

To help me remember about “something I found interesting“, I have a nice little custom link button labeled “Send” that I use in my Internet Explorer browser to quickly send myself an email.  The email contains a subject and the link to the website in the body.  Yes, you can do this by clicking, File > Send > Link by E-Mail, but this is to many clicks for me.  Yes, I am impatient and have to work on this also.

This works with one click - much better.  Your Links toolbar needs to be turned on to easily access the buttons in IE.  I have my located immediately after the Address bar as shown here.

Simply paste the the following javascript code into the URL of the link properties.

javascript:navigate('mailto:YOUR-EMAIL@HERE.COM?subject=LINK:%20'+escape(document.title)+'&BODY='+escape(location.href))

The only thing you need to customize is the YOUR-EMAIL@HERE.COM portion.  Here is a sample of the properties dialog.

To create a link button you can drag the “e“ icon in the address bar to the Link toobar.  To get the properties, right-mouse-click on a link you want to edit.  Here is a sample of the properties dialog.

Warning: For me these emails are subtle “tasks” to learn more.  Your inbox may quickly fill up. :)

posted @ 10:24 AM | Feedback (26)

Convert a string to an enumerated (enum) value.

Using the Enum.Parse method, you can easily convert a string value to an enumerated value.  Doing this requires the type of the enum and string value.  Adding the true argument will cause the case to be ignored.

Using the following enum for this example:

private enum Aircraft
{
   Beech,
   Cessna,
   Piper
}

You can easily convert the string to an enum value like this:

Aircraft air = (Aircraft) Enum.Parse(typeof(Aircraft), "Cessna", true);

Ideally you should wrap a try-catch around the Enum.Parse statement.

posted @ 8:12 AM | Feedback (39)

Wednesday, April 06, 2005 #

DaFont.com has an excellent library of downloadable fonts.

http://www.dafont.com/en/

posted @ 8:44 PM | Feedback (8)

Simple string date validator.

I am a big fan of maintaining a library of simple and clean helper methods.  Here is a simple and clean way to verify if a string formatted date is a valid date.  This allows you to encapsulate the exception handling making it easy to use and very readable - another important coding practice.

private static bool IsDate(string sDate)
{
    DateTime dt;
    bool isDate = true;

    try
    {
        dt = DateTime.Parse(sDate);
    }
    catch
    {
        isDate = false;
    }

    return isDate;
}

posted @ 8:19 PM | Feedback (36)

Per an MSDN TV episode (Using Managed Resources) - to improve the performance (albeit minimal - I expect) of your assemblies, you should include the following line in your assemblyinfo.cs

[assembly: NeutralResourcesLanguageAttribute("en-US")]

This defines the default language for your assembly.  This allows the .NET runtime to bypass the process of looking for a satellite assembly for the “en-US” (default) language if the current culture matches the assemblies default culture.  Of course, assemblies intended for other languages should define that language as the default language.

Also, if you can put your satelite assemblies in the Global Assembly Cache (GAC), the Common Language Runtime (CLR) will load the assembly faster by not having to verify the cryptographic assembly signature.

posted @ 8:05 PM | Feedback (17)