Running Dataportal Local

Running Dataportal Local

Old forum URL: forums.lhotka.net/forums/t/1184.aspx


chiefy81 posted on Monday, September 11, 2006

Hey guys, newbie here trying to run project tracker.  Ive got it all setup except for the proper dataportal configuration.  I keep getting a null pointer error with a nested "DataPortalException: DataPortal.Fetch failed" error.  After stepping through the code I saw that the portal was EnterpriseServicesHost.EnterpriseServicesProxy.IsServerRemote = true.  This didnt seem right since I was trying to run it locally and not via rem or web services.  So I debugged and stepped through further and forced the GetDataPortalProxy( runlocal bool) function to have a value of true (via the debugger) and things then work fine, the data is returned and the pages render fine.  However, I cannot seem to find the configuration change that would fix this problem with out me having to manipulate it while in debug mode.  Let me know what you think is wrong or what I can do.

Thanks in advance,

Mike

guyroch replied on Monday, September 11, 2006

Can you include your app.config file - it might help in trying to find out what you problem is.

chiefy81 replied on Monday, September 11, 2006

here is the web.config file from the web project im trying to get to work.  As a side note, the project tracker windows client works fine.

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  <appSettings>
      <add key="CslaAuthentication" value="Csla" />
      <!--<add key="CslaDataPortalProxy"
      value="Csla.DataPortalClient.RemotingProxy, Csla"/>
    <add key="CslaDataPortalUrl"
      value="http://localhost:3187/RemotingHost/RemotingPortal.rem"/>-->
      <!--<add key="CslaDataPortalProxy"
      value="Csla.DataPortalClient.WebServicesProxy, Csla"/>
    <add key="CslaDataPortalUrl"
      value="http://localhost:4334/WebServicesHost/WebServicePortal.asmx"/>-->
      <add key="CslaDataPortalProxy"
               value="EnterpriseServicesHost.EnterpriseServicesProxy, EnterpriseServicesHostcs"/>
  </appSettings>
  <connectionStrings>
    <!--<add name="PTracker"
             connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=&quot;C:\Visual Studio Projects\csla20\ProjectTracker20cs\PTracker.mdf&quot;;Integrated Security=True;User Instance=True"
             providerName="System.Data.SqlClient" />
    <add name="Security"
             connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=&quot;C:\Visual Studio Projects\csla20\ProjectTracker20cs\Security.mdf&quot;;Integrated Security=True;User Instance=True"
             providerName="System.Data.SqlClient" />-->
      <add name="PTracker"
               connectionString="server=(local);database=PTracker;uid=csla_user;pwd=pass;"
               providerName="System.Data.SqlClient" />
      <add name="Security"
               connectionString="server=(local);database=Security;uid=csla_user;pwd=pass;"
               providerName="System.Data.SqlClient" />
  </connectionStrings>
  <system.web>

 ....
...............

ajj3085 replied on Tuesday, September 12, 2006

    <add key="CslaDataPortalUrl"
      value="http://localhost:4334/WebServicesHost/WebServicePortal.asmx"/>-->
      <add key="CslaDataPortalProxy"
               value="EnterpriseServicesHost.EnterpriseServicesProxy, EnterpriseServicesHostcs"/>

Comment those as well, you should be then running in Local mode.

chiefy81 replied on Tuesday, September 12, 2006

Works perfectly, thanks for the help!


Copyright (c) Marimer LLC