CSLA with Web Service portal, how to troubleshoot "unable to load type" problems?

CSLA with Web Service portal, how to troubleshoot "unable to load type" problems?

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


rsbaker0 posted on Wednesday, January 07, 2009

I'm testing the web service portal on a new machine to see what will be required to deploy it, and I'm getting this exception:

Server was unable to process request. ---> Unable to load type Csla.WORMapper.WORMapperBusinessBase`1+ExistsCommand[[Company.Application.Data.GlobalSettings, CMDATA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] required for deserialization.

Note that the exact same binaries (at least virtual directory contents) work properly on another machine. Also, the application itself will run on the same IIS box over a local data portal.

Any idea how I would go about figuring out what is wrong here?

Here is a partial stack back trace:

   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Csla.WebServiceHost.WebServicePortal.Update(Byte[] requestData) in C:\Application.NET3\Csla-3.5.1\Web References\WebServiceHost\Reference.cs:line 154
   at Csla.DataPortalClient.WebServicesProxy.Update(Object obj, DataPortalContext context) in C:\Application.NET3\Csla-3.5.1\DataPortal\Client\WebServicesProxy.cs:line 100
   at Csla.DataPortal.Update(Object obj) in C:\Application.NET3\Csla-3.5.1\DataPortal\Client\DataPortal.cs:line 435
   at Csla.DataPortal.Update[T](T obj) in C:\Application.NET3\Csla-3.5.1\DataPortal\Client\DataPortal.cs:line 322
   at Csla.DataPortal.Execute[T](T obj) in C:\Application.NET3\Csla-3.5.1\DataPortal\Client\DataPortal.cs:line 279
   at Csla.WORMapper.CommandWithArg`3.Execute(String databaseKey, A arg) in C:\Application.NET3\Csla.WORMapper\CommandWithArg.cs:line 52
   at Csla.WORMapper.CommandWithArg`3.Execute(A arg) in C:\Application.NET3\Csla.WORMapper\CommandWithArg.cs:line 42
   at Csla.WORMapper.WORMapperBusinessBase`1.Exists(Object objectKey) in C:\Application.NET3\Csla.WORMapper\WORMapperBusinessBase.cs

RockfordLhotka replied on Wednesday, January 07, 2009

Are you sure the business assemblies are in the bin directory?

rsbaker0 replied on Thursday, January 08, 2009

RockfordLhotka:
Are you sure the business assemblies are in the bin directory?

Well, I had assumed so, since I had just copied my virtual directory from the "working" web service (and subdirectories) on my development box to the IIS test box.

It turns out you were on the right track, because I then tried copying everything from a full application install (e.g. the local data portal installation that works) into the bin directory of the web service, and it worked, so there must be something visible to the web service on the development box that isn't in the bin directory (e.g. hiding in the GAC, etc.)

I can cull the files by trial and error until it breaks again to determine which file it was, but is there any way to diagnose this more cleanly? (e.g. get the error message to tell you which assembly was needed by couldn't be found?)

Copyright (c) Marimer LLC