November 2010 (1)
August 2010 (1)
July 2010 (1)
June 2010 (3)
July 2009 (3)
June 2009 (1)
May 2009 (1)
February 2009 (1)
January 2009 (1)
November 2008 (3)
October 2008 (4)
September 2008 (9)
August 2008 (6)
July 2008 (3)
June 2008 (3)
January 2008 (1)
November 2007 (2)
October 2007 (6)
September 2007 (5)
August 2007 (22)
July 2007 (6)
June 2007 (1)
May 2007 (3)
April 2007 (27)
March 2007 (8)
February 2007 (6)
September 2006 (2)
August 2006 (4)
July 2006 (9)
June 2006 (17)
May 2006 (20)
April 2006 (12)
March 2006 (9)
February 2006 (4)
January 2006 (3)
December 2005 (2)
November 2005 (4)
October 2005 (5)
September 2005 (37)
August 2005 (83)
July 2005 (6)

Active Directory / LDAP (0)
ASP.Net (19)
Blackberry Development (4)
c# (34)
c++ (3)
Code Camp (1)
Excel (1)
Exchange (3)
Front Page 2003 (6)
FTP User Editor (4)
HTML / CSS / DHTML (8)
IIS (146)
IIS - Log Parser (7)
IIS / FTP (12)
IIS / Tools / Administration (42)
IIS / Tools / Authentication (6)
IIS / Tools / Compression (8)
IIS / Tools / Crash & Hang (12)
IIS / Tools / ISAPI Filters (17)
IIS / Tools / Log Files (17)
IIS / Tools / Scripts (28)
IIS / Tools / Security (9)
IIS / Tools / SSL (6)
IIS 7 (3)
Internet Information Server (1)
Me (Chris Crowe) (6)
MIME Types (1)
Misc (72)
Oulook Express (2)
Silverlight (1)
SQL Server (27)
SQL Server CTE (1)
Vista (15)
Vista Gadgets (8)
Visual Studio (11)
Voice over BroadBand (1)
Windows (33)
Windows Powershell (3)
Windows Sharepoint Services (0)
Windows Sharepoint Services (15)
Windows Vista (14)
Wine Cellar (1)
WMI (8)

Archive

April 2007 (27)

Replacing CRLF with BR in a Repeater or GridView

When you are delaing with a Repeater or GridView and you have a string which contains embedded Carriage Returns and Line Feeds (CRLF) and you want to display that data using the CRLF you must change them to <BR> tags.

This can be acheived by the simple line below.

Eval("FieldName").ToString().Replace("\r\n", "<BR>")

Normally when you embed data from a database you may use the following Bind But Eval allows you to evaluate a complete expression.

A small sample is shown below <asp:Repeater ID="repComments" runat="server">

<
HeaderTemplate><table cellspacing='0' cellpadding='0' width='650px'></HeaderTemplate>

<
ItemTemplate>
<tr>
  <td>
      <asp:Label ID="lblName" CssClass="commentName" runat="server" Text='<%# Bind("CreatedBy") %>'></asp:Label>
  </
td>
  <td align="right">
     <asp:Label ID="Label1" CssClass="commentDate" runat="server" Text='<%# Bind("CreatedDateTimeUTC") %>'></asp:Label>
  </
td>
</tr>
<tr>
   <td colspan="2"><br />
      <%# Eval("Comment").ToString().Replace("\r\n", "<BR>") %>
      <div style="padding-top: 10px; margin-bottom: 10px; border-bottom: dashed thin;"></div>
   </td>
</tr>
</ItemTemplate>

<FooterTemplate></table></FooterTemplate>

</asp:Repeater>

 


What happened to the File Menu?

I was looking for some info on command line parameters for Access 2007 when I came across this help message.

Notice the important message.

No option is currently available!

Does that mean they are thinking of putting it back?, maybe the Ribbon is getting a lot of negative feedback despite the hype?


Looking for a way to get WinForms Developer License with Subscription and Source (value $999) for free!
Telerik ( www.telerik.com ) makers of some great controls for Asp.net and WinForms have a content running now that will allow you the chance to win a 50" Plasma Television.
 
Telerik WinForms Contest - Part II
In order to participate you need to download RadControls for WinForms, explore the software for a while and then answer 10 easy questions.
 
For 5 or more correct answers, you will receive a complimentary RadControls for WinForms Developer License with Subscription and Source (value $999).
 
 
THE AWARDS:
  • Grand prize: 50 inch plasma TV
  • The first 50 participants that answer all questions correctly will receive a $20 Amazon gift coupon.

Telerik Code Converter - convert C# to VB.NET and visa versa

Code Converter is a free and simple VB to C# and C# to VB code converter. While there are several other good code converters available, none are perfect. Some are buried in busy websites. Some are awkward to use. Some just don't convert accurately! Code Converter, while not yet perfect, aims to address these issues and provide the best free .NET converter available on the web.

Part of the mission of delivering the best code conversion service means that it needs to be available wherever and whenever you need it. For that reason, we will be building code conversion widgets for all of the major widget engines (such as Google Desktop, Windows Sidebar, and Yahoo! Widgets) so that you can easily convert your code snippet while minimizing the interruption to your work. The following code conversion widgets are already ready and available here:

To try on line see http://converter.telerik.com/Default.aspx

Conversions by NRefactory

For the heavy lifting, we rely on the open source NRefactory library to perform code conversions. NRefactory is a powerful C# to VB and VB to C# conversion engine maintained by the developers at SharpDevelop. By default, NRefactory requires that all code be properly wrapped in a class and (as necessary) method before converting. We try to save you time by automagically wrapping your code snippets in "dummy wrappers" so it can be processed by NRefactory. If you're having trouble converting your code, try wrapping it in a class yourself to skip our "magic" wrapping process.

http://www.google.com/search?q=NRefactory&rls=com.microsoft:*&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1

 


Mime types - FireFox Extensions

Firefox's extensions use a specific mime type and unless you add this you will not be able to download from an IIS 6+ web site.

Extension   : .xpi
Mime Type  :  application/x-xpinstall



Upgrading Compaq IPAQ 3870 to PPC 2003 from PPC 2002

Step by Step Instructions for upgrading a COMPAQ IPAQ 3870 from Pocket PC 2002 to Pocket PC 2003 ( English )

The following instructions should help you perform this action in under 20 minutes on Windows XP  ( see notes about Vista later )

  • Download the Upgrade/Patch files from http://blog.crowe.co.nz/attachments/nk.nb0.zip  The file to download is called nk.nb0.zip and is ~16 MB in size
  • For those who think this is not legal see this message posted on the original forum where I found the details



    Now lets continue.

  • Download UltraEdit-32 ( 30 day trial ) from here  ~ 11 MB, or use any other HEX editor
  • Unzip the contents of the NK.NB0.ZIP file to a folder such as c:\temp
    • There is two files in this zip file, host11.exe (389 KB) and nk.nb0.bak (32 MB)
    • Rename the nk.nb0.bak file to nk.nb0 ( IMPORTANT )
  • Install UltraEdit-32
  • Load UltraEdit-32 and load the file nk.nb0 as shown below


 

  • You will be presented with a display full of 0's like this:

     
  • We need to make two changes to this file to include details of your serial number from your IPAQ device.

    With the file open in UltraEdit press Ctrl-G to open the GOTO dialog and enter the address 0x01ff000a and hit enter



    You will be taken to an area that contains a number similar to your Serial Number. We need to change this number with your serial number which is on the back of the IPAQ

    To do this we must use the hex values of characters and enter them.

    For example the serial number in the image below contains the following (note: The actual file you download is different)
     
    Digit 4 G 2 7 D W 3 4 9 1 6 G
    Hex value 34 47 32 37 44 57 33 34 39 31 36 47

    For digits 0-9 just prefix with 3, so for example a 5 is actually 35 in hex

    For letters A-Z it is not as simple but an A is 41, B is 42, C is 43, D is 44 etc...

    When entering the values make sure the cursor is flashing the two digit values area. Also make sure you do not change any of the 00

    There is only 12 characters in your serial number and they normally look something like this 4G27DW34916G


     

  • We need to repeat this again exactly for a different area, this time we press Ctrl-G and enter the address 0x01ff0e0a and hit enter



    Again we change the values shown to what you have for your serial number.


     
  • When you have completed the two changes you need to save the file and exit Ultra Edit.
  • We now need to tell our 3870 to go to Upgrade Mode and we perform this with the following steps:

    We need to hold down a number of keys and force the device into update mode.

    We need to first press and hold button 2, then while holding button 2 also hold down button 4 (some flickering will occur on the screen), now while those two buttons are held down we need to hold down the power button. At this stage the screen will dim a little.

    We then need to press the soft reset button which is recessed into the bottom of the device. So while holding the #2, #4 and Power Buttons press the stylus into the Soft Reset button and hold for 3-5 seconds.

    You should then see a screen similar to the following:


     
  • At this point make sure your USB cable is plugged in to your computer.
  • We now need to make sure that the ActiveSync tool is disabled so open Task Manager and go to the processes tab and find the WCESCOMM.EXE process.
  • Select this file (if it exists process list) and select End-Task - this is to stop Active sync taking over.
  • You now need to run host11.exe which will perform the actual upgrade of the Firmware of the device.



    It will take about 5 minutes to perform the upgrade.
     
  • At the end of the upgrade I was told to remove the battery - I am not sure if you really need to or not but I did, not a Simple matter either. Some people have said to do the following so maybe this is to get around the remove the battery prompt.

    Perform a hard reset by holding down the #1 button + the #4 button and click on the recessed Soft Reset for a few seconds.

    Remember, I have not tried this option I removed the battery.
  • At this point when your device loads you should see on the main startup screen that it is running 4.0 and if you go to Start - Settings - System - About you should see the following screen.A


     
  • I performed the steps above on a Windows XP laptop since I was a bit unsure about these weird files HOST11.EXE and NK.NB0    They appear to be fine and my virus scanner did not wing and they do appear to do what they are suppose to.

The only reason I actually went through this process was to be able to use Synchronization on Windows Vista which does not support Pocket PC 2002.

So after I upgraded an plugged in my IPAQ 3870 Pocket PC 2002 and went to the Windows Mobile Device Center all I got was this:

I then went to http://www.microsoft.com/windowsmobile/devicecenter.mspx and downloaded the latest version of the Windows Mobile Device Centre and installed it. When I rebooted I found that when I went to Windows Mobile Device Centre I got the nice version of it as shown below and it does synchronise properly.


If you want to go back to Pocket PC 2002 then there is a firmware available here

http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=0&prodSeriesId=96481&prodNameId=100777&swItem=PSG_I14999-37465&swEnvOid=231&swLang=8&taskId=135&mode=3

I found the details of how to do this in the following forum.

http://www.mobileplanet.com/ft.aspx?i=101823&thread=111&page=1

 


The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

I recieved the following error The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine on my Vista 64 bit machine today. I made no code changes since I run it on a 32 bit OS.

Aparantly there is not a 64bit Microsoft.Jet.OLEDB.4.0' provider  and you have to force your build to 32 bit.

In the settings for the project under the Build Tab you must set Platform target to x86 instead of Any CPU


Enabling SSL on IIS 7.0 Using Self-Signed Certificates

Scott Guthrie has an article on using Self Signed Certificates with IIS and how to enable it in under 30 seconds.

Here is a primer...

SSL enables browsers to communicate with a web-server over a secure channel that prevents eavesdropping, tampering and message forgery.  You should always use SSL for login pages where users are entering usernames/passwords, as well as for all other sensitive pages on sites (for example: account pages that show financial or personal information). 

Configuring SSL on Windows with previous versions of IIS has been a pain.  Figuring out how to install and manage a certificate, and then associate it with a web-site, is something I bet most web developers don't know how to enable.

The good news is that IIS 7.0 makes it radically easier to configure and enable SSL.  IIS 7.0 also now has built-in support for creating "Self Signed Certificates" that enable you to easily create test/personal certificates that you can use to quickly SSL enable a site for development or test purposes. 

Using IIS 7.0 you can SSL enable an existing web site in under 30 seconds.  The below tutorial demonstrates how to-do this.

For the rest of the article see his article at http://weblogs.asp.net/scottgu/archive/2007/04/06/tip-trick-enabling-ssl-on-iis7-using-self-signed-certificates.aspx

 


Windows Vista Clock with smooth scrolling seconds

I saw a post on the  MSDN Forums for  Sidebar Gadget Development forum.

The post is available at this url:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1472545&SiteID=1

The user asked this question:

"Looking at the standard Microsoft Clock Sidebar Gadget, I was wondering whether it would be possible to change the jumping second-hand into a sweep second-hand, i.e. one that moves smoothly like an old mechanical clock or mechanical wrist watch. I looked into the code but had to give up after about two hours of trying. Anyone knoews hoe to do that? Thanks! "

You can download my re-write of the default Clock to support smooth scrolling seconds.

Download Now


Vista Sidebar Gadget - Calling a function in the flyout from the main gadget page

I have been trying to get my main gadget Javascript page to be able to call a function in the flyout page.

Note: You will want to put a try/catch around the code in case the flyout is actually not available since it was closed and would cause an exception

On the main gadget Javascript page I have a function which will call the function resetMarginLeft() in the flyout

function renderFlyout()
{
   System.Gadget.Flyout.document.resetMarginLeft();
   // Other Stuff
}

So that function above will call a method called resetMarginLeft() which belongs to the document object model (DOM) in the flyout.  

Now the document object model (DOM) does not have such as method so we create it in the onLoad event in the javascript function. To trigger this onload we add the following code to the flyout.html page

<body onload="onLoad()"

In the flyout Javascript page I have this code

function onLoad()
{
    document.resetMarginLeft = resetMarginLeft;
}

This bit of code looks odd but basically we are creating a method reference in the document object model (DOM). This method can then be called from our main Gadget page.

Basically we are saying

document.MyFunctionNameForTheDOM = SomeOtherFunctionOnThisPage;

Note: Do not include () in the function reference above!

Here is the source to the actual resetMarginLeft() function - but it could do anything you wanted, in my case I just wanted to reset a few variables.

function resetMarginLeft()
{
  marginLeft = 0;
  increment = 1;
}


IIS 7 Reports Module: Server and Site Reports

IIS 7 Reports Module: Server and Site Reports

IIS Reports This application extends IIS 7.0 Manager by adding a new Reports option that gives you a few reports of the server and site activity. Its features include:
  • Reports are scoped on the object selected in IIS Manager, so if server is selected you get a server report including all Sites information, if a site is selected you only get information related to that specific site
  • Export to HTML
  • Printing support
  • Different chart options: Pie, Columns and Lines
  • Built-in Reports:
    • Status Code, Hits Per Url, Hits by Hour, User Agent, File Extensions
    • Users, Time Taken, Win32 Errors, Client Machine, Http Method
Note: This library is free, you can distribute it and use it at your own will and risk, it is not supported by any company including Microsoft or any other company, it does not belong to any company.

This has been tested using Windows Vista and the Windows Longhorn Server.


Free PInvoke Visual Studio Add-in

Find and contribute PInvoke signatures

PInvoke.net, meaning Platform Invoke, is a wiki used by around 50,000 .NET developers a month to find and contribute PInvoke signatures (also known as Declare statements in VB), type definitions, and any other information related to calling Win32, or other unmanaged APIs in managed code (languages such as C# or VB.NET).

As a wiki, it is user driven and acts as a repository where developers can contribute or retrieve information as they wish.

Copy and paste your way to productivity

Certain things just can't be done in pure .NET, and the developer has to drill down to the Windows API. This is achieved through .NET's Platform Invoke (PInvoke) functionality, which requires declarations to be supplied by the developer. Manually defining and using PInvoke signatures is an error-prone process that can introduce extremely subtle bugs. PInvoke.net supplies you with tried and tested signatures and type definitions, so that you don't have to spend time writing them from scratch.

Visual Studio integration for the quick and easy insertion of PInvoke signatures

Download the PInvoke.net add-in for Visual Studio 2003 and 2005, and save yourself the effort of having to open up a web browser to search for the PInvoke.net website. You can now insert a PInvoke signature with the click of a button while you're working on your application in Visual Studio.

PInvoke VS Add-in

Screenshot illustrating the PInvoke Visual Studio add-in

Download for free from http://www.red-gate.com/products/pinvoke.net/index.htm


Download the Best Of SQL Server Central vol 3

Download the Best Of SQL Server Central vol 3 which contains information about:

  • Security - both an overview and a detailed approach to securing your SQL Server.
  • Performance - key concepts and detailed explanations about how to improve the performance of your SQL Server.
  • Administration - tips and tricks for making the administration of SQL Server work for you, including some strong information about clustering. 

You must register wth Red Gate Software who by the way make some great tools for managing your SQL Server Databases.

You can also download volume 1 & 2 after you register and some of their trial software which I again recommend.

https://www.red-gate.com/Dynamic/Downloads/DownloadForm.aspx?download=ebook2&utm_source=ssp&utm_medium=email&utm_campaign=bestof


Windows Vista and CHM Issues

You may find that on occasion you can not view the content of CHM files on Windows Vista. You can see the table of contents but the actual details are not displayed.

This can occur if the file has come from another computer, and the OS now blocks these from running. CHM is not the only file that can be affected I have seen this issue with Javascript files that are used in Vista Gadgets.

You can click the Unblock button and it will allow the single file to be trusted.

In addition, check that the path to the .CHM file doesn't have any # characters in it anywhere. Otherwise, the help viewer gets confused (# means something specific in HTML). If it does, you'll have to move the file somewhere else.


Google Analytics - Track page views and analyze the flow of visitors

Google Analytics provides powerful tracking for anyone with a web presence, whether it be a small hobby website or a giant online enterprise. It's one of the most powerful web analytics solutions on the market - and it's free for anyone to use!

Google Analytics provides in-depth reports for everyone involved in the running of a website, from the developers and designers to the marketing and management teams. Find out where people leave your site, and what content catches their attention. Compare marketing campaigns and see your return on investment for all of your AdWords spend. The ways that you can use Google Analytics are endless.

This free version is limited to 5 million pageviews a month - however, users with an active Google AdWords account are given unlimited pageview tracking. In addition, Google Analytics is completely integrated into the AdWords front-end and with your AdWords campaign, making it easy to track your AdWords ROI.

http://www.google.com/analytics/

You can awatch a simple video here about how it works:
http://www.google.com/analytics/media/report_tour/feature_tour.html


Refactor!™ for ASP.NET free download from www.devexpress.com

For those that do not know Developer Express make some really great tools and controls for .NET. They have made their Refactor tool for ASP.NET available for free.

Refactor! is freely available to all ASP.NET 2.0 developers and offers a comprehensive suite of tools that enable you and your team to simplify and shape complex code and HTML markup - making your web applications easier to read and less costly to maintain.

Below is a simple example where you can refactor the source file the .APSX file into a code behind file.

If you want to watch a small 12 minute video about it see this:
http://www.devexpress.com/Products/NET/IDETools/RefactorASP/Presentation/Refactor_for_ASP_NET/
 

You can download it from:
http://www.devexpress.com/Products/NET/IDETools/RefactorASP/

They also have two other free Refactor products:

  • Refactor for Visual Basic
  • Refactor for C++

Blog Comments Enabled Again

I originally disabled comments on this site by hacking around with the SQL. The reason SPAM

I have now enabled comments again - hopefully SPAMMERS will just stay away!

Well within 15 minutes of opening up the comments - 5 SPAM Comments!


New Blog Engine

I found today that there was a new Blog Engine based on .TEXT called SubText.

Subtext is a personal blog publishing platform that focuses on usability, elegance, and simplicity. If you’ve ever caught yourself throwing your hands in the air and declaring that you’re going to write your own blogging engine, then Subtext is for you

I decided to give it a go and you are seeing the result right now.   I like the changes in this product especially the SPAM filtering for comments.

I have reproduced the skin that I was using (well some of it ) and I am very happy. There was even a tool to import my .TEXT site details

http://subtextproject.com/

There is even a SubText site for skins at http://subtextskins.com/

This is a breakdown of the features supported (and not supported) by Subtext useful in deciding whether or not Subtext is for you.

 

Current Version 1.9.2
Home URL http://subtextproject.com/
License BSD
Cost Free (as in beer!)
Minimum Server Requirements ASP.NET 2.0, Windows Server 2000, SQL Server 2000
Localization Not Yet
Multilingual Not Yet
Data Storage Database
Max Weblogs Unlimited (or depends on how much disk space you have)
Post Ordering Descending
Categories Multiple
Subcategories No
Tags Not Yet
Keyword Expansion Yes
Post Editor Plugin-Based (FCKEditor and FreeTextBox)
Draft Mode Yes
Post API Support MetaWeblog (supports newMediaObject method)
Post Moderation No
RSS Output 2.0
ATOM Output 1.0
Comments Yes
Comment Spam captcha, invisible captcha, filtering, duplicate, delay, shutoff, nofollow, linkcount, massedit, moderation, akismet
CommentRSS Yes
Skins Yes (ascx files)
Open Registration None
User Security Single account per blog and one account for installation (soon to change)
Trackback Yes
Pingback Yes
RSS Aggregator No
Forum No
CSS Editor Simple
Plugins/Extension None yet, but slated for Subtext 2.0
Visitor Logs None
Referrer Logs Yes (per site and per post)
Import/Export BlogML
Search Engine Friendly URLs Yes
Auto Thumbnails Yes (in the Gallery)
Category Images No
Skin Switch Yes
Cross-post No
Linkroll Yes
Password Protected Posts No
Blog By Email Not yet
User Community SourceForge
Documentation http://subtextproject.com/Home/Docs/tabid/54/Default.aspx
Sample Sites http://haacked.com/

Windows Vista Drivers for Fuji Xerox Docuprint 203a A4 Mono Laser Printer

 I have been using an old OKIPage 8Z for a while since I do not do a lot of pritning from home. I originally has problems with drivers for that for 2003 server. No new drivers were ever released for 2003 Server.

 

I decided to splash out and buy a Fuji Xerox Docuprint 203a A4 Mono Laser Printer for the sum of $99+GST

This little printer looks nice and doesn't have a huge footprint but a lot more than the OKI, but then this is a laser printer.

Well I now only run VISTA, no more XP around here. I went to their www.fxprinters.com web site and quickly found my printer and the drivers they offered.

 

No Windows Vista Drivers.

I decided to phone the support number and after a long time got put through to an answering machine asking me to leave my name and they will return my call. Cool...

I did that and about 3 minutes later they rang back. I said to the man from Sydney that I just purchased the printer and I could not find a VISTA driver. He said well that is because there is no VISTA driver for that printer. It was made before Vista was around and officially there has not been any word of a driver being released for VISTA.

mmmm

The man then said he has heard on the grape vine that a driver may be released at the end of May? he did not mention the year!

He also said he heard that a Brother driver may work, and he had heard that someone who installed the XP driver found that when they printed from Outlook 2007 it would bluescreen the box.

mmmm

Well I decided to have a bit of a look and see what I could do to get the thing working from my VISTA 64Bit machine at work ( I havn't even got it home yet )

Well after installing about 10 drivers I found a solution ( well it looks like a solution )

I installed the “SHARP  AR-160 PCL 5e“ driver and it worked. I tried it from Outlook 2007 and it worked, no BSOD!

I will let you know if I have any problems with this driver but if you are like me running VISTA and have one of these printers that driver appears to be working for me.


Reproducable bugs in Windows Vista Sidebar RTM

I came across a forum that has a special topic on reproducable bugs in the Windows Vista Sidebar.

Most of the bugs have a work around so well worth a look if you are experiencing some strange issues with Vista Gadget development.

Here is a current list of bugs

Bug# 1: The bottom and right are incorrectly cropped when rotation is applied to <g:background>
Bug# 2: <g:background> and addImageObject incorrectly place the image, by (originalImageWidth-scaledImageWidth)/2, (originalImageHeight-scaledImageHeight)/2
Bug# 3: Image exploded beyond belief. Sidebar cannot resize an image smaller than 50% of it's original size
Bug# 4: Gadgets will not install if they contain blank directories in the Gadget package.
Bug# 5: Changing <g:text>.value doesn't update <g:text>.width or <g:text>.height - the text is stretched, or you get an invalid result when trying to reference it.
Bug# 6: Settings page is limited to 300x400. The Settings page on this gadget should be 1000x1000
Bug# 7: Sidebar crashes when trying to use addImageObject or addTextObject in the BODY section.
Bug# 8: Aliased surround is incorrectly placed if image is rotated and body margin is not 0.
Bug# 9: The three (or two if you have no settings) icons that appear when you hover over a Gadget are incorrectly placed for detached Gadgets after Sidebar is reloaded. They're shifted left 6 pixels.
Bug# 10: If you manually Exit Sidebar, the X position of all detached Gadgets is decreased by 6.
Bug# 11: System.* namespace goes missing after "window.location.reload(true);"
Bug# 12: Focus is lost on the Flyout if you change System.Gadget.Flyout.file whilst a Flyout is open
Bug# 13: Setting "System.Gadget.Flyout.onShow = null;" generates an error. This goes for all other Gadget settings that are set to a function.
Bug# 14: Partially transparent surround is scaled incorrectly when setting System.Gadget.background, if the image is larger than the Gadget
Bug# 15: Background image doesn't change if it's changed through a stylesheet
Bug# 16: addImageObject holds the image open. If you're developing a Gadget and want to change one of the images, you can't overwrite it.
Bug# 17: Images are cached. If you remove all instances of a Gadget, change the images within it and then re-add it to Sidebar, the old images still show.
Bug# 18: If a Gadget is partially off screen, Sidebar shifts it so it's completely on screen on loading.
Bug# 19: <g:background>.blur / <g:background>.softEdge effect is positioned incorrectly. It doesn't take account of the top and left parameters.
Bug# 20: When digitally signing a Gadget, if the filename is long the signature is corrupt:
Bug# 21: The GPO Policy setting ""Turn Off User Installed Windows Sidebar Gadgets"", also stops users from adding Gadgets in the "Shared Gagets" folder:
Bug# 22: <BODY onunload> doesn't fire during logout and shutdown.
Bug# 23: Flyout background colour cannot be set from a stylesheet.
Bug# 24: Gadget may never appear on the sidebar if you have overlayed RGB transparent images and are updating the screen too often.
Bug #25: Flyout will only show if Sidebar has focus. If you show the Flyout via "System.Gadget.Flyout.show = true" and Sidebar doesn't have focus, the "System.Gadget.Flyout.onHide" event immediately fires.
Bug #26 System.Shell.saveFileDialog(strPath, strFilter) filter string doesn't work as expected
Bug #27 System.Gadget.begin/endTransition corrupts g:background. It happens regardless of what transition type you use, or if you use an image or not. In the following Repro, Left click to see the problem. Right click to see, with the workaround.
Bug #28 g:background becomes corrupt if you change document.body.style.zoom. In the following Repro, Left click to see the problem. Right click to turn on the workaround.
Bug #29 If the g:background image is set to a percentage of the Gadget size, it's not rescaled when the Gadget body size changes. In the following Repro, Left click to see the problem. Right click to turn on the workaround.
Bug #30 begin/endTransition can hang a Gadget, if the body size isn't changed. In the following Repro, the image should toggle between two images. Right click to toggle with the workaround, Left click to recreate the problem.
Bug #31 System.Gadget.background="..." will corrupt the image if it's height is less than 57 pixels. If you set a Gadget background via System.Gadget.Background = "..." to an image that is less than 57 pixels in height that has partially transparent pixels, the background becomes corrupt. Sidebar stretches the transparent pixels to 57 pixels in height, but leaves the opaque pixels their original size.
Bug #32 g:background "blur" and "softEdge" cause the partially transparent background pixels to overlay the Gadget when focus is lost. In the Repro, move the Gadget to reproduce the problem.

http://www.aeroxp.org/board/index.php?showtopic=7318

 


HTTP Pipeline in ASP.NET 2.0

Here is a quick reference for the steps in HTTP pipeline in ASP.NET 2.0.  Some of the steps are internal (cannot be subscribed by HTTP modules or GLOBAL.ASAX):

  1. Internal step to validate request.  Protects against malicious attacks exploiting path canonicalization
  2. Internal step to perform URL mapping (if the URL mapping feature is enabled)
  3. Fire BeginRequest event
  4. Fire AuthenticateRequest event
  5. Fire DefaultAuthentication internal event
  6. Fire PostAuthenticateRequest event
  7. Fire AuthorizeRequest event
  8. Fire PostAuthorizeRequest event
  9. Fire ResolveRequestCache event
  10. Fire PostResolveRequestCache event
  11. Internal step to determine the IHttpHandler to process the current request (this is when the page compilation takes place)
  12. Fire PostMapRequestHandler event
  13. Fire AcquireRequestState event
  14. Fire PostAcquireRequestState event
  15. Fire PreRequestHandlerExecute event
  16. Internal step to execute the IHttpHandler (call its ProcessRequest method) for the current request. The handler is determined at step #11
  17. Fire PostRequestHandlerExecute event
  18. Fire ReleaseRequestState event
  19. Fire PostReleaseRequestState event
  20. Internal step to perform response filtering (only if HttpResponse.Filter is installed)
  21. Fire UpdateRequestCache event
  22. Fire PostUpdateRequestCache event
  23. Fire EndRequest event.  This is the only event that is guaranteed to be fired for each request

I got this list from http://blogs.msdn.com/dmitryr/ - it was part of another topic, but I thought it had value by itself.


How to play a .ASX stream from a gadget

Here is a very simple gadget that shows how to play a stream from an ASX file that is in the Gadget folder for the current gadget.

It is very basic

CSS File

body|
{
    font-family: Segoe UI, Tahoma, Sans-Serif;
    width:130px;
    height:62px;
    margin:0px;
    padding:0px;
    background-color: white;
    border: ridge 2px
    font-size: 8pt;
}

HTML File

<html>
<
head>
<title>ASX Playertitle>\
<link href="css/Radio.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="js/Radio.js" type="text/javascript">script>
head>

<body>
This is a simple sample of how to play an ASX file
<a href="javascript:void" onclick="startStream()">click here to start streama>

<OBJECT id="mediaPlayer" width="0" height="0" style="position:absolute; left:0;top:0;" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
<PARAM NAME="AutoStart" VALUE="False">
<PARAM name="uiMode" value="invisible">
OBJECT>

body>
html>

Javascript File

function startStream()
{
    mediaPlayer.url = System.Gadget.path+
\\asx.asx;
    mediaPlayer.controls.play();
}

ASAX File

<asx version="3.0">
<
entry>
<
ref href="http://ac1.streaming.net.nz/trn-zmonline-chc?MSWMExt=.asf" />
entry>
asx>

Basically this gadget just loads Windows Media Player and when you click on the link in the html file it will start streaming.

The reason this was written was to help answer a forum question http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1442023&SiteID=1&mode=1

Click here to download this as a gadget


Another Windows Vista Gadget - Air New Zealand - Grab a seat

UPDATED:

AIR NEW ZEALAND have made their RSS feed unusable as it contains no details any more of the prices, flights etc and hence this gadgetno longer has any value unless you want to see the source code!

 

I have written another Windows Vista Gadget, this time at the request of Darryl Burling who works for Microsoft New Zealand. He asked if I could turn the RSS feed on the Grab A Seat site into a gadget. The gadget I have written requests the feed every 5 minutes and just displays what is available, never actually storing the feed but just consuming it. The items in the list are removed when no seats remain for that promotion.

You need to be quick as there have been some fares from Auckland to Los Angeles for $498 return and the also Auckland - Shanghai return for $498.

Domestic fares don't run out as fast as the international, but I did notice the other day that the fares had changed by 2am so the early bird will get the seat in this case.

So what is Grab A Seat?, well as far as Air New Zealand is concerned it is this “Ludicrously low fares up for grabs“

To learn more about the Air New Zealand promotion see http://www.grabaseat.co.nz

What the gadget looks like:

With the flyout open it looks like this:

You can download it from my Windows Live Gallery profile:
http://gallery.live.com/Author.aspx?a=290b49b8-95bc-49a1-b4fe-919b6ea4edd5&l=1

What you need to know: These fares are only available online for one day only or until sold out. Seats are strictly limited - see the online 'counter' for the number of seats left. Travel periods are strictly limited and fares may not be available on all flights or days during stated travel period. Flight restrictions and routing restrictions apply. Prices are per person, child discounts do not apply. General terms and conditions and Smart Saver and/or Global Saver Max terms and conditions apply.


Running NTBackup on Windows VISTA

I came across an interesting message in a forum and tried it out and it works.

I was very annoyed that NTBackup was removed from Vista. The new backup solution just does not give me flexibility I want. So I went and figured what files you need from XP to run NTBackup on Vista. Turns out that you need the following files which all exist in c:\windows\system32

ntbackup.exe
ntmsapi.dll
ntmsdba.dll
vss_ps.dll
vssadmin.exe
vssapi.dll
vssvc.exe

You do get a popup when starting it still, but it all works. You can then also associate BKF files with ntbackup.exe to give them the NTBackup icon and there you go!

On your vista machine create a folder and place all files in there.

Note: When you use the NTBackup to schedule a task it just called NTBACKUP.EXE so if it is not part of your path you will need to edit the scheduled job otherwise it won't run.

 

http://www.neowin.net/forum/lofiversion/index.php/t513969.html

 


Windows Vista Gagdet - Example of talking to SQL Server

I have created a simple example of a Windows Vista Gadget that will talk to SQL Server using OLEDB with ADO.

This code is very similar to code that one would have used in the past with writing code for ASP pages.

The code is written in Javascript and DHTML.

Basicall the code works like this:

The gadget has an HTML body tag and we assign an onload event to it to trigger our Javascript code which will talk to SQL Server and render all the categories from the Northwind database.

<body scroll="no" onload="loadMain()">

Our simple code in the loadMain event is as follows:

function loadMain()
{
var
serverName = "server";
var database = "northwind";
var username = "sa";
var password = "-";

if (password == "-")
{
data =
"this is a sample - please configure the servername, database, username and password variables in \\js\\sql.js";
}
else
{
    var oSqlConnection = new ActiveXObject("adodb.connection");
    oSqlConnection.open(
"Provider=sqloledb;Data Source=" + serverName + ";Initial Catalog="+database+";User Id="+username+";Password="+password+";");
   var oRecordSet = oSqlConnection.Execute("SELECT CategoryID, CategoryName from Categories");  
   var data = "";
   while (oRecordSet.eof == false)
   {
        data = data + oRecordSet(1) +
"
"
;
        oRecordSet.moveNext();
    }
   oRecordSet.close(); 
   oSqlConnection.close();
   }
    document.getElementById(
"data").innerHTML = data;|
}

This code shows a simple way to to talk to SQL Server, run a query and then render the results to an HTML tag.

You can download this code from here

For you to run this code there are a few things you will need to do first.

  1. Have a SQL Server available which has the Northwind database ( you can change the connection string and query )
  2. Change the server variable to the server that is running SQL Server
  3. Change the database if required
  4. Chnage the username if required
  5. Change the password

This is just an example and is really up to you how you may use it. I hope it helps with your gadget development.


A great colour wheel for those of us who must deal with colours and combinations of colours.

I came across a great tool for looking at colours and their complimentary colours, infact six types of compilimentary colours.


Place this HTML Color Code tool on your website free. | Professional Turnkey Websites

 

As you can see you can use the colour wheel live on this site, but you may also want to check out the site owners site at http://www.siteprocentral.com/html_color_code.html

This is a great tool and I hope people will find it usefull.


Windows Vista Gadgets

I have been playing aroung with Windows Vista Gagets lately and have currently written about 10. Some are for my work - simple things like who is on Helpdesk duty today, and another for our IS Severity system that will show up planned outages and unplanned outages, colour coded based on the rating of the problem. This is similar to an RSS feed except the data is always live and not cached so that when a job is closed it is removed from the list.

Another is the Weather Gadget for http://weather.cobbnz.com, a collegue at works owns the site and I have written the Web Site UI and a few tools. This has become quite popular in the last few days since it was uploaded to http://gallery.live.com

Another 5 are simple radio station gadgets for New Zealand radio stations News Talk ZB, Radio Pacific, MoreFM, ZM, and RDU.

 The weather and the radio station gadgets are all available from live.com and clicking on my profile link will take you to a page where they all are.

My Gadgets
http://gallery.live.com/Author.aspx?a=290b49b8-95bc-49a1-b4fe-919b6ea4edd5&l=1

For those looking into writing your own gadgets see these resources

Hint: If you want to see the source for any gadget, download it, and then rename from .gadget to .zip and you have all the source code.