Welcome to Dovetail Software Blogs : Sign in | Join | Help
Installing a ASP.Net MVC web application on IIS6

Getting ready to release Dovetail Mobile Agent I am working on what our installation story will look like. I want to keep things simple (for me) right now because it is currently tricky to support IIS6 and IIS7 using a Wix based windows installer. For the documentation I am compiling a list of operations to get what is essentially a ASP.Net MVC web application up and going on different web servers.

Later we may later add an installer that encapsulates this pain but right now it is just too darn hard to do this well using Wix. Do you hear me Microsoft?

Getting Down With The Basics

Install the .Net 3.5 Framework.

Copy web application files to a directory our your web server.

Create a Virtual Directory using Internet Information Services Manager that points to this directory.

ASP.Net needs to be enabled.

  • Using Internet Information Services  Manager click on Web Service Extensions. Web Service Extensions
  • Make sure the ASP.NET v2.0 web service extension has a status of Allowed.  
  • If this web service extension is not present you need to register ASP.Net with IIS.
    1. Open Command Prompt (cmd.exe).
    2. Change directory:
      • 32-bit: change directory to: %system root\Microsoft.Net\Framework\v2.0.50727\aspnet_isapi.dll
      • 64-bit: change directory to: %system root\Microsoft.Net\Framework64\v2.0.50727\aspnet_isapi.dll
    3. Run “aspnet_regiis.exe –i”.
  • If the web service extension is not allowed right click on it and select Allowed to enable ASP.Net.

Your virtual directory needs to specify ASP.Net as a Wildcard application map.

To get pretty URLs to work with IIS6 you need to add a wildcard application map which basically pushes all web requests through the ASP.Net application pipeline.

  • Right click on your web application and click on view Properties 
  • Select the Virtual Directory tab and click on Configuration. 
  • Under "wildcard application maps" click on the Insert button. Application Configuration
  • In the "Executable" text box enter a path the ASP.Net ISAPI dll.
    • 32bit: "%system root%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll"
    • 64bit: "%system root%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll"
  • Make sure that the "Verify that file exists" is Unchecked. Application Extension Mapping
  • Click OK on all open dialogs to save these changes.

One last Dovetail centric thing

For Dovetail applications like Dovetail Mobile Agent that use the Dovetail SDK we recommend that you give the web application a dedicated Application Pool.

Virtual Directory Properties

Test out your Web Application

Just making sure everything works…

image

Email Agent 1.5 Heads Up

This post is for my readers who are Dovetail Email Agent customers. We are getting ready to release Email Agent 1.5 which contains some breaking changes that Gary Sherman has already posted about. I wanted to give our customers a heads up of what has changed to facilitate upgrade planning.

Below is a draft of the “What’s New” from Version 1.5 this may change so remember to check your local listings for more details.

Breaking Changes

Email Agent now logs "Email In" events to a case rather than logging a note. This change will mainly affect customers using our Rule Manager product having business rules that are setup to fire on "Log Notes" events, in particular those that are meant to capture "Log Notes" events created by Email Agent. Affected business rules should be changed to include a start event of "Email In".

To avoid confusion the name of configuration settings and template files related to Note Logs have been renamed to represent the move to creating Email In Logs.

Configuration Setting Changes

Basically every setting that mentions "LogNote" now says "LogEmailIn".

  • allowFreeFormLogEmailIn changed to allowFreeFormLogNote
  • reopenCaseToLogEmailIn changed to reopenCaseToLogNote
  • allowLogEmailInToClosedCases changed to allowLogNoteToClosedCases
  • allowLogEmailInToClosedSubcases changed to allowLogNoteToClosedSubcases
  • sendLogEmailInSuccessReply changed to sendLogNoteSuccessReply
  • <logCaseEmailInExtraFields/> changed to <logCaseNoteExtraFields/>
  • <logSubcaseEmailInExtraFields/> changed to <logCaseNoteExtraFields/>
Template File Name Changes
  • FreeformCaseNoteFailure.xslt changed to FreeformCaseEmailInFailure.xslt
  • FreeformCaseNoteSuccess.xslt changed to FreeformCaseEmailInSuccess.xslt
  • FreeformClosedCaseNoteFailure.xslt changed to FreeformClosedCaseEmailInFailure.xslt
  • FreeformSubcaseNoteFailure.xslt changed to FreeformSubcaseEmailInFailure.xslt
  • FreeformSubcaseNoteSuccess.xslt changed to FreeformSubcaseEmailInSuccess.xslt
  • FreeformWontLogNote.xslt changed to FreeformWontLogEmailIn.xslt

Also, please be aware that the version of the Dovetail SDK being used by Email Agent has been updated to supply the new Email In logging functionality.

Automating Multi-Platform Database Integration Tests

When you have to support multiple database platforms it can be challenging to automate integration tests against more than one DBMS. Dovetail is using build automation driven by with NAnt and virtual machines running on VMWare Server to automate the setup and execution of our integration test suite against multiple versions of Microsoft SQL Server and Oracle databases. I want to share some of the lessons learned from our journeys along the way .

Integration Tests

Make your integration tests data driven. If at all possible setup your tests so that they create their own test data. Tests responsible for their own data setup are simply less fragile. A lot of dev cycles got wasted trying to understand why a test is failing that was caused by one test messing up the data another was dependent on.

Automate automate automate. We use NAnt to build our application, run our unit and integration tests, create the installer, and ship the product to test and production, this includes copying the documentation out to our public web site. Having all this in place, makes it easy to add just one more step to test the build against different databases.

Use Continuous Integration (CI). It doesn’t always work on another person’s machine. Getting your build automated is the first step. Having your build do a test run on every check in on a non-developer machine is priceless. We currently use a mix of CC.Net (Cruise Control) and TeamCity.

Commit your build scripts and CI configuration to source control.

Try to make sure that your builds do not step on each other. Since version 1.3 CC.Net has an integration queue feature which is quite handy.

Virtual Machines Rock

VMWare’s revert to snapshot feature is your friend. A snapshot is a spot in time for that Virtual Machine that you can rollback to. It is that perfect moment in time where everything you want on a machine is setup, booted, and ready for your tests to run. Once you have a snapshot in place you can remotely tell a VMWare server to revert to snapshot using a command line tool called VMRun. Here are the NAnt targets that I use to tell a remote virtual machine to revert to a snapshot and when all done stop the virtual machine. 

<property name="vmware.vmrun" value="${tools.dir}/VMWare/vmrun.exe" />
<property name="vmware.authentication" value="-h vmserver.mycompany.com -P 902 -u __account_name__ -p __account_password__" />
 
<target name="setup-oracle9-virtualmachine">
    <property name="virtualmachine.path" value="c:\Virtual Machines\2k3-oracle9i\2k3-oracle9i.vmx"/>
    <setenv name="path" value="${oracle9.client.path};%PATH%" />
    <exec program="${vmware.`}" commandline="${vmware.authentication} revertToSnapshot &quot;${virtualmachine.path}&quot;"/>
    <property name="nant.onsuccess" value="teardown-virtualmachine"/>
</target>
 
<target name="setup-oracle10-virtualmachine">
    <property name="virtualmachine.path" value="C:\Virtual Machines\2k3-oracle10-unicode\2k3-oracle10-unicode.vmx"/>
    <setenv name="path" value="${oracle10.client.path};%PATH%" />
    <exec program="${vmware.vmrun}" commandline="${vmware.authentication} revertToSnapshot &quot;${virtualmachine.path}&quot;"/>
    <property name="nant.onsuccess" value="teardown-virtualmachine"/>
</target>
 
<target name="teardown-virtualmachine">
    <exec program="${vmware.vmrun}" commandline="${vmware.authentication} stop &quot;${virtualmachine.path}&quot;"/>
</target> 

If you can’t get VMRun to talk to your Virtual Machine Host.  Try disabling TCP chimney.

Keep backups of your virtual machines. It takes a long time to setup an VM, install the database, and get it just the way you want it. Things go wrong. Snapshots can get wedged by VMWare. Someone could remote to your VM and mess it up. You will want a copy of that known good version of your VM. Trust me.

Get yourself a dedicated fast virtual machine server. We have a quad processor server with speedy hard drives and lots and lots memory running Windows 2003 64bit. This thing can host 8 virtual machines simultaneously without a hiccup. I recommend getting the fastest hard drives you can afford.

Not all is perfect

I have been running this type configuration for multi-platform testing for sometime. It has a set of troubles that plague us:

  • NAnt is often too darn much XML and takes experience and time to perfect long running automation scripts.
  • We have too many integration tests and they take a long time to run.
  • Sometimes the build will fail for no good reason. Sometimes it is Oracle. Sometimes it is a virtual machine revert to snapshot failure. Sometimes is random cosmic rays from the phantom zone that cause false build failures. These are very frustrating.

What did I miss? What do you want to know more about?

Installing Dovetail Classic ASP Web Applications on IIS7

Here at Dovetail I recently started developing on a Windows Server 2008 64bit OS. Today I wanted to install Dovetail Agent as a web application on IIS7. I ran into a few problems. After gnashing my teeth for a bit I found a path to goodness. My biggest problem was 64bit related. I hope this post saves you some time getting our web applications up and running.

ASP Needs To Be Enabled

I believe that by default when you are adding the Web Server (IIS) role to Windows Server 2008 that the ASP feature is not added by default.

Start Server Manager select the Web Server (IIS) Role. Click on Add Role Services. Make sure you have at least ASP and Server Side Includes and ASP.NET selected.

image

IIS 6 Management Compatibility

You may also want to select the IIS 6 Management Compatibility features which are found near the bottom of the list of features.

image 

I have found the our installer technology does not play well with native IIS7. If you do not have the IIS 6 management features installed you will get an error when installing Dovetail SDK, Dovetail BOLT, or Dovetail Seeker

You can get around this error by Clicking on Ignore.

image

Create a Application Pool

You need to run each of your Dovetail web applications in their own Application Pool. The first thing you should do is create an Application Pool with the Managed pipeline mode set to Classic

image

Running 64bit Windows?

If you are running a 64bit operating system you will need to Enable 32-Bit Applications for the Application Pool. Click on Advanced Settings… Set Enable 32-Bit Applications to True.

image

If you do not do this you will see errors related to Dovetail SDK Compatibility COM components not being found. Something like this:

An error occurred while creating object 'FCApp'. FCApplication Initialization Failed.
Class doesn't support Automation

Active Server Pages error '00000000'

Create object failed

Create a Web Application

Next up you need to create a web application for your Dovetail Classic ASP application. You should set its application pool to use the one you just created.

Right click on your web site and Add Application. Enter the Physical Path to your web application files. Select the Application Pool you just created and you will want to click on Test Settings… to make sure the web server credentials have the correct permissions to your web application files. What is right for you will depend on your environment. You can select Connect As to set the permissions as desired.

image 

Script Errors Sent To The Browser

When you try to browse your web application you will likely run into this message telling you... “Something went going wrong but sorry I won’t tell you what.” That error looks like this:"

An error occurred on the server when processing the URL. Please contact the system administrator.

If you are the system administrator please click here to find out more about this error.

The helpful and slightly confusing link did solve the problem. Since when did Microsoft start linking to employee blogs rather than documentation? Not bad, just interesting. The error message is quashed as a security precaution. You can enable errors to be sent to the browser by executing this command line from the administrative command line.

%windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true

Enable Parent Paths

The next error you will likely run into is regarding Parent Paths. They need to be enabled when an asp page includes a script with a path containing a “..” An example would be:

<!--#include file="../include/inc_room.asp"-->

We already have a solution that shows how to do this for Windows Server 2003. Here is how to change this setting for IIS7.

Navigate to your web application in IIS7 Manager. Click on ASP. Set Enable Parent Paths to True. Click on Apply.

iis-asp-enable-parent-paths

Voilà

There you go we have leaped all the hurdles to getting Dovetail Agent working on IIS7.

image

Creating a Windows 2008 Server x64 Developer Workstation

For about a year now I have been running Ubuntu on my personal laptop. A stab at diversity. I was playing with Rails in my spare time and also needed to brush up on my Unix. I was young… willing to experiment. My direction changed back to .Net, I am loving C# 3.0 by the way, yet I kept my Linux laptop because it was so swift and easy to use. A poor man’s Mac Book really. The only thing I couldn’t do with Hardy Heron, yes that is the name of the distribution, was .Net development with my familiar toolset. I am very very addicted to Visual Studio.Net IDE (sorry MonoDevelop, I know cop out.) Doing some development with ASP.Net MVC has had me wishing for a development machine that supports IIS 7 and I saw all the cool kids Chad and Jeremy doing development on Windows Server 2008 so I thought I would give it a try. Here is a short running log of the whole ordeal.

Timeline

  • Spent a lot of time rounding up Vista drivers for my Lenovo 3000 V100 ultra portable yet pretty darn powerful laptop.
  • Install Drivers, Reboot, Drivers, Reboot, rinse lather repeat.
  • Lots of Windows Server 2008 Workstation tweaks. This part is really key to making Windows Server feel like a desktop OS.
  • Install Firefox a browser for the Internets.
  • Finally found chipset and video drivers at Intel that would install on Windows Server 2008. Reboot. Reboot. Grr, only basic Aero support.
  • Looks like this is going to work! Start Downloading VS.Net 2008.
  • Notepad++ – Notepad replacement
  • Adobe Flash Player. Really just a pavlovian response. (No Silverlight yet.)
  • Skype - Phone
  • Twhirl (needs Air) – Twitter Client
  • Digsby – IM Client
  • Launchy – keyboard shortcut launch utility
  • Winsplit Revolution – great window management via keyboard shortcuts. But… not working so well with out a full numeric keypad.
  • Windows Live Writer – Grr only the technical preview works with x64
  • Magic Disc – my new favorite tool for mounting/burning ISO images.
  • Get me some source control support via Svn, Tortoise SVN, Git
  • Started trolling through Scott Hanselman’s Tools List
  • Foxit Reader – PDF viewing
  • Finally start installing VS.Net 2008 via USB key
  • TestDriven.Net – Test Runner for VS.Net
  • Visual SVN – SVN integration with VS.Net
  • Resharper – It is like I am standing around naked at a red hat society meeting uncomfortable if I don’t have this going.
  • Query Express – Handy SQL Query tool
  • MS Sql Server 2005
  • I am sure I have a lot of little things left to go but I am tired and it is late.

Takeaway

The trouble of doing all of this is quite horrible when I compare it to installing packages in Ubuntu. Microsoft needs to do better with an actual coherent software installation experience. Windows Installer is quite the backwater compared to what Apple and the Linux community have to offer. Selecting all my favorite software using something like this would be pretty nice.

An Ubunty Package Managment Tool

Scenario Testing With Watin

We are starting to use WatiN to automate the testing of a web application. So far it is working pretty well. One of the things I found confusing was handling confirmation alerts like this:

image

Pop-ups like this need to be handled by Watin. The code for handling this looks like this.

   1: //setup a handler with Watin
   2: var confirmDialogHandler = new ConfirmDialogHandler();
   3: browser.DialogWatcher.Add(confirmDialogHandler);
   4:  
   5: //click the button that causes a confirmation pop-up
   6: browser.Element("buttonId").ClickNoWait();
   7:  
   8: //Clickon the ok button of the confirmation window. 
   9: confirmDialogHandler.WaitUntilExists();
  10: confirmDialogHandler.OKButton.Click();
  11: browser.WaitForComplete();
  12:  
  13: //You may want to test that the message is correct.
  14:  
  15: //cleanup
  16: browser.DialogWatcher.RemoveAll(confirmDialogHandler);

There is a lot of setup and teardown for the simply clicking a button. Using some .Net 3.5 goodness I created an extension method to make this a little more terse.

   1: //usage
   2: Browser.OkButtonClickedOnConfirmDialog(ClickOnUnMarkMasterButton);
   3:  
   4: //could use a lambda but this utilty method looks cleaner
   5: private void ClickOnUnMarkMasterButton()
   6: {
   7:     Browser.Element(Find.ById("unmarkMasterContact")).ClickNoWait();
   8: }
   9:  
  10: //implementation
  11: public static void OkButtonClickedOnConfirmDialog(this IE browser, Action actionCausingConfirmationDialog)
  12: {
  13:     var confirmDialogHandler = new ConfirmDialogHandler();
  14:     browser.DialogWatcher.Add(confirmDialogHandler);
  15:  
  16:     actionCausingConfirmationDialog();
  17:  
  18:     confirmDialogHandler.WaitUntilExists();
  19:     confirmDialogHandler.OKButton.Click();
  20:     browser.WaitForComplete();
  21:     browser.DialogWatcher.RemoveAll(confirmDialogHandler);
  22: }

Thinking about this more the difficulty in testing this dialog is a sign that we should be using a JQuery lightbox to accomplish the same functionality.

Exposing Knowledge Using Dovetail Seeker

Dovetail Seeker is our new search offering for Dovetail CRM. One of the primary design goals from a developer's point of view is to make it easy to integrate with Seeker. I know I am biased, but think we did pretty well. In this post I'll I share my experience integrating Seeker with our public web site exposing search access to Dovetail's Knowledge Base.

Why Is This A Good Idea?

For a long time we've exposed to customers the ability to browse our knowledge base. Here it is:

Dovetail's Browe KB Page

This is a pretty good solution for Dovetail administrators looking for common solutions to issues that may pop-up. A better solution would be to let users search the knowledge base for the exact issue they are running into and see what pops up. Being able to search for an problematic error message is pretty handy:

Searching Dovetail's KB

Raise your hand if you'd rather search than browsing around for a solution! If your hand happens to be up right now... Read on.

What've Got To Work With Here

The Dovetail public knowledge base is part of an ASP.Net 2.0 web application.

Our Seeker index resides in on a separate machine exposed by the Seeker search web service. Here is a look at a possible Seeker network topology ripped from the documentation:

Dovetail Seeker Topology

Disclaimer, I am not an ASP.Net expert. Likely there is a better way to get this done. Also, I leaned heavily on Chad Myers, for his ASP.Net experience. Thank you Chad for putting up with my silly questions, ASP.Net ignorance, and general complaints about ASP.Net Web Forms.

What Needs to Happen

To create a basic web search interface to Dovetail CRM we need to do the following:

  • Create a web page with a text box for search queries and a go button.
  • Write ASP.Net "code behind" for the page that relays the search query to Seeker.
  • Display the search results returned by Seeker to the web user as Html.
    • Show which search results are currently being displayed.
    • Show the total number of search results available for the query.
    • The interface needs to support paging. There can be a lot of search results.

Let's take this one step at a time working our way from an html form to search results.

Search User Input

Search input is pretty straight forward. You give the user a text box and a Go button. Here is the Html and some JavaScript I used to gather the search query from the user.

<script language="Javascript" type="text/javascript">
   1:  
   2:     function searchSeeker()
   3:     {
   4:         window.location.href= 'knowledgeBaseSearch.aspx?query=' + document.getElementById('searchQuery').value;
   5:     }
</script>
 
<div id="searchUi">
    <label for="searchQuery">Search :</label>
    <input id="searchQuery" type="text" name="query" size="57" value="<%=QueryString%>" 
        onkeypress="if(event.keyCode == 13) {searchSeeker(); return false; }"/>
    <input id="goSearch" type="button" value="Go" onclick="searchSeeker(); return false;"/>
</div>

I am using JavaScript to "submit" the search results due the nature of the ASP.Net application my application is living in. I was having trouble getting the page to behave using standard ASP.Net Web Forms techniques so I decided to trick ASP.Net into behaving like classic ASP. Sorry, I have no love for ASP.Net Web Forms I'd much rather have ASP.Net MVC next time around. You may also notice the query text box has an onkeypress event handler to capture the Enter key being pressed. Another crappy ASP.Net work around. In the end all that is happening is a GET request is returning to the same page with the query string as a parameter.

GET http://dovetailsoftware.com/.../knowledgeBaseSearch.aspx?query=ORA-065502

ASP.Net Code Behind

For searching Dovetail Seeker the knowledge base search code behind basically does the following:

  1. Get the search query and any paging information from the WebRequest
  2. Make a search WebRequest to the Dovetail Seeker web service
  3. Use a ASP.Net repeater control to data bind to the array of search results returned by Seeker.

I just want to hit the highlights if you are interested in the nitty gritty details. I have posted all the relevant html and code behind up on Pastie.

At a high level the code below is what's going on. When the page is loading: 1) Get the search query and paging information  2) execute a search against Seeker, and 3) bind the results to a repeater control on the page:

   1: protected override void OnLoad(EventArgs e)
   2: {
   3:     base.OnLoad(e);
   4:  
   5:     _queryString = Request["query"];
   6:     _resultCount = String.IsNullOrEmpty(Request["resultCount"]) ? "10" : Request["resultCount"];
   7:     _startResultIndex = String.IsNullOrEmpty(Request["startResultIndex"]) ? "0" : Request["startResultIndex"];
   8:  
   9:     Search();
  10: }
  11:  
  12: private void Search()
  13: {
  14:     if (String.IsNullOrEmpty(QueryString))
  15:         return;
  16:  
  17:     _searchResultInformation = SeekerClient.Query(QueryString, _resultCount, _startResultIndex);
  18:  
  19:     searchResultsRepeater.ItemDataBound += searchResultsRepeater_ItemDataBound;
  20:     searchResultsRepeater.DataSource = _searchResultInformation.SearchResults;
  21:     searchResultsRepeater.DataBind();
  22: }

You may have noticed the resultCount and startResultIndex parameters. They are optional Seeker parameters to support paging. To render "page 5" when there are 10 results per page you would say. Give me 10 search results starting at the 50th result.

An important task is 2) executing a search against Dovetail Seeker. The following code is a helper class that executes a search against Dovetail Seeker and returns a .Net object containing the search result:

   1: public static class SeekerClient
   2: {
   3:     public static readonly string SeekerUrlAppConfigKey = "seekerSearchWebServiceUrl";
   4:     public static readonly string SeekerUrl = System.Configuration.ConfigurationManager.AppSettings[SeekerUrlAppConfigKey];
   5:  
   6:     public static SearchResultInformation Query(string searchQuery, string resultCount, string startResultIndex)
   7:     {
   8:         string queryWithPrivateSolutionFilter = HttpContext.Current.Server.UrlEncode("(" + searchQuery + ") AND public:1 AND domain:solution");
   9:         string json = RunSearchQuery(queryWithPrivateSolutionFilter, resultCount, startResultIndex);
  10:         return AssembleSearchResultInformationFromJson(json);
  11:     }
  12:  
  13:     private static string RunSearchQuery(string searchQuery, string resultCount, string startResultIndex)
  14:     {
  15:         string searchQueryUrl = String.Format(SeekerUrl + "search/search.castle?query={0}&resultCount={1}&startResultIndex={2}", searchQuery, resultCount, startResultIndex);
  16:  
  17:         try
  18:         {
  19:             WebRequest webRequest = WebRequest.Create(searchQueryUrl);
  20:             WebResponse webResponse = webRequest.GetResponse();
  21:             StreamReader reader = new StreamReader(webResponse.GetResponseStream());
  22:             return reader.ReadToEnd();
  23:         }
  24:         catch(Exception ex)
  25:         {
  26:             string errorMessage = String.Format("Error using the Dovetail Seeker WebService. Please make sure the Dovetail Seeker web service application URL is set correctly in your Web.Config in the appSettings node using the key '{0}'.", SeekerUrlAppConfigKey);
  27:             throw new ApplicationException(errorMessage, ex);
  28:         }
  29:     }
  30:  
  31:     private static SearchResultInformation AssembleSearchResultInformationFromJson(string json)
  32:     {
  33:         return JavaScriptConvert.DeserializeObject<SearchResultInformation>(json);
  34:     }
  35: }

This code creates a web request to Dovetail Seeker and converts the JSON returned to a .Net object using the excellent Json.NET library. Dovetail Seeker includes an assembly with SearchResultInformation and SearchResult parameter classes (code) which are compatible with the JSON results returned by Dovetail Seeker.

The URI of the Dovetail Seeker web application is configured in the application configuration settings file (web.config)

Constraining the query on the server side

I only want to expose public solutions to the Dovetail knowledge base search interface. The trouble is our seeker index also contains other types of search results. You might have noticed that I added some additional magic to search query we are sending to Seeker:

This constraint to the query allows only Solution search results that are public to be returned from Dovetail Seeker.

string queryWithPrivateSolutionFilter = 
    HttpContext.Current.Server.UrlEncode("(" + searchQuery + ") AND public:1 AND domain:solution");

Pagination

For a paging interface we blatantly copied Digg's pagination. I'll be the first to admit that the code we wrote to accomplish this complicated and very much over the top. That said, I think it looks pretty cool.

Paging UI

Search Results - Exposed

With apologies to Sun Tzu. Know your Search Results and know your search integration.

The following information returned for every search:

  • The search query executed.
  • An array of search results.
  • The total number of search results available for this query. (paging)
  • The index of the first search result returned out of all potential search results. (paging)
  • When the search index was last updated.
  • Error result: If something goes wrong an error message is returned.

Each search result returned looks like this:

  • Score - how relevant is the result to the query.
  • Title - the title of the search result.
  • Summary - details about the search result.
  • Domain - what search domain does the result belong to. This allows you to mix results of different kind of data such as Cases and Solutions that match the search term.
  • Id - the unique Dovetail CRM identifier of the result

Conculsion / Wrap Up / Summary / El Fin

I appreciate that you are reading this conclusion. It means you are a diehard. It means you really want to know what pearls of wisdom that I may still have up my sleeve but sadly I'm out. Ok maybe a couple things. My best advice is to keep it simple. Borrow from the best (*cough* Google) . The code is out there if you want to use it as guidance. Comment below if you are confused about anything so that everyone can learn.

Dovetail Seeker Introduced

Stephen Lynn recently talked about our new search product in his post - Dovetail Seeker to the Rescue. Gary and I are working hard to get Seeker shipped to our customers. I wanted to post a follow up to Stephen's post to divulge some more details about Dovetail Seeker.

What is It?

Dovetail Seeker makes the data in your Dovetail CRM searchable just like Google makes the Internet searchable. All you need to do is type in a text box and click on Go.

We have worked very hard to deliver a great search solution for Dovetail CRM and I like to think we succeeded. Here is a summary of what we tried to accomplish with Seeker:

  • For Users: the ability to easily search for interesting data in Dovetail CRM.
  • For Administrators: the ability to control exactly what data users can search for.
  • For Developers: the ability to integrate Dovetail Seeker with their CRM applications.

Let's take a look at each of these points in more detail.

Users

Your users don't really care about search. They only want to find what they are looking for. We tried to make Seeker simple to use for basic searches while making it easy to discover how to unleash the power of advanced searches.

Here are a couple views of Dovetail Agent's new search interface:

Dovetail Agent 4.0 Search

Our Search Tips page teaches you how to use Seeker's more advanced capabilities.

image

Below is a screen shot of another Seeker implementation. Our Dovetail Software Knowledge Base is using Seeker to expose our Solutions on our public web site. This is a very simplistic integration with Seeker it only lets you search Solutions and does not expose any of Seeker's advanced capabilities to the user. But. It's public so you can take it for a spin if you like.

Dovetail Knowledge Base

If you are an existing customer and have a Dovetail Self Service Account you can play with a more advanced integration with Seeker at our Self Service web site.

Administrators

As an administrator you want your Dovetail CRM users to have quick access to your important CRM data. Dovetail Seeker leverages the excellent Lucene.Net text search engine to index Dovetail CRM. Seeker adds value by making it easy to define and index the Dovetail CRM data you want to make available to your users.

Seek Indexer

Before you can search you need an index. An index is created by the Seek Indexer using a configuration file setup by the Dovetail CRM administrator to describe what data you want to make searchable. Below is a screen shot of the Seek Indexer running. Not very exciting but you may notice that it is pretty fast indexing over 300 Solutions in 3 seconds.

Seeker Indexer 

To keep the index in-sync with your database it needs to be updated regularly. To accomplish this it is easy to setup a scheduled task in Windows to run the Seek Indexer and it will only update the records that have been modified since you last ran the indexer.

Seeker Search Web Service

Once you have an index setup your Dovetail CRM is searchable. Search capability is exposed by the Seeker web application which acts as a search web service. Applications can search Dovetail CRM by making requests against this web service application.

This screen shot shows details about the indexed Solutions.  

 image

The Dovetail Seeker web application does not include a HTML search user interface. The Seeker web application is a search service. It is only intended to get called by other Seeker enabled applications. When we release Dovetail Agent 4.0 it will include a search interface that consumes search results returned from Seeker.

Developers

image

To integrate an application with Seeker you need to be able to communicate with the Seeker web application using HTTP GET requests and be able to parse JSON. That's it.

Search results from the Seeker search web service are returned in a response encoded as JavaScript Object Notation (JSON). Using JSON is a handy way to serialize data between different applications. Please do not get scared by the JavaScript in the name there is a JSON implementation for many many languages.

Here is an example search request to Seeker's search service searching for the terms "create