How to install Webpublisher on 64-bit IIS 7

by Peter Tyrrell Friday, May 02, 2008 5:37 PM

Further to my post called Webpublisher on Windows Vista, here is how to install Inmagic Webpublisher on IIS 7 in a 64-bit environment such as Windows Vista x64 or Windows Server 2008 x64.

These instructions are valid for DB/Text Webpublisher as well as CS/Webpublisher. Steps 1 - 5 are valid for 32-bit IIS 7 as well.

1. Ensure IIS is enabled

This screenshot shows which IIS features are enabled on my Vista x64 machine. The highlighted one is particularly important (IIS metabase and IIS 6 configuration compatibility).

iis7_vista_features_on

2. Install Inmagic Webpublisher

Follow the usual Inmagic install instructions.

3. Enable ISAPI-dll handler mapping on dbtw-wpd or ics-wpd virtual directory

Open the IIS Manager.

Open the Handler Mappings for the dbtw-wpd or ics-wpd virtual directory. (Figure below shows dbtw-wpd.)

dbtw-wpd

The ISAPI-dll handler is disabled by default.

isapi-dll_disabled

Enable the ISAPI-dll handler: right-click it, choose "Edit Feature Permissions", and check the "Execute" box. Click OK.

isapi-dll_enabled

4. Set the Webpublisher dll as an allowed restriction

In the IIS Manager, click on the machine root - this is the top level of the tree in the left column, which shows the machine name. You should see a number of machine-level features, including "ISAPI and CGI Restrictions", as below. If you do not see "ISAPI and CGI Restrictions", you have not properly enabled IIS settings in step 1.

machine_root

Open ISAPI and CGI Restrictions.

You may see Inmagic Webpublisher as an allowed restriction already. The path will point to the install location of dbtwpub.dll or icswppro.dll, depending on which version of Webpublisher you installed.

If you do not see Inmagic Webpublisher as an allowed restriction, you must add it. (Figure below shows DB/Text Webpublisher.)

add_restriction

5. Create an application pool for Webpublisher

Open Application Pools from the IIS Manager.

Add a new application pool to be used with Webpublisher, called "WebpublisherAppPool".

wpp_apppool

Go to the dbtw-wpd or ics-wpd virtual directory and open its Advanced Settings. Set the Application Pool to the new WebpublisherAppPool just created.

6. Enable 32-bit applications on the Webpublisher application pool

Open Application Pools from the IIS Manager.

Right-click on WebpublisherAppPool and select Advanced Settings.

Set "Enable 32-Bit Applications" to true. Click OK.

apppool_enable32bit

7. Get a drink. You're done.

Whatever drink you like. I like red wine, or on a hot day, gin and tonic.

Some more explanation

Whereas in IIS 6 you could run worker processes in either 32-bit or 64-bit mode, but not both, IIS 7 can run 32-bit and 64-bit worker processes simultaneously. And, as the above instructions make implicitly clear, you can set this behaviour on individual application pools.

 

Empty the inbox faster in Outlook

by Peter Tyrrell Wednesday, April 30, 2008 9:59 AM

Some great tips for getting things done faster in Outlook, from Lifehacker: http://lifehacker.com/381966/tweak-microsoft-outlook-to-empty-your-inbox-faster.

image

I implemented (and love) the Alt+2 keyboard shortcut to file inbox messages to other folders. I'm recouping valuable seconds per day here!

Tags:

Webpublisher search within search

by Peter Tyrrell Tuesday, April 22, 2008 9:46 AM

I made a working search-within-search for Inmagic Webpublisher a few months back, with the help of the wonderful mootools javascript framework, which makes object-oriented javascript easy. And fun!

Overview

The results page has a 'search within results' textbox. Search text entered there is combined with the initial search to create a brand new query.

The initial search form is serialized to a cookie, or, if the user came to the results via a GET request (canned query), the query string is parsed.

The script in action

The method which serializes a search form looks like this. Four lines: nice and neat.

   1: function SaveQuery(formObject)
   2: {
   3:     var oForm = formObject;
   4:     if (!oForm)
   5:     {
   6:         oForm = document.forms[0];
   7:     }
   8:     var formQuery = decodeURIComponent($(oForm).toQueryString());
   9:     var oQuery = new WebPublisherQuery(formQuery);
  10:     oQuery.saveToCookie(oQuery.cookieName(), {path: "/"});
  11: }

The method that handles the 'search within results' on the results page goes like this. It's a little longer to handle cookie/no-cookie, but still pretty easy to follow.

   1: function Subsearch(searchText, textbase)
   2: {
   3:     var oQuery = new WebPublisherQuery();
   4:     var isCookie = oQuery.loadFromCookie(textbase + "QueryTracker");
   5:     if (isCookie == false)
   6:     {
   7:         if (window.location.search == "")
   8:         {
   9:             return false;    
  10:         }
  11:         var windowQuery = decodeURIComponent(window.location.search.substr(1));
  12:         oQuery.loadFromQuery(windowQuery);
  13:     }
  14:     var subquery = new WebPublisherQueryGroup(searchText, {fields: oQuery.getFields()});
  15:     oQuery.addSubquery(subquery);
  16:     oQuery.saveToCookie(oQuery.cookieName(), {path: "/"});
  17:     
  18:     var query = oQuery.toQueryString();
  19:     var rawUrl = window.location.href.indexOf("?") == -1 ? window.location.href : window.location.href.substring(0, window.location.href.indexOf("?")); 
  20:     window.location.href = rawUrl + query;
  21: }

Of course the real power is in the WebpublisherQuery object, which is a javascript class that does all the heavy lifting.

As with all our Webpublisher scripts, this one is released under an open source MIT license. No documentation. The mootools framework is included in the file.

Download the beta: AndornotUtilities_Subquery_0_2.js

I appreciate any feedback, bug reports, etc. We can also assist with implementation if required; contact us at: info@andornot.com.

 

Andornot releases selected Inmagic WebPublisher PRO enhancement scripts under open source license

by Peter Tyrrell Monday, April 21, 2008 3:15 PM

Andornot is pleased to announce that many of our scripts for use with Inmagic WebPublisher PRO are now available under an MIT open source license. Anyone is now free to use reuse, redistribute, modify etc. these scripts as long as the following license text is retained.

Copyright (c) 2003-2008, Peter Tyrrell and Andornot Consulting Inc.

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

Neither the name "Peter Tyrrell" nor "Andornot Consulting Inc."
may be used to endorse or promote products derived from this software
without specific prior written permission.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

Check out our demo site at http://ask.andornot.com and view source to get the path to these scripts for enhancing search and display pages. Calls to these scripts will need to be made from forms using either the Inmagic DB/Text or CS/Text Form Designer.

If you need assistance implementing these scripts, this can be arranged through a consulting contract with Andornot. Contact us for more information and pricing. Alternatively, many of our add-on products such as our Starter Kits include sample query screens and forms with the scripts already incorporated.

Never be clever

by Peter Tyrrell Monday, February 25, 2008 3:51 PM

When programming, if you don't fully understand some technique, do not use it. And don't mistake intellisense for intelligence.

Case in point.

I wanted to know whether a particular barcode was contained in a list of barcodes. If not in that list, add to another list:

string barcode = "12345";
int index = barcodeList.BinarySearch(barcode);
if (index < 0)
{
    otherList.Add(barcode);
}

Ooh, binary search. Visual Studio intellisense reports:

List<T>.BinarySearch(T item): Searches the entire sorted List<T> for an element using the default comparer and returns the zero-based index of the comparer.

Sounds good to me. Sign me up!

One teary-eyed debugging session later, as barcodes are being reported NOT found that SHOULD be found, I learn the full truth from MSDN:

BinarySearch() return value is the zero-based index of item in the sorted List, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, the bitwise complement of Count.

Oh... shazbot.

Why didn't I just use List.Contains?

string barcode = "12345";
if (!barcodeList.Contains(barcode))
{
    otherList.Add(barcode);
}

Because. I am an idiot.

 

Tags:

Month List