Null reference exception in WebClientApplication?

Jun 14, 2007 at 7:02 PM
Good afternoon! I have written once before about a null reference exception that I receive after a fresh install, build, and debug session using the Web Client Software Factory. I uninstalled all previous versions, installed the 1.1 RC, and I still received the error. I tracked the error (and corrected it) in the source for the WebClientApplication class as follows:

/// <summary>
/// Performs the operation needed after executing the request handler.
/// </summary>
/// <param name="context">The <see cref="IHttpContext"/> on which the request is being processed.</param>
protected void InnerPostRequestHandlerExecute(IHttpContext context)
{
if (HttpRequestHelper.IsHandledByPageHandlerFactory(context.Request.Url.ToString()))
{
ICompositionContainer moduleContainer = GetModuleContainer(context);
if (context.Handler != null)
{
PageBuilder.TearDown<IHttpHandler>(moduleContainer.Locator, context.Handler);
}
}

if (context.Handler != null && context.Handler is Page)
{
PostPageExecute(context.Handler as Page);
}
}
First, do I have the right source code?

Second, this error appears immediately after initially running the recipes. How could it have passed a unit test? Do I have the right version (after uninstall of old version and installation of new)?

This has perplexed me a bit...any help would be appreciated. Fixing the error in code does not help much, since the recipes install the unmodified assemblies with every recipe run.

Jun 14, 2007 at 7:38 PM
Do you have Orcas?
See this post http://www.codeplex.com/websf/Thread/View.aspx?ThreadId=10489

Matias
Jun 14, 2007 at 8:52 PM
I have Orcas installed next to Visual Studio 2005, and I happen to need both. It might be a dumb question to ask why the installation of Orcas makes a difference unless there is a scenario where, only in Orcas, the HttpContext.Handler property returns null at the time this Web Client Software Factory code evaluates it.

Does this mean I either have to reinstall everything on my machine without Orcas or just deal with the problem?


matiaswoloski wrote:
Do you have Orcas?
See this post http://www.codeplex.com/websf/Thread/View.aspx?ThreadId=10489

Matias