|
 | |
 | przemeklach | Asp.Net User |
| Could not load file or assembly 'System.Data' or one of its dependencies | 1/19/2008 5:42:16 AM |
0 |   |
|
Hopefully I got the right forum here.
I've converted a web application from ASP.NET 2.0 in VS 2005 to ASP.NET 3.5 in VS 2008. When I run the site from within VS everything works fine. When I deploy it to my local IIS 7 server I get the following error.
Server Error in '/PrzemekLach' Application.
Could not load file or assembly 'System.Data' or one of its dependencies. An attempt was made to load a program with an incorrect format. 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: Could not load file or assembly 'System.Data' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. | Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Data' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
| Stack Trace:
[BadImageFormatException: Could not load file or assembly 'System.Data' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +465
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +181
System.Reflection.Assembly.Load(String assemblyString) +42
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +190
[ConfigurationErrorsException: Could not load file or assembly 'System.Data' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +3642024
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +402
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +155
System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +36
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +235
System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +214
System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +57
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +259
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +406
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +125
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +203
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +52
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +50
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +419
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +274
|
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
From that last line it appears the IIS is running only ASP.NET 2.0xxx. I have ASP.NET 3.5 installed.
So, is the problem in fact that IIS is using the wrong version of ASP.NET and if so how do I go about changing it. Or is this another problem altogether.
Thanks in advance. |
 | rjcox | Asp.Net User |
| Re: Could not load file or assembly 'System.Data' or one of its dependencies | 1/19/2008 8:15:27 AM |
0 |   |
|
First, enabling assembly load logging (easiest way is with fuslogvw.exe tool) will allow you to see what .NET is trying to load (and from where).
przemeklach:From that last line it appears the IIS is running only ASP.NET 2.0xxx. I have ASP.NET 3.5 installed.
So, is the problem in fact that IIS is using the wrong version of ASP.NET and if so how do I go about changing it. Or is this another problem altogether. .NET 3.5 is new compilers and assemblies added on top of 3.0, which was assemblies added on top of 2.0: i.e. to use .NET 3.5, you need IIS configured to be ASP.NET 2.0.
Richard |
 | przemeklach | Asp.Net User |
| Re: Could not load file or assembly 'System.Data' or one of its dependencies | 1/19/2008 7:26:56 PM |
0 |   |
|
Thanks for your reply.
I started the Assembly Binding Log Viewer and ran my site in IE. Nothing showed up in the logger.
I went through all the settings in IIS. I'm not sure where I'm supposed to look to see if IIS is configure for ASP.NET 2.0. In my Application Pool settings the .NET version is set to v2.0xxx. I'm assuming that is it?
Thanks. |
 | rjcox | Asp.Net User |
| Re: Could not load file or assembly 'System.Data' or one of its dependencies | 1/20/2008 8:04:34 AM |
0 |   |
|
przemeklach:In my Application Pool settings the .NET version is set to v2.0xxx. I'm assuming that is it? You should be checking this on the web site root or virtual directory rather than application pool. przemeklach:Nothing showed up in the logger. Hmm.... another route to getting this data is to look at the details of the exception... you'll need to ensure debugger is running and stop on the exception to look at the details. All of this seems to be either a configuration problem (which can be all about the details -- double check everything like the output from "aspnet_regiis -lk"), or the .NET installation has been corrupted (but this seems a lot less likely).
Richard |
 | przemeklach | Asp.Net User |
| Re: Could not load file or assembly 'System.Data' or one of its dependencies | 1/21/2008 8:09:28 PM |
0 |   |
|
I could not find a drop down anywhere where I can switch between the differnet versions of .NET. When I looked under the .NET Compilations/Assemblies settings I saw a mixture of 2.0, 3.0 and 3.5 ASP.NET assembly references. Not sure if that is where I'm supposed to look and if these are correct? Can you tell me where I'm supposed to look? I'm not that familiar with IIS.
I'm don't know where to get the output from aspnet_regiis. I ran my site again and for some reason I got more error information this time. Here it is, maybe this is what you're looking for. I've also attached my web.config file. 1 Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
2 Running under executable c:\windows\system32\inetsrv\w3wp.exe
3 --- A detailed error log follows.
4
5 === Pre-bind state information ===
6 LOG: User = NT AUTHORITY\NETWORK SERVICE
7 LOG: DisplayName = System.Data
8 (Partial)
9 LOG: Appbase = file:///C:/inetpub/wwwroot/PrzemekLach/
10 LOG: Initial PrivatePath = C:\inetpub\wwwroot\PrzemekLach\bin
11 Calling assembly : (Unknown).
12 ===
13 LOG: This bind starts in default load context.
14 LOG: Using application configuration file: C:\inetpub\wwwroot\PrzemekLach\web.config
15 LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
16 LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
17 LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
18 LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/przemeklach/e61519c5/f77cb8c9/System.Data.DLL.
19 LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/przemeklach/e61519c5/f77cb8c9/System.Data/System.Data.DLL.
20 LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/PrzemekLach/bin/System.Data.DLL.
21 ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
22
1
2 <configuration>
3 <configSections>
4 <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
5 <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
6 <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
7 <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
8 <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
9 <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
10 <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
11 <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
12 </sectionGroup>
13 </sectionGroup>
14 </sectionGroup>
15 </configSections>
16 <appSettings/>
17 <connectionStrings>
18 <add name="database" connectionString="Data Source=localhost;Initial Catalog=****;Persist Security Info=True;UID=****;PWD=****;" providerName="System.Data.SqlClient"/>
19 <!--<add name="database" connectionString="Data Source=****;Initial Catalog=****;Persist Security Info=True;UID=****;PWD=****" providerName="System.Data.SqlClient"/>-->
20 </connectionStrings>
21 <system.web>
22 <compilation debug="true">
23 <assemblies>
24 <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
25 <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
26 <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
27 <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
28 <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
29 <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
30 </assemblies>
31 </compilation>
32 <!--<authentication mode="Windows"/>-->
33 <authentication mode="Forms">
34 <forms loginUrl="Default.aspx" protection="Validation" timeout="300"/>
35 </authentication>
36 <authorization>
37 <allow users="*"/>
38 </authorization>
39 <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
40 <membership>
41 <providers>
42 <remove name="AspNetSqlMembershipProvider"/>
43 <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider,System.Web, Version=2.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="database" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
44 </providers>
45 </membership>
46 <profile>
47 <providers>
48 <remove name="AspNetSqlProfileProvider"/>
49 <add name="AspNetSqlProfileProvider" connectionStringName="database" applicationName="/" type="System.Web.Profile.SqlProfileProvider,System.Web, Version=2.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"/>
50 </providers>
51 </profile>
52 <roleManager enabled="true">
53 <providers>
54 <remove name="AspNetSqlRoleProvider"/>
55 <add name="AspNetSqlRoleProvider" connectionStringName="database" applicationName="/" type="System.Web.Security.SqlRoleProvider,System.Web, Version=2.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"/>
56 </providers>
57 </roleManager>
58 <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
59 <providers>
60 <add name="XmlSiteMapProvider" description="SiteMap provider which reads in .sitemap XML files." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="Web.sitemap" securityTrimmingEnabled="true"/>
61 </providers>
62 </siteMap>
63 <pages theme="Default" masterPageFile="~/Default.master" maintainScrollPositionOnPostBack="true">
64 <controls>
65 <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
66 <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
67 </controls>
68 </pages>
69 <httpHandlers>
70 <remove verb="*" path="*.asmx"/>
71 <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
72 <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
73 <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
74 </httpHandlers>
75 <httpModules>
76 <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
77 </httpModules>
78 </system.web>
79 <location path="Admin">
80 <system.web>
81 <authorization>
82 <allow roles="Administrators"/>
83 <deny users="*"/>
84 </authorization>
85 </system.web>
86 </location>
87 <system.codedom>
88 <compilers>
89 <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
90 <providerOption name="CompilerVersion" value="v3.5"/>
91 <providerOption name="WarnAsError" value="false"/>
92 </compiler>
93 <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
94 <providerOption name="CompilerVersion" value="v3.5"/>
95 <providerOption name="OptionInfer" value="true"/>
96 <providerOption name="WarnAsError" value="false"/>
97 </compiler>
98 </compilers>
99 </system.codedom>
100 <system.webServer>
101 <validation validateIntegratedModeConfiguration="false"/>
102 <modules>
103 <remove name="ScriptModule"/>
104 <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
105 </modules>
106 <handlers>
107 <remove name="WebServiceHandlerFactory-Integrated"/>
108 <remove name="ScriptHandlerFactory"/>
109 <remove name="ScriptHandlerFactoryAppServices"/>
110 <remove name="ScriptResource"/>
111 <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
112 <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
113 <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
114 </handlers>
115 </system.webServer>
116 <runtime>
117 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
118 <dependentAssembly>
119 <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
120 <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
121 </dependentAssembly>
122 <dependentAssembly>
123 <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
124 <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
125 </dependentAssembly>
126 </assemblyBinding>
127 </runtime>
128 </configuration>
129
|
 | przemeklach | Asp.Net User |
| Re: Could not load file or assembly 'System.Data' or one of its dependencies | 1/23/2008 1:22:13 AM |
0 |   |
|
So I still have no solution. I started a project from scratch and I tested it everytime I added something. I incrementally added stuff: masterpage, sitemaps etc... each time testing to see if things would run. The error came up when I added an AJAX extender to a button.
The setup of IIS 7 that I have is just the default one. I'm confused as to why no one else has had this problem. What I'm trying to do here is run a simple website with and AJAX control. Has no one else done this yet? |
 | rjcox | Asp.Net User |
| Re: Could not load file or assembly 'System.Data' or one of its dependencies | 1/23/2008 8:38:51 AM |
0 |   |
|
przemeklach:I saw a mixture of 2.0, 3.0 and 3.5 ASP.NET assembly references. Not sure if that is where I'm supposed to look and if these are correct
That is what you will see,. both 3.0 and 3.5 are incremental additons to 2.0 core (now with SP1).
przemeklach:I'm don't know where to get the output from aspnet_regiis.
You run it from the command line, it outputs to standard output.
przemeklach:I got more error information this time. Here it is, maybe this is what you're looking for.
Yes... and it shows there is something wrong, why is there no looking for the assembly in the GAC?
This is what I get from looking for System.Data (with correct full assembly name):
*** Assembly Binder Log Entry (2008-01-23 @ 08:26:42) ***
The operation was successful. Bind result: hr = 0x0. The operation completed successfully.
Assembly manager loaded from: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll Running under executable C:\Documents and Settings\richard_cox\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\bin\Debug\ConsoleApplication1.exe --- A detailed error log follows.
=== Pre-bind state information === LOG: User = XX\YY LOG: DisplayName = System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (Fully-specified) LOG: Appbase = file:///C:/Documents and Settings/YY/Local Settings/Application Data/Temporary Projects/ConsoleApplication1/bin/Debug/ LOG: Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base = NULL LOG: AppName = NULL Calling assembly : ConsoleApplication1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. === LOG: This bind starts in default load context. LOG: No application configuration file found. LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Post-policy reference: System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 LOG: Reusing an assembly instance that was previously loaded (C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll).
(With domain/usernames deliberately obscured.) Note that System.Data was already loaded.
But, if I try and load something that does not exist (slight change to the name):
*** Assembly Binder Log Entry (2008-01-23 @ 08:31:39) ***
The operation failed. Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll Running under executable C:\Documents and Settings\richard_cox\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\bin\Debug\ConsoleApplication1.exe --- A detailed error log follows.
=== Pre-bind state information === LOG: User = XX\YY LOG: DisplayName = SystemX.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (Fully-specified) LOG: Appbase = file:///C:/Documents and Settings/YY/Local Settings/Application Data/Temporary Projects/ConsoleApplication1/bin/Debug/ LOG: Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base = NULL LOG: AppName = NULL Calling assembly : ConsoleApplication1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. === LOG: This bind starts in default load context. LOG: No application configuration file found. LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Post-policy reference: SystemX.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 LOG: GAC Lookup was unsuccessful. LOG: Attempting download of new URL file:///C:/Documents and Settings/richard_cox/Local Settings/Application Data/Temporary Projects/ConsoleApplication1/bin/Debug/SystemX.Data.DLL. LOG: Attempting download of new URL file:///C:/Documents and Settings/richard_cox/Local Settings/Application Data/Temporary Projects/ConsoleApplication1/bin/Debug/SystemX.Data/SystemX.Data.DLL. LOG: Attempting download of new URL file:///C:/Documents and Settings/richard_cox/Local Settings/Application Data/Temporary Projects/ConsoleApplication1/bin/Debug/SystemX.Data.EXE. LOG: Attempting download of new URL file:///C:/Documents and Settings/richard_cox/Local Settings/Application Data/Temporary Projects/ConsoleApplication1/bin/Debug/SystemX.Data/SystemX.Data.EXE. LOG: All probing URLs attempted and failed.
Note the highlighted lines [Appears highlighting gets lost when I post... lines starting "LOG: DisplayName" and "LOG: GAC Lookup"]:
- In your log it shows "System.Data" for the display name, not the strong name. How exactly are you referencing System.Data?
- There was a check in the GAC before probing application local paths.
It seems there is either something seriously wrong with your setup/configuration. Or that something is wrong with the reference to System.Data in the code.
For the first I can only think that a uninstall/reinstall is the approach (but if significantly broken may require an OS reinstall). For the latter try looking at the references in the compiled assembly (using IDLASM or (easier) Reflector for .NET).
Richard |
 | przemeklach | Asp.Net User |
| Re: Could not load file or assembly 'System.Data' or one of its dependencies | 1/24/2008 2:10:53 AM |
0 |   |
|
When I try to run aspnet_regiis from the command line, it tells me that it's not recognized as an internal or external command.....
I searched my HD for aspnet_regiis and nothing was found either.
I downloaded Reflector but I don't really know what to do with it. When I start it up I get list of assemblies. System.Data is in the list and its path is: %SystemRoot%\Microsoft.net\Framework\v2.0.50727\System.Data.dll. Not sure if that's right or not.
Despite all this I have found a solution for my problem. I use a web deployment project to pre-compile, merge and move my site from my development folder to my C:\inetpub\wwwroot\PrzemekLach directory. When I run the deployment poject it creates a whole bunch of assemblies in both my development bin folder and the bin folder in the C:\inetpub\wwwroot\PrzemekLach directory, these include: System.Data.dll, System.Data.OracleClient.dll, System.EnterprisesServices.dll just to name a few.
If I move the site manually, without precompiling and using the deployment project the website runs fine. What gives? Why is it doing this?
Thanks in advance. |
 | rjcox | Asp.Net User |
| Re: Could not load file or assembly 'System.Data' or one of its dependencies | 1/24/2008 8:17:41 AM |
0 |   |
|
przemeklach:I searched my HD for aspnet_regiis and nothing was found either. It should be in %WinDir%\Microsoft.NET\Framework\v2.0.50727 If not you don't have a complete install. przemeklach:I downloaded Reflector
Select something (e.g. an assembly, or a function) in the tree, and press space to expand to show details (assembly level attributes, code). Details for a reference is the compiled in stroing name. przemeklach:Despite all this I have found a solution for my problem. I Good. przemeklach:hese include: System.Data.dll, System.Data.OracleClient.dll, System.EnterprisesServices.dll I think you have a problem, core .NET dll's should not be included directly in an install... but I'm not expert on deployment projects so don't know how they know what is part of the .NET install itself and what is part of the application install.
Richard |
|
| |
Free Download:
Books: Professional SQL server 2005 CLR programming: with stored procedures ... Authors: Derek Comingore, Douglas Hinson, Pages: 409, Published: 2006 Beginning Db2: From Novice To Professional Authors: Grant Allen, Pages: 542, Published: 2008 Beginning DB2: From Novice to Professional Authors: Grant Allen, Pages: 515, Published: 2008 Professional SQL server 2005 integration services Authors: Brian Knight, Allan Mitchell, Darren Green, Pages: 692, Published: 2006 Professional Excel Services Authors: Shahar Prish, Pages: 445, Published: 2007 Web:Could not load file or assembly 'System.Data' or one of its ... Jan 19, 2008 ... Could not load file or assembly 'System.Data' or one of its dependencies. An attempt was made to load a program with an incorrect format. ... Could not load file or assembly 'System.Data.SqlServerCe'... Answer Could not load file or assembly 'System.Data.SqlServerCe'. ... Retargetable=Yes' or one of its dependencies. The located assembly's manifest ... Could not load file or assembly 'Microsoft.Web.Extensions, Version ... Im not sure about this part in the web.config, but if I remove it I receive a bunch of other ... Could not load file or assembly or one of its dependencies. Access ... Talk about Could not load file or assembly or one of its dependencies. ... assemblies that contained classed for the Data access and business logic layer. ... forIntrospection) at System.Reflection.Assembly.Load(String ... MySQL :: Could not load file or assembly 'MySql.Data, Version=5.1 ... Could not load file or assembly 'MySql.Data, Version=5.1.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system ...
Could not load file or assembly 'System.Data' or one of its ... Could not load file or assembly 'System.Data' or one of its dependencies. An attempt was made to load a program with an incorrect format. ... Could not load file or assembly 'System.Core, Version=3.5.0.0 ... Parser Error Message: Could not load file or assembly 'System. ... Culture= neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. ... Line 47: Microsoft.VisualBasic DLL giving me problems (could not load file ... I assume it's pulling Microsoft.VisualBasic from the GAC. Could it be .... Could not load file or assembly 'System.Data' or one of its . ... System.Data.Entity Configuration Error on LINQ WebSite App ... Parser Error Message: Could not load file or assembly 'System.Data. ... PublicKeyToken=b77a5c561934e089' or one of its dependencies. ... Missing Assemblies - ng.asp-net-forum.visual_studio_2008 Parser Error Message: Could not load file or assembly 'System. ... Culture= neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. ... Line 44:
|
|
|