J
js
I got this error when I moved my application to a new Windows 2003
server. I installed and recompiled the
'Microsoft.Practices.EnterpriseLibrary - June 2005" then added these
assemblies to the development machine's Assembly Cache. The assemblies
version appears to be 1.1.0.0. I changed the project reference to the
newly compiled EnterpriseLibrary DLLs. The Web.Config of my
application root, I also have the following <configSections>. I don't
know why at runtime it is still asking for
Microsoft.Practices.EnterpriseLibrary.Data, Version=1.0.0.0. Please
help. Thanks.
======================== My Web.Config (partial)
==========================
<configSections>
<section name="enterpriselibrary.configurationSettings"
type="Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationManagerSectionHandler,
Microsoft.Practices.EnterpriseLibrary.Configuration,
Version=1.1.0.0,
Culture=neutral,
PublicKeyToken=60c24972b7c20af7" />
</configSections>
<enterpriselibrary.configurationSettings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
applicationName="DMS_ASPX"
xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/configuration">
<configurationSections>
<configurationSection xsi:type="ReadOnlyConfigurationSectionData"
name="dataConfiguration" encrypt="false">
<storageProvider xsi:type="XmlFileStorageProviderData"
name="XML File Storage Provider" path="dataConfiguration.config" />
<dataTransformer xsi:type="XmlSerializerTransformerData"
name="Xml Serializer Transformer">
<includeTypes />
</dataTransformer>
</configurationSection>
</configurationSections>
<keyAlgorithmStorageProvider xsi:nil="true" />
<includeTypes />
</enterpriselibrary.configurationSettings>
========================= Runtime Error =========================
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: The format of the
file 'Microsoft.Practices.EnterpriseLibrary.Data' is invalid.
Source Error:
[No relevant source lines]
Source File: c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET Files\root\88f31b66\ffb9ac8b\x-56vhi4.0.cs Line: 0
Assembly Load Trace: The following information can be helpful to
determine why the assembly 'Microsoft.Practices.EnterpriseLibrary.Data'
could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary.Data,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=60c24972b7c20af7
(Fully-specified)
LOG: Appbase = file:///C:/Inetpub/DMS_Net
LOG: Initial PrivatePath = bin
Calling assembly : DMS_ASPX, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null.
===
LOG: Publisher policy file is not found.
LOG: No redirect found in host configuration file
(c:\windows\microsoft.net\framework\v1.1.4322\aspnet.config).
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Post-policy reference: Microsoft.Practices.EnterpriseLibrary.Data,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=60c24972b7c20af7
LOG: Attempting download of new URL
file:///c:/windows/microsoft.net/framework/v1.1.4322/Temporary ASP.NET
Files/root/88f31b66/ffb9ac8b/Microsoft.Practices.EnterpriseLibrary.Data.DLL.
LOG: Attempting download of new URL
file:///c:/windows/microsoft.net/framework/v1.1.4322/Temporary ASP.NET
Files/root/88f31b66/ffb9ac8b/Microsoft.Practices.EnterpriseLibrary.Data/Microsoft.Practices.EnterpriseLibrary.Data.DLL.
LOG: Attempting download of new URL
file:///C:/Inetpub/DMS_Net/bin/Microsoft.Practices.EnterpriseLibrary.Data.DLL.
Stack Trace:
[BadImageFormatException: The format of the file
'Microsoft.Practices.EnterpriseLibrary.Data' is invalid.]
DMS_ASPX.Helper.DataBroker..ctor() +0
DMS_ASPX.form.main..ctor() +53
ASP.main_aspx..ctor() in
c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\root\88f31b66\ffb9ac8b\x-56vhi4.0.cs:0
[TargetInvocationException: Exception has been thrown by the target of
an invocation.]
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) +0
System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
System.Web.UI.TemplateControlParser.GetCompiledInstance(String
virtualPath, String inputFile, HttpContext context) +164
[HttpException (0x80004005): Failed to create page of type
'ASP.main_aspx'.]
System.Web.UI.TemplateControlParser.GetCompiledInstance(String
virtualPath, String inputFile, HttpContext context) +341
System.Web.UI.PageParser.GetCompiledPageInstanceInternal(String
virtualPath, String inputFile, HttpContext context) +43
System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context,
String requestType, String url, String path) +44
System.Web.HttpApplication.MapHttpHandler(HttpContext context,
String requestType, String path, String pathTranslated, Boolean
useAppConfig) +699
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
+95
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +173
server. I installed and recompiled the
'Microsoft.Practices.EnterpriseLibrary - June 2005" then added these
assemblies to the development machine's Assembly Cache. The assemblies
version appears to be 1.1.0.0. I changed the project reference to the
newly compiled EnterpriseLibrary DLLs. The Web.Config of my
application root, I also have the following <configSections>. I don't
know why at runtime it is still asking for
Microsoft.Practices.EnterpriseLibrary.Data, Version=1.0.0.0. Please
help. Thanks.
======================== My Web.Config (partial)
==========================
<configSections>
<section name="enterpriselibrary.configurationSettings"
type="Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationManagerSectionHandler,
Microsoft.Practices.EnterpriseLibrary.Configuration,
Version=1.1.0.0,
Culture=neutral,
PublicKeyToken=60c24972b7c20af7" />
</configSections>
<enterpriselibrary.configurationSettings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
applicationName="DMS_ASPX"
xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/configuration">
<configurationSections>
<configurationSection xsi:type="ReadOnlyConfigurationSectionData"
name="dataConfiguration" encrypt="false">
<storageProvider xsi:type="XmlFileStorageProviderData"
name="XML File Storage Provider" path="dataConfiguration.config" />
<dataTransformer xsi:type="XmlSerializerTransformerData"
name="Xml Serializer Transformer">
<includeTypes />
</dataTransformer>
</configurationSection>
</configurationSections>
<keyAlgorithmStorageProvider xsi:nil="true" />
<includeTypes />
</enterpriselibrary.configurationSettings>
========================= Runtime Error =========================
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: The format of the
file 'Microsoft.Practices.EnterpriseLibrary.Data' is invalid.
Source Error:
[No relevant source lines]
Source File: c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET Files\root\88f31b66\ffb9ac8b\x-56vhi4.0.cs Line: 0
Assembly Load Trace: The following information can be helpful to
determine why the assembly 'Microsoft.Practices.EnterpriseLibrary.Data'
could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary.Data,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=60c24972b7c20af7
(Fully-specified)
LOG: Appbase = file:///C:/Inetpub/DMS_Net
LOG: Initial PrivatePath = bin
Calling assembly : DMS_ASPX, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null.
===
LOG: Publisher policy file is not found.
LOG: No redirect found in host configuration file
(c:\windows\microsoft.net\framework\v1.1.4322\aspnet.config).
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Post-policy reference: Microsoft.Practices.EnterpriseLibrary.Data,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=60c24972b7c20af7
LOG: Attempting download of new URL
file:///c:/windows/microsoft.net/framework/v1.1.4322/Temporary ASP.NET
Files/root/88f31b66/ffb9ac8b/Microsoft.Practices.EnterpriseLibrary.Data.DLL.
LOG: Attempting download of new URL
file:///c:/windows/microsoft.net/framework/v1.1.4322/Temporary ASP.NET
Files/root/88f31b66/ffb9ac8b/Microsoft.Practices.EnterpriseLibrary.Data/Microsoft.Practices.EnterpriseLibrary.Data.DLL.
LOG: Attempting download of new URL
file:///C:/Inetpub/DMS_Net/bin/Microsoft.Practices.EnterpriseLibrary.Data.DLL.
Stack Trace:
[BadImageFormatException: The format of the file
'Microsoft.Practices.EnterpriseLibrary.Data' is invalid.]
DMS_ASPX.Helper.DataBroker..ctor() +0
DMS_ASPX.form.main..ctor() +53
ASP.main_aspx..ctor() in
c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\root\88f31b66\ffb9ac8b\x-56vhi4.0.cs:0
[TargetInvocationException: Exception has been thrown by the target of
an invocation.]
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) +0
System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
System.Web.UI.TemplateControlParser.GetCompiledInstance(String
virtualPath, String inputFile, HttpContext context) +164
[HttpException (0x80004005): Failed to create page of type
'ASP.main_aspx'.]
System.Web.UI.TemplateControlParser.GetCompiledInstance(String
virtualPath, String inputFile, HttpContext context) +341
System.Web.UI.PageParser.GetCompiledPageInstanceInternal(String
virtualPath, String inputFile, HttpContext context) +43
System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context,
String requestType, String url, String path) +44
System.Web.HttpApplication.MapHttpHandler(HttpContext context,
String requestType, String path, String pathTranslated, Boolean
useAppConfig) +699
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
+95
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +173