Click to See Complete Forum and Search --> : microsoft agent


StyM
April 27th, 2004, 06:52 AM
hello and good day.


may i know how i can add a microsoft agent to my aspx page?
i have tried it in a form and worked fine, but when i tried it in my aspx page it causes an exception 'access denied' dont know where to set access. can anyone help me????

protected AgentServerObjects.AgentServer agents;
try
{
this.agents = new AgentServerObjects.AgentServerClass();
}
catch ( Exception e )
{
e.ToString();
}
AgentServerObjects.IAgentEx srve;
srve = (AgentServerObjects.IAgentEx)agents;
int d = 0, i = 0;
srve.Load("Genie.acs", out d,out i);
AgentServerObjects.IAgentCharacterEx c = null;
srve.GetCharacterEx(d,out c);
c.Show(0,out i);
c.Speak("hello",null,out i);


thanks for the help.