Strange Days WCSF

Topics: Web Client Software Factory
Oct 26, 2007 at 8:43 PM
So I trying to get WCSF up and running. I have installed the a pre-reqs and WCSF. I created a project from the guidance package. Everything seems to be working fine. When I start the project in VS2005 I just get this error.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: item

[ArgumentNullException: Value cannot be null.
Parameter name: item]
Microsoft.Practices.ObjectBuilder.WCSFExtensions.WCSFBuilderBase`1.TearDown(IReadWriteLocator locator, TItem item) +132
Microsoft.Practices.CompositeWeb.WebClientApplication.InnerPostRequestHandlerExecute(IHttpContext context) +152
Microsoft.Practices.CompositeWeb.WebClientApplication.Application_PostRequestHandlerExecute(Object sender, EventArgs e) +99
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

I did find one other post http://www.codeplex.com/websf/Thread/View.aspx?ThreadId=10489.
Some of the numbers were a little different then my error. I treid modifying the souce as described (Comment out the throw error) and the problem just moved into "object not set to instance" in another spot. That make sense to me if the "item" object is null I'm not sure how commenting out the throw would be good.

I followed these directions to do the install
http://www.codeplex.com/websf/Wiki/View.aspx?title=Installing%20the%20Web%20Client%20Software%20Factory%20Release%20June%202007%20Release&referringTitle=Home

I'm running VS2005 SP1.

Anyone have an idea?


Developer
Oct 30, 2007 at 12:38 AM
Hi,

In order to fix this please follow these steps:

  • Install the WCSF Source code (%programfiles%\Microsoft Web Client Factory\Source Code\ WebClientFactorySourceInstall.msi)
  • Open the Composite Web Application Block (%SourceDir%\Blocks\CompositeWeb\CompositeWeb.sln)
  • Modify the WebClientApplication.cs file, InnerPostRequestHandlerExecute method (line 107)
from:
if (HttpRequestHelper.IsHandledByPageHandlerFactory(context.Request.Url.ToString()))
to:
if (HttpRequestHelper.IsHandledByPageHandlerFactory(context.Request.Url.ToString()) && context.Handler != null)
  • Rebuild the Composite Web Application Block solution
  • Copy the assemblies Microsoft.Practices.CompositeWeb.dll, Microsoft.Practices.CompositeWeb.EnterpriseLibrary.dll and Microsoft.Practices.ObjectBuilder.WCSFExtensions.dll you just built to WCSF solution's Library folder. Override when asked.
  • Rebuild your WCSF Solution

Let me know if this helps

Ezequiel Jadib
http://staff.southworks.net/blogs/ejadib
Oct 30, 2007 at 7:05 PM
That worked great! Thanks for the help.

I can see it's important to copy the 3 assemblies in the
\Blocks\CompositeWeb\CompositeWeb.sln or you get manifest errors for each dll.

I just took them from my \obj\debug directory for each dll you have listed above (Microsoft.Practices.CompositeWeb.dll, Microsoft.Practices.CompositeWeb.EnterpriseLibrary.dll and Microsoft.Practices.ObjectBuilder.WCSFExtensions.dll) and copied them to my Library.
C:\Program Files\Microsoft Web Client Factory\Microsoft Practices Library.

Thanks again!
Mar 13, 2008 at 1:50 AM
Hi, I've got the same error but the source code is different. I'm using 2.0.2 of Composite Web.

I have a fresh 2008 install on XP, with WCSF 2008.

I successfully installed GAX/GAT for 2008 and WCSF 2008 February msi.

Got the same error and tried uninstalling, re-installing, repairing - several hours and hours spent searching for the solution to this.

Firstly, what is the problem (sounds like Ezequiel Jadib found the issue) the and secondly - can I get a fix for the latest Feb codebase ? I'm kinda desparate to get this working on a new project.

Recipie Framework Error - Value cannot be null
Parameter name: serviceProvider
at Microsoft.Practices.ComponentModel.ServiceHelper.GetService(IServiceProvider serviceProvider, Type serviceType, Object component)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.VszWizard.EnvDTE.IDTWizard.Execute(Object Application, Int32 hwndOwner, Object[]& ContextParams, Object[]& CustomParams, wizardResult& retval)