The PROGRAME# does not work properly with my web based chatterbot application.I am using the API in the code as follows:(This is my web page code behind in c#)
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using AIMLbot;
using System.IO;
public partial class _Default : System.Web.UI.Page
{
private Bot myBot;
private User myUser;
private Request lastRequest = null;
private Result lastResult = null;
protected void Page_Load(object sender, EventArgs e)
{
this.TextBox1.Focus();
myBot = new Bot();
myBot.loadSettings();
myUser = new User("DefaultUser", this.myBot);
AIMLbot.Utils.AIMLLoader loader = new AIMLbot.Utils.AIMLLoader(this.myBot);
this.myBot.isAcceptingUserInput = false;
loader.loadAIML(@"E:\NEW NEW NEW FYP\VISCA\aiml");
this.myBot.isAcceptingUserInput = true;
}
protected void Button1_Click(object sender, EventArgs e)
{
if (this.myBot.isAcceptingUserInput)
{
string rawInput = this.TextBox1.Text;
this.TextBox1.Text = string.Empty;
this.Label1.Text += "You: " + rawInput + "<br><br>";
Request myRequest = new Request(rawInput, this.myUser, this.myBot);
Result myResult = this.myBot.Chat(myRequest);
this.lastRequest = myRequest;
this.lastResult = myResult;
this.Label1.Text += "VISCA: " + myResult.Output + "<br><br>";
//this.TextBox1.Text = "";
//this.TextBox1.Focus();
}
}
}
And I had to copy and paste the config files in to “C:\Program Files\Microsoft Visual Studio 8\Common7\IDE” .And this code works perfectly with standalone application(all the tags are working).
The issue is with the web site development where some of the tags are not working specially the <that> tag is not working properly.
I guess some code is missing which gives the last bot output to the bot to process with the <that> tag.(The issue is normal standalone app works but the web site does not).My be a value is lost when web site post back or something.I did try many times and I could not find out where the error is.I guess some kind of a code is missing in the web site code behind or some other reason.
The PROGRAME# GUI can be downloaded form http://sourceforge.net/projects/aimlbot/files/
I will be grateful if anyone of you help me with your expert ideas on this matter.Thank you so much and help me plz.
p.s
——
I am unable to attach my test file here.I have uploaded it another forum http://forum.alicebot.org/viewtopic.php?f=3&t=38 .The attachment contains :
* test web site with the simple welcome.aiml file I am testing(AIMLbot.dll is referenced)
* and the config folder to be saved in the C:\Program Files\Microsoft Visual Studio 8\Common7\IDE. Path setting has some issues.