Web Client Software Factory Hands-On Labs: ConfigurationErrors Exception

Jan 21, 2009 at 4:58 PM
Hi, I'm doing the lab #6 (Authorization) of WCSF, but i'm having a problem.

As you may know the labs and solutions are based on Enterprise Library 3.0 and Visual Studio 2005. I'm using Enterprise Library 4.1 and visual studio 2008.

There was no problem making the changes during the other labs but i found an exception when i was about to do the verification on lab #6.

First there was an execution error:

Class: ShellModuleInitializer
Method: AddGlobalServices
On the line: globalServices.AddNew<EnterpriseLibraryAuthorizationService, IAuthorizationService>();

An error occurred creating the configuration section handler for securityConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Security, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) (C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\GlobalBank\WebSites\GlobalBank\web.config line 12)

Then I continued the exution in order to find all the stack trace:

<title>Configuration Error</title> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } </style>

Configuration Error

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: An error occurred creating the configuration section handler for securityConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Security, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

Line 10: <configuration>
Line 11:   <configSections>
Line 12:     <section name="securityConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Security.Configuration.SecuritySettings, Microsoft.Practices.EnterpriseLibrary.Security, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
Line 13:     <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
Line 14:     <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

Source File: C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\GlobalBank\WebSites\GlobalBank\web.config    Line: 12

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Practices.EnterpriseLibrary.Security, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.

=== Pre-bind state information ===
LOG: User = DESA03\Administrator
LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary.Security, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
 (Fully-specified)
LOG: Appbase = file:///C:/Documents and Settings/Administrator/My Documents/Visual Studio 2008/Projects/GlobalBank/WebSites/GlobalBank/
LOG: Initial PrivatePath = C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\GlobalBank\WebSites\GlobalBank\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\GlobalBank\WebSites\GlobalBank\web.config
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Microsoft.Practices.EnterpriseLibrary.Security, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/globalbank/1fcc728d/9fe1c3f/Microsoft.Practices.EnterpriseLibrary.Security.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/globalbank/1fcc728d/9fe1c3f/Microsoft.Practices.EnterpriseLibrary.Security/Microsoft.Practices.EnterpriseLibrary.Security.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/Administrator/My Documents/Visual Studio 2008/Projects/GlobalBank/WebSites/GlobalBank/bin/Microsoft.Practices.EnterpriseLibrary.Security.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.



If anyone know how to solve the problem... I'll be very grateful.

Thanks

Jan 21, 2009 at 5:06 PM
Sorry my fault, please delete this post...

I'm really sorry i posted it on the wrong discussion page.