The ASP.NET interface is designed to run under Windows' IIS, Internet Information Server, and Microsoft's .NET platform.
The ASP.NET web server interface is located in the runtime/asp.net subdirectory. To run it:
There are two options for using the ASP.NET interface. One method is to put all the HTML for your page layout (e.g. headers, footers, decorative graphics) in the main knowledgebase object. The advantage to this approach is the ASP.NET interface can be used out-of-the-box without further modification.
The other is to put the minimum amount of HTML in the main knowledgebase object, and use Visual Studio .NET or some other tool to modify the ASP page. This requires modifying the ASP.NET interface, but is much easier for pages with many additional elements in addition to KnowledgeWright's inputs and outputs.
In your main knowledgebase object, you must have these minimal HTML elements which are inserted above and below all questions asked of the user:
Property Name | Minimal Value |
question_top |
|
question_bottom |
<INPUT NAME="Submit" TYPE="Submit" VALUE="Continue"> </INPUT> |
output_continue |
<INPUT NAME="Submit" TYPE="Submit" VALUE="Continue"> |
In addition, some jigs (notably Basic) also have an output_continue property in the knowledgebase object. This is used when there is output for the user and the reasoning process is not complete. That is, some intermediate results or information are being displayed for the user. In this case the output_continue contents are added to the web page and are an empty HTML form that continues the reasoning process.
In addition the following properties are passed to your web server:
Parameter |
Description |
Examples |
charset |
The character set used in your knowledgebase |
ISO-8859-1 big5 |
To run your knowledgebase, type into your browser the following URL:
http://localhost/KW/KWForm.aspx?kb_file=hello.kb
Replace the 'localhost' with the name (www.company.com) or IP address of the server you have installed the KnowledgeWright ASP.NET page on.
There are additional parameters that you can specify in the query string. Separate each of the parameters by ampersands (&) and encode them with standard URL encoding. The full set of parameters are:
Parameter |
Description |
Examples |
kb_file |
The name of the knowledgebase file (no quotes) |
amzi_website_advisor.kb |
directory |
The directory where the kb_file is located. |
c:\InetPub\webapps\KW |
temp_directory |
The directory where the temporary session files are created as well as log files (if you have specified one) and any other temporary files needed by KnowledgeWright. Note ASP.NET pages must have write access to this directory. |
c:\InetPub\webapps\KW\temp |
log_file |
The name of the log file that details the execution. It will have the same contents as the log in the KnowledgeWright Workshop. |
kwrun.log |
If you get the error that ASP.NET cannot find amzinet or one of its dependencies, it is likely because amzi.cfg, amzi.dll, aosutils.lsx and/or aodbc.lsx were not copied to the windows/system32 directory.
Also you might have to stop/restart IIS and/or use Task Manager to stop the
aspnet_wp process.
The next thing to do when you encounter a problem is to specify a log_file in the query string where you invoke the web page.
To specify your kb file and a log file:
http://localhost/KW/KWForm.aspx?kb_file=hello.kb&log_file=kwrun.log
This will create a log file in the same directory as your knowledgebase file. Study its contents, especially at the bottom to see if the problem is explained.
If your knowledgebase is not working the same as in the Workshop, then remove
all extra elements from the KWForm.aspx file (in other words use the version
provided in the runtime/asp.net directory) so you are running on a blank page.
If that works, one of your additional elements is causing GET requests.
In the Web.config file under trace set enabled="true" and pageOutput="true"and if needed localOnly="false", e.g.
<trace enabled="true" requestLimit="10" pageOutput="true" traceMode="SortByTime" localOnly="false" />
To Debug under Visual Studio, in the Web.config file under compilation, set Debug="true" as follows:
<compilation defaultLanguage="vb" debug="true" />
and build the Debug version of the project. To display KnowledgeWright's ASP.NET Debug Log at the bottom of each screen set the KW_DEBUG constant in KWForm.aspx.vb to True.
You might also want to try setting the KW_SAVE_SESSION constant in KWForm.aspx.vb to True. This will save the state of the reasoning engine on disk (in the specified temp_directory) after each page submit.
If none of the above items do not make the problem clear, the next step is to specify a log file in Amzi! Prolog + Logic Server. To do this, add the following lines to your amzi.cfg file in the /bin subdirectory:
apitrace = on
logfile = c:\amziapi.log
If you need technical support, please e-mail the browser output when you run KW, your KnowledgeWright log file and Amzi! Logic Server trace file along with your knowledgebase to tech support.
To modify and rebuild the web page you can use the VB.NET project, KW.sln.
See Microsoft's ASP.NET Website.