Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá,
Estou tentando resolver um problema de conexão ao utilizar um Webservice para receber um pedido de venda e gravar no banco. Ja instalei o provedor .net oracle, mas se não coloco o arquivo Oracle.DataAccess.dll na pasta da aplicação, ele fala que o provedor .net não está intalado. Já quando eu coloco esse arquivo na pasta ele da a seguinte mensagem:
O cliente encontrou o tipo de conteúdo de resposta de 'text/html; charset=utf-8', mas esperava 'text/xml'.
Falha na solicitação com mensagem de erro:
--
<html>
<head>
<title>Não foi possível carregar arquivo ou assembly 'Oracle.DataAccess' ou uma de suas dependências. Foi feita uma tentativa de se carregar um programa com um formato incorreto.</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>
</head>
<body bgcolor="white">
<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
<h2> <i>Não foi possível carregar arquivo ou assembly 'Oracle.DataAccess' ou uma de suas dependências. Foi feita uma tentativa de se carregar um programa com um formato incorreto.</i> </h2></span>
<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
<b> Description: </b>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.
<br><br>
<b> Exception Details: </b>System.BadImageFormatException: Não foi possível carregar arquivo ou assembly 'Oracle.DataAccess' ou uma de suas dependências. Foi feita uma tentativa de se carregar um programa com um formato incorreto.<br><br>
<b>Source Error:</b> <br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>
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.</code>
</td>
</tr>
</table>
<br>
<b>Assembly Load Trace:</b> The following information can be helpful to determine why the assembly 'Oracle.DataAccess' could not be loaded.<br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>
AVI: o log de ligações de assembly está desativado.
Para ativar o log de falhas de assembly, defina o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) como 1.
Observação: há alguma penalidade para o desempenho associada ao log de falha de ligação de assembly.
Para desativar esse recurso, remova o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog].
</pre></code>
</td>
</tr>
</table>
<br>
<b>Stack Trace:</b> <br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>
[badImageFormatException: Não foi possível carregar arquivo ou assembly 'Oracle.DataAccess' ou uma de suas dependências. Foi feita uma tentativa de se carregar um programa com um formato incorreto.]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
[ConfigurationErrorsException: Não foi possível carregar arquivo ou assembly 'Oracle.DataAccess' ou uma de suas dependências. Foi feita uma tentativa de se carregar um programa com um formato incorreto.]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +618
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +209
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +94
System.Web.Compilation.BuildManager.CallPreStartInitMethods() +332
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677
[HttpException (0x80004005): Não foi possível carregar arquivo ou assembly 'Oracle.DataAccess' ou uma de suas dependências. Foi feita uma tentativa de se carregar um programa com um formato incorreto.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9089964
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258
</pre></code>
</td>
</tr>
</table>
<br>
<hr width=100% size=1 color=silver>
<b>Version Information:</b> Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
</font>
</body>
</html>
<!--
[badImageFormatException]: Não foi possível carregar arquivo ou assembly 'Oracle.DataAccess' ou uma de suas dependências. Foi feita uma tentativa de se carregar um programa com um formato incorreto.
em System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
em System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
em System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
em System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
em System.Reflection.Assembly.Load(String assemblyString)
em System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
[ConfigurationErrorsException]: Não foi possível carregar arquivo ou assembly 'Oracle.DataAccess' ou uma de suas dependências. Foi feita uma tentativa de se carregar um programa com um formato incorreto.
em System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
em System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
em System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai)
em System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)
em System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies()
em System.Web.Compilation.BuildManager.CallPreStartInitMethods()
em System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
[HttpException]: Não foi possível carregar arquivo ou assembly 'Oracle.DataAccess' ou uma de suas dependências. Foi feita uma tentativa de se carregar um programa com um formato incorreto.
em System.Web.HttpRuntime.FirstRequestInit(HttpContext context)
em System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
em System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
-->
--.
Muito Obrigado,
Jeremias
Esqueci de mencionar... criei o assemblie do arquivo Oracle.DataAccess.dll. Mas ele informa alguma divergência entre o assemplie e o arquivo.
Carregando comentários...