Please help me to resolve below issue.
I am getting Mathlink Exception, while calling Wolfram Mathematica from Visual Studio2012 using C#. Please see code below. It also shows "Error code: 1012. protocol unavailable"
private void button1_Click(object sender, EventArgs e)
{
// This launches the Mathematica kernel:
IKernelLink ml = MathLinkFactory.CreateKernelLink();
ml.WaitAndDiscardAnswer();
// Now compute 2+2
string result = ml.EvaluateToOutputForm("2+2", 0);
Console.WriteLine("2 + 2 = " + result);
ml.Close();
// Wait for user to close window.
Console.WriteLine("Press Return to exit...");
Console.Read();
}
Exception screenshot