Using DLL with WCF Ajax

Use this forum to post Vensim related questions.
Post Reply
yobiman
Member
Posts: 30
Joined: Wed May 28, 2008 1:28 am

Using DLL with WCF Ajax

Post by yobiman »

I am trying to integrate Vensim into a WCF application that I am developing.. I have IIS set up on my XP machine and am developing the application as a prototype.

I have been trying to replicate the Csharp dll model shipped with the latest version of DSS but cannot seem to get it working...
I have copied the VensimDLLWrapper.cs file into a class and add "Using VensimDLLWrapperAPI" to my declaration

When I was unable to get the process working through a WCF interface, I tried creating a simple webform with the following code to see if the basic "vensim_command" was working. Given that "0" was returned to TextBox1, I can only assume it isn't

Any help with this would be much appreciated

Many thanks
___________________

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using VensimDLLWrapperAPI;

namespace TolagaWare
{
public partial class WebForm1 : System.Web.UI.Page


protected void Page_Load(object sender, EventArgs e)
{
string strVensimCommand;
string strModelPath = "C:\\Program Files\\Vensim\\dll\\WORLDAPP.VPM";

strVensimCommand = string.Concat("SPECIAL>LOADMODEL|", strModelPath);

int nResult = VensimDLLWrapper.vensim_command(strVensimCommand);
this.TextBox1.Text = nResult.ToString();
}
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

there is not enough in what you sent to indicate what the problem is. Normally you would be using com.vensim.Vensim not VensimDLLWrapperAPI. Check with the java example to see if that is working.

Please note that the Vensim DLL that comes with Vensim DSS is not licensed for use with Web Servers. While you can use this for development on your own computer with Vensim DSS installed, it may not be open to access from any other user.
yobiman
Member
Posts: 30
Joined: Wed May 28, 2008 1:28 am

Post by yobiman »

Thanks Bob,
Your response was helpful. It is working now
Post Reply