File Not Found exception with web services host and PTracker

File Not Found exception with web services host and PTracker

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


SultanOfSuede posted on Wednesday, November 01, 2006

The FNF error has been dealt with in other threads, but I'm still having the problem when trying to set up the Project Tracker 1.0 sample.  The answers given in the other threads haven't helped me.

I've installed CSLA 2.1 in the GAC.  I can run PTracker successfully in a two-tier configuration.  I log in as pm, add/edit resources, etc.  I can browse to http://localhost/WebServicesHost/WebServicePortal.asmx and see the data portal methods and I can gen a file against the URL using wsdl.exe.  (I'm not using a port configuration at the moment.  I did earlier after configuring IIS and got the same problem.)

When I go to the web services configuration though, I get the error below.  Maybe PTracker 1.0 (from the Apress website) doesn't work with 2.1?  I've verified that the CSLA authentication types are the same in both the PTWin project and the WebServicesHost project config files.  The database strings are identical as well.  I've Beyond Compared the \bin directories of the business library, the UI and the services host as well and they're the same.  Each of these assemblies references the same released version of CSLA 2.1 dll that is hosted in the GAC.    

What am I missing?  I've not been able to find the actual PTracker code on Rocky's site, so I assumed that it was still the same as what is on the publisher site.

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'Csla' or one of its dependencies. The system cannot find the file specified.
File name: 'Csla'
   at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(String assemblyName, String typeName)
   at Csla.DataPortal.GetDataPortalProxy(Boolean forceLocal)
   at Csla.DataPortal.Fetch(Type objectType, Object criteria)
   at Csla.DataPortal.Fetch[T](Object criteria)
   at ProjectTracker.Library.Security.PTPrincipal.Login(String username, String password) in C:\CSLA\csla20cs\ProjectTracker20cs\ProjectTracker.Library\Security\PTPrincipal.cs:line 15
   at PTWin.LoginForm.OK_Click(Object sender, EventArgs e) in C:\CSLA\csla20cs\ProjectTracker20cs\PTWin\LoginForm.cs:line 23
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.PerformClick()
   at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
   at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
   at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
PTWin
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/CSLA/csla20cs/ProjectTracker20cs/PTWin/bin/Release/PTWin.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Csla
    Assembly Version: 2.1.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Csla/2.1.0.0__93be5fdc093e4c30/Csla.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
ProjectTracker.Library
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/CSLA/csla20cs/ProjectTracker20cs/PTWin/bin/Release/ProjectTracker.Library.DLL
----------------------------------------
System.Web
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.210 (QFE.050727-2100)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


 

SultanOfSuede replied on Wednesday, November 01, 2006

BTW, the error occurs in the login.  It doesn't occur when I use a two-tier configuration (no remoting of any sort). 

guyroch replied on Wednesday, November 01, 2006

Make sure the Csla reference in you web.config is in lower case w/ capital "C".

  <system.runtime.remoting>
    <application>
      <service>
        <wellknown mode="SingleCall" objectUri="
RemotingPortal.rem" type="Csla.Server.Hosts.RemotingPortal, Csla"/>
      </service>
      <channels>
        <channel ref="http">
          <serverProviders>
            <provider ref="wsdl"/>
            <formatter ref="soap" typeFilterLevel="Full"/>
            <formatter ref="binary" typeFilterLevel="Full"/>
          </serverProviders>
        </channel>
      </channels>
    </application>
  </system.runtime.remoting>

SultanOfSuede replied on Wednesday, November 01, 2006

I'm using the web services proxy configuration in PTWin's config file.  Here's what I have:

<add key="CslaDataPortalProxy" value="Csla.DataPortalClient.WebServicesProxy, Csla"/>

<add key="CslaDataPortalUrl" value="http://localhost/WebServicesHost/WebServicePortal.asmx"/>

Control clicking the hyperlink above shows me a web page with the methods listed for the data portal.  The value for the data portal proxy looks right to me based on my check of the CSLA source code. 

guyroch replied on Wednesday, November 01, 2006

Oops, sorry.  I'm not familiar with the web services proxy.  :(

Copyright (c) Marimer LLC