david 的个人资料David Yardy PE, MCSD.NET...照片日志列表 工具 帮助

日志


6月17日

Coding Emails on Vista

Microsoft removed the SMTP server on Vista.  As a result any email testing on your development box will need to address this change.  Most developers will discover this through some exception after they try to run their application locally.

Two options

  1. Use a free SMTP Server product locally http://softstack.com/freesmtp.html or http://www.smartertools.com/Products/SmarterMail/Free.aspx.  Both of these are very lightweight are quite simple installations.
  2. My preference is to configure mail settings to use a pickup directory.   See below…

Mail Settings Configuration – add the following to your web.config.  After making the modifications to your web.config all emails sent will be in .eml file format.  There are a number of benefits such as no more waiting for emails to be sent and also that you can monitor all emails generated from your application.

<system.net>
  <mailSettings>
    <smtp deliveryMethod="SpecifiedPickupDirectory" from="no-reply@mydomain.com">
      <specifiedPickupDirectory pickupDirectoryLocation="C:\temp\emailOutput\" />
    </smtp>
  </mailSettings>
</system.net>

Check it out.

6月16日

Vista – Fix Folders

You may have noticed that if you modify the view settings for a folder in Windows Vista and then for some reason some graphics files are dropped in the directory the view settings will be reset.  I have struggled with this for a year.  I would keep setting the view defaults (showing date modified etc.) and then a week or so later the columns would reset.  Well, here is the fix for this. 

Save the following code in a file with the .bat extension and run this file.

setlocal

set BASE_KEY=HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell

:: Delete cached folder views
reg delete "%BASE_KEY%\Bags" /f
reg delete "%BASE_KEY%\BagMRU" /f

:: Set default folder template
reg add "%BASE_KEY%\Bags\AllFolders\Shell" /v FolderType /d NotSpecified

:: Restart Explorer
taskkill /f /im explorer.exe
start explorer.exe

 

Well worth the small effort.

Consolas for you Command Prompt

Use the following reg add command to add the Consolas to your command prompt window

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont" /v 00 /d Consolas

In the end after opening the defaults for the command window you end up with a very pleasant change.  This tip looks like it has been around for a while but I recently stumbled upon it.

image


image