Newbie - Getting PT Win app up and running first time.

Newbie - Getting PT Win app up and running first time.

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


fseider posted on Wednesday, January 10, 2007

OK, real newbie here.  I  just want to get the PT app up and running for a feel.  (Just received the book today, so it'll take me a bit of time to get through it.)  (I am running on Windows Server 2003 if that makes a difference.)

I downloaded the example PT, followed the instructions (I think).  Csla compiles fine.  The database files for PT seem to be fine as I can open the database and query the tables. I then open the PT solution and insure the app.config is pointing to the two database files.  Everything compiles fine afer I readd the Csla .dll as per the instructions.  OK, so far so good.  I'm going for the PTWin to keep things simple.  When I run the program, I get the login screen, I enter pm/pm, then get the error I pasted below.  Error is in file LocalProxy, function:

    Public Function Fetch( _
      ByVal criteria As Object, _
      ByVal context As Server.DataPortalContext) As Server.DataPortalResult _
      Implements Server.IDataPortalServer.Fetch

      Return mPortal.Fetch(criteria, context)   ***** Error retruns on this line *****

    End Function

I'm not sure why it's giving me this 'Could not load file ..' error.  What obvious thing am I missing here?

Thanks, Fred

 

System.IO.FileNotFoundException was unhandled
  Message="Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified."
  Source="Csla"
  StackTrace:
       at Csla.Server.DataPortal.Fetch(Object criteria, DataPortalContext context)
       at Csla.DataPortalClient.LocalProxy.Fetch(Object criteria, DataPortalContext context) in C:\Visual Studio Projects\csla20vb\Csla\DataPortal\Client\LocalProxy.vb:line 46
       at Csla.DataPortal.Fetch(Object criteria) in C:\Visual Studio Projects\csla20vb\Csla\DataPortal\Client\DataPortal.vb:line 159
       at Csla.DataPortal.Fetch[T](Object criteria) in C:\Visual Studio Projects\csla20vb\Csla\DataPortal\Client\DataPortal.vb:line 132
       at ProjectTracker.Library.Security.PTIdentity.GetIdentity(String username, String password) in C:\Visual Studio Projects\ProjectTracker20vb\ProjectTracker.Library\Security\PTIdentity.vb:line 72
       at ProjectTracker.Library.Security.PTPrincipal.Login(String username, String password) in C:\Visual Studio Projects\ProjectTracker20vb\ProjectTracker.Library\Security\PTPrincipal.vb:line 16
       at PTWin.LoginForm.OK_Click(Object sender, EventArgs e) in C:\Visual Studio Projects\ProjectTracker20vb\PTWin\LoginForm.vb:line 8
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
       at PTWin.MainForm.DoLogin() in C:\Visual Studio Projects\ProjectTracker20vb\PTWin\MainForm.vb:line 280
       at PTWin.MainForm.MainForm_Load(Object sender, EventArgs e) in C:\Visual Studio Projects\ProjectTracker20vb\PTWin\MainForm.vb:line 12
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
       at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Control.set_Visible(Boolean value)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(ApplicationContext context)
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at PTWin.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

fseider replied on Wednesday, January 10, 2007

OK, it's get a little more interesting.  I was trying to get the PT Win app to run on a VMWare session running Windows Server 2003 (32 bit).  My host computer is actually running Windows XP Pro x64.  I did a direct copy of the PT example app and CSLA from my VMWare session where I was getting the error and copied it all over to my host computer, with the end result being the exact same structure.  I was able to run the program fine.  So, something in my VMWare session is causing my problem obviously.

Is anyone else using VMWare sessions for the PT Win app?  Did you have to do something different to get it to run properly?

Thanks

fseider replied on Saturday, January 13, 2007

The fix turned out to be fairly easy - did a Repair on the .NET 2.0 Framework.  I do have .NET 3.0 installed as well, just wondering if that had something to do with it somehow.

Copyright (c) Marimer LLC