Problem Deploying a WCSF Web App

Topics: Web Client Software Factory, User Forum
Mar 23, 2007 at 5:39 PM
I have a web site I built for a project using WCSF. This project has a separate build server using CruiseControl to provide continuous integration. This build output also serves as out site for testing the application. The cruise control build uses a Web Deployment Project to compile then create the project in a virtual directory in IIS. All of this build process works just fine and the tester is happy, too.
The problem I am running into is when I try to deploy this application to the DMZ to make this site public for our clients. The I have copied the entire file structure from the output of the web deployment project into a folder on the server in the DMZ which is a virtual directory in IIS. I can log into the DMZ site, and navigate around to almost every page in the site. However, I have several items under the "Administration" menu which throw an error when I try to navigate to them. I am using the SiteMap builder to construct the menu which uses rules to determine if the current user has permission to navigate to that menu item, based on roles. The role-based rules appear to be working since the correct menu items are displayed for each user. Every time the user clicks on one of those menu items though the follow error occurs:

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'Microsoft.Practices.CompositeWeb' or one of its dependencies. The system cannot find the file specified. (C:\Inetpub\wwwroot\web.config line 207)

Source Error:

Line 205: <httpModules>
Line 206: <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 207: bold = <add name="WebClientAuthorizationModule" type="Microsoft.Practices.CompositeWeb.Authorization.WebClientAuthorizationModule, Microsoft.Practices.CompositeWeb"/>
Line 208: <add name="ExceptionLoggerHttpModule" type="Microsoft.Practices.CompositeWeb.EnterpriseLibrary.ExceptionLogger, Microsoft.Practices.CompositeWeb.EnterpriseLibrary"/>
Line 209: </httpModules>


Source File: C:\Inetpub\wwwroot\web.config Line: 207

Based on that error message I have verified that the WebClientAuthorizationModule resides in the CompositeWeb assembly and it is in the bin folder if the web site (it must be, or other things wouldn't be working).

I verified that all the same DLLs are in the bin folder as the build server where this code works. Just to be sure, I copied all of the EntLib DLLs from the "Microsoft Practices Library" on the build server into the bin folder on the DMZ' site.

I also verified the build server and the DMZ both have .NET Framework 2.0 installed. Since the web site does not use any PageFlow, neither server has .NET 3.0 installed (although I tried installing it in the DMZ to see if that would magically fix it - no luck)

Another option I tried was to copy the compiled source, rather than the web deployment project and that causes the same problem (I expected that, but I'll try anything at some point.)

Other background info: DMZ server is running Windows Server 2003, I believe without any service packs.
The build server is Windows Server 2003, service pack 1

At this point I have exhausted my troubleshooting options. I am hoping that someone out there can provide some suggestions on how to debug this problem. At the moment, the clients are quite happy to have the site up so they can get their hands on it, but I don't want to push my luck with broken functionality out there for long...

Thank you.
Mar 23, 2007 at 8:47 PM
It is good to see you using CWAB and SCSF in the real world on live sites.

As far as your deployment problem goes:
CWAB (Microsoft.Practices.CompositeWeb) has dependencies on the version of ObjectBuilder we shipped with the factory, the Enterprise Library Dlls we shipped with (common, data, authentication, and a few others specifically), and a DLL called CompositeWeb.EnterpriseLibrary.dll (iirc) which provides EntLib based implementations of things like the authentication provider. If all of those files are there, this should work without the error you are seeing.

As background on why I think this should work:
All of our testing was done on Windows XP and Windows 2003, both with up to date service packs. And our tests did include deployment to full Win2k3 IIS servers, so we could do performance, stress, and scalability testing. After talking with our lead test expert, neither of us recall problmes like the one you are having.

So, I have a few questions, which may help you find the root cause to the problem:
  • Is your deployment package possibly missing a dll or two?
  • Can you do a diff between the Test server's bin folder and the dmz server's bin folder, including DLL versions?
  • Are there other things on the DMZ server using older versions of EntLib?
  • Is there any way to test the deployment on a machine running Win2k3 with the service packs to isolate that difference as the possible cause of the problem?

Please let me know if any of this helped, and if you have more challenges,
Mar 23, 2007 at 10:39 PM
Thanks Mike. You have given me some good suggestions to consider.

I will be visiting the data center (at a client site) again next week so I will investigate your suggestions then. I know that EntLib June 2005 is installed on that box. Is there a need to actually install the newer EntLib on the server, or is it sufficient to have the required DLLs in the bin folder of the web site? (I don't believe that the installer does any GAC'ing of those DLLs.

I just learned that the OS did not have service packs applied. I will try to get that updated taken care of, both to get to the most current environment, and to see if it fixes this problem.

-Scott
Mar 23, 2007 at 11:08 PM
You should not need to do an install of the EntLib dlls. They should be XCopy deployable.

Keep us informed. And let us know if patching the OS fixes the problem, so we can share the info with the rest of the community.

Good luck
Mar 29, 2007 at 4:27 PM
I am happy, and relieved, to report that I resolved this issue.

I had the latest OS service pack applied, which didn't help.
I deleted the installed version of EntLib (June 2005), which didn't help.

In the end, I discovered it was that the module folder "admin" was set as an application in IIS. Any time this application was accessed, it threw an error because it couldn't find the CompositeWeb dll. The underlying problem is that I was replacing an older version of this web site with the new project created in WCSF. I don't know why that directory was configured as an application in IIS, but when I put my code into wwwroot, IIS continued to treat it as an application.

Thank you for your suggestions on troubleshooting this problem. This is the only problem I've had with WCSF, and it was really my problem, not that of WCSF. Now that I learned some of the things I should have done better with WCSF from the training sessions, I have to go back and improve a few things, too.

-Scott
Mar 29, 2007 at 6:45 PM
Fantastic!
I'm glad you were able to get this figured out. I'm even happier that it was an environmental issue, and not a WCSF or CWAB related problem. ;-)

Let us know if you run into any other challenges.
Even more important, if there are helpful hints you want to share with the community, please do so here on the discussion boards.

Jul 6, 2007 at 11:49 PM
Even i have the same issue. I run into this issue if i have a virtual folder under the website.

I need to have two different web.configs (Mixed mode of authentication)

please suggest