Skip to Content
0
Former Member
Oct 22, 2009 at 05:45 PM

VS Development Server error

14 Views

Hi all,

I am trying to list and export as xls in a aspx page.

BO Server: Edge 3.1

.NET 3.5

It works fine when the project is using "Local IIS Server", but when i change that to "Use Visual Studio Development Server" i get an error while getting ReportEngines service from EnterpriseSession.

Code from the Page_Load:

SessionMgr sessionMgr = new SessionMgr();
EnterpriseSession enterpriseSession = sessionMgr.Logon("user name", "password", "server", "secEnterprise");
ReportEngines reportEngines = null;
UserInfo userInfo = null;
InfoStore iStore = null;

iStore = (InfoStore)enterpriseSession.GetService("InfoStore");
userInfo = enterpriseSession.UserInfo;

if (enterpriseSession != null)
{
      reportEngines = (BusinessObjects.ReportEngine.ReportEngines)Session["ReportEngines"];
      if (reportEngines == null)
      {
              rEngines = (ReportEngines)(enterpriseSession.GetService("ReportEngines")).Interface;
      }
}

enterpriseSession.GetService("ReportEngines") line throws exception with this message:

Message: "Cannot create object CrystalEnterprise.ReportEngines."

ParamName: null

Any ideas why i am getting this exception.

PS: when i switch back to IIS there isn't any exceptions.