I have been trying to set the Path for the config dir.
Is there a sample on how to do this?
This is what I was using
Could you post any error messages you're getting? Can't help otherwise... Also make sure the path is valid and that all the other config files are correctly referenced in the config file. One other thing, in your example you've called your bot instance the same as the namespace that the bot class is in. This *might* cause a problem if the compiler can't resolve what AIMLbot you mean (either the class or namespace)
this is the error I get:
System.IO.FileNotFoundException was caught
Message="Unable to find the specified file."
at AIMLbot.Utils.SettingsDictionary.loadSettings(String pathToSettings)
at AIMLbot.Bot.loadSettings(String pathToSettings)
at GbotMain.AIMLbotAI.OpenDataFile() in D:..Strip...AIMLbotAI.vb:line 34
the MyAIMLbot.PathToConfigFiles always points to the default App Path.
here is where it gets fun. if I create a /config with a setting file in the default path it will pick up a alt with the loadSettings. It seems that it need the Default before it can pick up a alt.
Now I am not using a ALt. I need to move the config dir out of the default application. I am still testing to see what more I can find
did you find a solution to this?
Just curious if anyone has managed to successfully use this with an ASP.net MVC project? I'm getting a similar error that it can't find the file during the loadSettings call. I've managed to verify though that it is correctly pointing to both config and setting.xml before the call.
The chat class
public class ChatBot : Bot
private Bot myBot;
private User myUser;
public ChatBot(string filepath)
myBot = new Bot();
myUser = new User("Human", myBot);
private void Initialize(string filepath)
myBot.isAcceptingUserInput = false;
myBot.isAcceptingUserInput = true;
public String GetOutput(String input)
Request r = new Request(input, myUser, this);
Result res = Chat(r);
string filePath = System.IO.Path.Combine(Server.MapPath(""), System.IO.Path.Combine("config", "Settings.xml"));
ChatBot catbot = new ChatBot(filePath);