Tuesday, September 6, 2011

ISAPI Rewrite 3.0 Lite and IIS 7.5 Problems Bypassed With Microsoft URL Rewrite

I have used both free and purchased licenses of  Helicon Tech's ISAPI Rewrite product for years. The Apache mod_rewrite (httpd / htaccess) syntax took some getting used to, but support staff (especially Anton Yaroslav) are fantastic. The forums are very active and have volumes of answered questions.

Unfortunately, their product's future took a bit of a blow today in my shop when I ran into problems installing ISAPI Rewrite 3.0 Lite (0086) on a 64-bit Windows 2008 R2 Server running IIS 7.5.7600.16385. When I would look at the site using the Helicon ISAPI Manager, it would say:
"No properties available for this node."

I found this thread in the forums:
http://www.helicontech.com/forum/13011-No_properties_available_for_this_node.html

... which addressed this issue for people running version 0069. Support said that the problem was resolved in version 0070, but I was running version 0086 and it still wasn't working. I downloaded 0070 to see if that might help, and it didn't. The final word from Helicon was to buy their $100 APE product because it works better with IIS 7.5. That news sent me Googling for other solutions.

Microsoft URL Rewrite Filter Module

Imagine my surprise when I discovered that Microsoft had a free URL Rewrite product of their own! (It was a relief, but also sad that it might spell the end of my long-standing relationship with Helicon.)

Using Microsoft URL Rewrite

Available here: http://www.iis.net/downloads/microsoft/url-rewrite

This is my first install of URL Rewrite, so I thought I'd create this post as a way to remember what I did.

Once installed, a new icon called "URL Rewrite" will appear in the IIS section of the IIS Manager

image

I want to write a rule in the mod_rewrite syntax that I am familiar with, so double click URL Rewrite, and then click "Import Rules" in the right-side menu to open the mod_rewrite rules dialog.
 image
My goal was to force HTTP to HTTPS for all sites on the server, so I used this mod_rewrite code:
http://forums.iis.net/t/1149780.aspx
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Pasting that code into the "Rewrite rules:" window produced converted rules instantly.

image
Right click on the line and choose "Rename" to rename the rule. (You can also do this after creating the rule.)

On first test, the filter did not appear to be working. The same thread that discussed using mod_rewrite code also covered the problem I was having: http://forums.iis.net/t/1149780.aspx

Under SSL Settings, "Require SSL" has to be unchecked. When it is checked, the http request won't make it to the ISAPI filter to be redirected.
 image
After that, it worked like a charm!

Reference:

Microsoft URL Rewrite Filter Module for IIS 7.x
http://www.iis.net/download/URLRewrite
Apache mod_rewrite home
http://httpd.apache.org/docs/current/mod/mod_rewrite.html
IIS.net "http redirect" thread:
http://forums.iis.net/t/1149780.aspx
IIS.net Configuration Reference: ISAPI Filters
http://www.iis.net/ConfigReference/system.webServer/isapiFilters

Helicon ISAPI Rewrite 3.0 download page (most recent version)
http://www.helicontech.com/download-isapi_rewrite3.htm
Version 0086 x64
http://www.helicontech.com/download/isapi_rewrite/ISAPI_Rewrite3_0086_Lite_x64.msi
Version 0070 x64
http://www.helicontech.com/download/isapi_rewrite/ISAPI_Rewrite3_0070_Lite_x64.msi


Tuesday, August 16, 2011

eWallet: Clearing Recently Used Wallets

This isn't exactly a web development post, but it really bothers me that eWallet has a "Recently Used Wallets" section that doesn't have any sort of aging. After a period of disuse, wallets should fall out of the "Recently Used" category, no?

The Ilium tech support section offers this unhelpful response:
http://www.iliumsoft.com/site/support/kb/idx.php/18/504/article/
image
Uninstalling and reinstalling eWallet?! Give me a break.

On Windows 7, just go to
%localappdata%\Ilium_Software,_Inc\

The only entry should be a single subfolder that has a name like:
eWallet.exe_StrongName_1234567890abcdefghijklmnopqrstuv

Click into that subfolder and you should see folders arranged by version number. Open the most recent.
For example, if you see

image
choose 7.2.0.30586

In the most recent version folder, you will find user.config, which contains (among other things) Recently Used Wallets. The user.config file is an XML document with plain English labels, so it is not hard to navigate. Look for "RecentWallets" and delete the offending string elements.
image

The next time you restart eWallet, the entries will be gone!

Tuesday, August 9, 2011

Notepad++ for ColdFusion

Update 10/30/2013:
The nppColdFusion plug-in no longer works as of Notepad++ 6.x.x. The notepad++ folks changed the way plugins hook into the app. Ben Blumel stopped developing nppColdFusion in May 2012. If you use the installer links and instructions below for the earlier Notepad++ version, everything still works.

I have been a devoted user of Textpad for several years as a quick alternate to Dreamweaver, but have been frustrated lately with its 60+ second load time when using network paths. I was reading an article about Adobe Edge today and noticed a number of people mentioning Notepad++ in the comments, so I decided to check it out. Tweaking it for my needs was not 'out of the box'. So this is a recap of what I did:

Download the following:
Notepad++ 5.9.3
Download Page:http://notepad-plus-plus.org/download/v5.9.3.html
Installer: http://download.tuxfamily.org/notepadplus/5.9.3/npp.5.9.3.Installer.exe

nppColdFusion plug-in (Ben Blumel)
Download Page: https://bitbucket.org/bbluemel/nppcoldfusion/downloads
Archive: https://bitbucket.org/bbluemel/nppcoldfusion/downloads/nppColdFusion-0.7.1.zip

sqlLite dll (Required by nppColdFusion)
Download Page: http://sqlite.org/download.html
Archive: http://sqlite.org/sqlite-dll-win32-x86-3070701.zip

Installation
  • Install Notepad++ (this is straightforward)
  • Extract nppColdFusion.dll from nppColdFusion-0.7.1.zip and place it in the %programfiles%\Notepad++\plugins folder
  • Extract nppColdFusion.db3 and nppColdFusion.xml from nppColdFusion-0.7.1.zip (/Config folder) and place them in the %appdata%\Notepad++\plugins\config folder
  • Extract sqllite3.dll from sqllite-dll-win32-x86-3070701.zip and place it in the %programfiles%\Notepad++ folder
  • Open (or Restart) Notepad++
At this point your Notepad++ installation has ColdFusion code hints and coloring. 

image


...but if you're like me, you might like to see a directory tree on the left.

Configuration (Directory Tree)
  • Click [Plugins] --> [Plugin Manager] --> [Show Plugin Manager]
    • If you are behind a proxy, open a CMD.exe window as administrator and execute the following:
      • C:\Program Files (x86)\Notepad++\updater\gup -options
    • Enter proxy and port information and click [Ok]
    • In Plugin Manager, click settings. 
    • For authenticating proxy, enter proxy address in the format: username:password@proxyaddress and click [OK]
  • Scroll down to "Explorer" and check it. Click [Install]
  • When prompted, click [Ok] to restart Notepad++. When Notepad++ comes up, the file tree is hidden by default.
  • Click [Plugins]. Notice that [Explorer] is now an option
image
  • Click [Plugins]-->[Explorer]-->[Explorer...] and the file tree appearsimage

Enjoy!

Monday, September 20, 2010

Windows Aero Preview Thumbnails for Firefox Tabs

image

One of the cooler toys that came with Windows Vista/Windows 7 was the app preview from the task bar.

Mouse over an open program like windows explorer and a preview of the app appears in thumbnail form. This feature is especially handy with apps like Internet Explorer, which can have many tabs open simultaneously. A preview window opens for each tab in IE.

image
By default, Firefox does not enable this feature; it only displays one thumbnail with the current page running. Frustrated by this limitation, I stopped using tabs so each page would open in a separate window. Each window appeared as a separate thumbnail, but losing the tabs within Firefox felt a little too... last decade. Fortunately a quick google search pulled up the solution.

Firefox can enable the windows aero thumbnails for each tab through a configuration option. In the address bar, type about:config.




image
In the filter, type browser.taskbar.
 image
Double-click on the browser.taskbar.previews.enable line (bold above) to toggle the value to true.

I had to restart Firfox to get the change to work, but now it shows thumbnails for all open tabs just like IE. image

Enjoy!

Monday, March 1, 2010

Subversion and SCPlugin for Mac Behind Authenticating Proxy




image I have been using subversion at work for about a year now. I opted for the common repository server model with VisualSVN Server. VisualSVN Server was a free product that has branched into a free and pay model. The free version has enough to keep a small-time user like me perfectly happy.

We use TortoiseSVN on for PCs and SCPlugin for Macs. TortoiseSVN is amazing - a model for the open source community. SCPlugin is the closest free product I could find for the Mac. It is not as robust as TortoiseSVN, but it works well enough.

Our Macs and PCs are behind a proxy. SCPlugin installs just fine, but we would get this error message when trying to connect to a repository (see fig1).

image


fig 1. Subversion error: OPTIONS of 'repo name': could not connect to server (svn server)


In September of last year, I contacted the author of SCPlugin about this and he said:

SCPlugin does not provide GUI access to the configuration. SCPlugin uses the core Subversion configuration. On UNIX systems, like OS X, it's in the user's home directory, in

~/.subversion/config and
~/.subversion/servers

I found the proxy info I needed in the servers file. After a little experimentation, I was able to provide these instructions to my Mac users:


  1. right click on the finder and "open folder". type: ~/.subversion

  2. In the subversion folder, you should see a file called 'servers'. Double click "servers" to edit the file.

  3. In the servers file, you'll notice a lot of the lines start with #. The pound sign signifies a comment. Just about all of the lines should be commented out.

  4. Immediately beneath the [groups] section type:
    1. somegroupname = subversion.server.name
  5. Create a new group called [somegroupname] and add the following lines beneath it
    1. http-proxy-host = {your server's IP address}
    2. http-proxy-port = 80
    The config file should look similar to this:
    [groups]
    somegroupname = subversion.server.name
    #group1 = *.collab.net
    #othergroup = repository.blarggitywhoomph.com
    #thirdgroup = *.example.com

    [somegroupname]
    http-proxy-host = 123.222.21.1
    http-proxy-port = 80
  6. Scroll down to the bottom of the file and add the following lines to the [global] group
    1. http-proxy-username = {username}
    2. http-proxy-password = {password}
    3. http-compression = no
    4. http-auth-types = basic;digest;negotiate
    The config file should look similar to this:
    ### 'ssl-authority-files' is a semicolon-delimited list of files,
    ### each pointing to a PEM-encoded Certificate Authority (CA)
    ### SSL certificate. See details above for overriding security due to SSL.
    [global]
    http-proxy-username = totallyunsecure
    http-proxy-password = plaintextpassword
    http-compression = no
    http-auth-types = basic;digest;negotiate
    #http-proxy-exceptions = *.exceptions.com, www.internal-site.org, ...
  7. Save the servers file

  8. Test by trying to check out a file with your subversion username and password.

Monday, February 22, 2010

Windows-based On Screen Ruler Reviews: Pixel Ruler and Window Ruler

When you're trying to size elements for a template-based CMS, third party hosted web-app, or any system that wraps or otherwise controls your layout (like Blogger), having an on-screen ruler is invaluable.

Mioplanet Pixel Ruler v4.0

image
Note: Jan 24, 2014 The mioplanet website is no more. Just Google/Bing to find pixel ruler. Lots of reputable software repeater sites carry their products including CNET http://m.download.cnet.com/Pixel-Ruler/3000-12565_4-75312528.html

I have used Pixel Ruler from mioplanet for a few years now. As you mouse around a white box pops up with the position of your cursor in relation to the ruler ("49" in the image above.) A simple control on the left allows you to toggle between horizontal and vertical ruler position. Pixel Ruler does the job, but lacks nice-to-haves like snapping to on-screen objects, transparency and even marking positions on the ruler itself.

Pixel Ruler is free, but as of v4.0, a nag will appear at the 50th use to contribute $5.

Hexagora Window Ruler v1.1 r9

image
A few months ago, I rebuilt my laptop with Windows 7 and started reloading all of my tools. Since Pixel Ruler was several years old and essentially unchanged, I Binged around the internet in hopes that someone filled the feature vacuum left by Mioplanet. Enter Hexagora. The Hexagora "Window Ruler" is a quantum leap ahead of Pixel Ruler.



Window Ruler shows horizontal and vertical measurements simultaneously. While it does not show current mouse position, it allows quick resizing by dragging the ruler ends.
image
Fig 1. The upper left hand corner is left open for easy alignment of partially covered objects.

In a clever move, the join between horizontal and vertical rulers not squared (Fig 1). The missing right triangle coupled with the transparency make it very easy to line the ruler up with objects that are partially covered. White dashes complete the bottom and right legs of the rectangle. Window Ruler also has a handy snap feature. If you drag the red ball inside a window, the ruler will snap into position, automatically aligned with the window's edges.

A tray icon allows for quick activation/deactivation of the ruler with a left click. Right clicking opens up a menu of preset ruler sizes and quite possible the coolest feature - a screen shot. Window Ruler can screen capture the region immediately inside the ruler.


As with any application, there is room for improvement. The Pixel Ruler style mouse markers along the ruler would allow for quick mouse-point measurements. As it is, we have to resize the ruler to measure an object precisely. The measurement values inexplicably show decimal values to the hundredths when measuring pixels. Also, the tiny black numbers tend to disappear in the lower right hand corner. An option to move the numbers to the top of the horizontal ruler would be nice. Come to think of it, a few display options for the dashed lines and measurement values would be nice. 1) Turn off the dashed line and values, 2) show dashed line and values, 3) draw intersecting lines from each corner of the rectangle, and put the measurement values to the right of the intersection (see Fig 2). Finally, the screen capture feature grabs the dashed lines and the measurement values. I should be able to turn this off and capture image beneath the ruler only.


image

Fig 2. My concept of an alternate height x width display for Window Ruler


As it is, Window Ruler is a fantastic product. If you need quick on-screen measurements, it is a ridiculously convenient tool.

DISCLOSURE:
I am in no way affiliated with either Mioplanet, Hexagora or any other business with an interest in these companies or these products. In fact, I am not compensated in any way for my blog. 



Thursday, February 18, 2010

Cut and Paste Photos into Blogger (and others) with PicturePaste

The Joy of Disseminating Knowledge
I really enjoy writing tutorials. There is no better way to cement a new skill than by presenting it to others. Outlook has been a fantastic tool for composing these tutorials because I could insert and position screen shots as I went along; but it fails horribly as a means of distribution. You have to send to a specific audience and hope that the recipients read, retain and refer to it later.

I started this blog almost two years ago because I wanted my tech tutorials to reach a broader audience. I was very disappointed to see how difficult it was to add screen shots to a post! The entry on July 16, 2008 regarding database duplication took HOURS to compose even though I was building that blog entry from an Outlook email that I had written.

The Pain of Uploading Images
I had to copy, reformat, and save the images, then upload them to my site and code the images into the blog. If you visit the post, you’ll see that the images are cut off on the right side because they are slightly larger than 400px.

I was instantly disillusioned and abandoned the blog after a few more posts.

Still Can't Paste Images From the Clipboard
It is now February and I see that Blogger's image upload still does not present a way to paste an image from the clipboard into the editor. Surely others are as frustrated by this as I am! I'm going to Bing around to see if I can find a solution.

PicturePaste
I truly hope that this is my answer. I just downloaded the trial version of PicturePaste. My first attempt to use it follows:

This is a screen capture of the PicturePaste website made with TechSmith Snagit. (I love the torn page edges ;)
image
It works! Now I am curious to know how they are doing this. I am familiar with the nifty FireFox trick that allows you to paste base64 images directly into the body of an HTML page, but this is not supported in IE... I have seen a solution for IE, but it involves PHP, so I'm sure that is not in play with PicturePaste.

At first blush, PicturePaste is ridiculously easy to use. If this is a cross-browser solution, I'll be bouncing off the walls! If not, I'll post a quick wrap-up and will keep looking.

---- UPDATE #1 ----

Awesome! The images work with every browser! When you copy an image to your clipboard, it appears in the PicturePaste window.
image
As soon as you click the [Convert] button, it uploads the image to a spot in the Amazon cloud. Then just drag the red rectangle to your post and there it is!
image

Your PicturePaste is assigned a unique user ID that serves as the folder name, and the image is given a unique name.

image
The trial version is free, so definitely give this a try! The trial expires after 50 images, which is more than enough to see how cool PicturePaste really is. At the time of this writing, the cost is US$29.95. Paypal is accepted.

Limitations
According to the PicturePaste FAQ, the drag and drop feature does not work in Opera. There is also a bug with FireFox 3.5 and Yahoo! mail that makes PicturePaste behave unpredictably. Mac browsers do not support the drag and drop capability, so this is for Windows only.

DISCLOSURE:
Since rah-rah posts like this whip internet cynics into a frenzy, I can truthfully say that I am not connected to PicturePaste in any way. In fact, I hadn't even heard of the product until a Bing search brought it into view after I was several paragraphs into this post.

---- UPDATE #2 ----
I found a pretty cool feature. I noticed a 'maximum size' option in the screen shot above. I forgot that Blogger needs images 400px wide or smaller. The max is set to 500px by default so my first screen shot was cut off on the right. A quick change to 400 and the image automatically shrunk to the right size. Drag, drop, done. This thing is so cool!

---- UPDATE #3 ----
I wasn't expecting this... Look at this screen shot of Word below. I highlighted and copied the text so I could paste it into Blogger, and look what happened inside the PicturePaste window! My text is in there!
image

I did a few tests and sure enough, it preserves font size and style integrity. I am really blown away by this little app!
image