System.TypeInitializationException:' Oracle.DataAccess.Client.OracleConnection'的类型初始值设定项引发异常 [英] System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception

查看:46
本文介绍了System.TypeInitializationException:' Oracle.DataAccess.Client.OracleConnection'的类型初始值设定项引发异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用C#和Oracle作为数据库在asp.net中开发Windows应用程序.最初,应用程序的某些模块是使用实体框架制作的,因此,我试图替换实体框架代码以简单地调用存储过程.

I am developing Windows application in asp.net with C# and Oracle as database. Here initially the application's some modules were made using entity framework, so am trying to replace the entity framework code to simply call stored procedure.

所以我做到了,应用程序在服务器上可以正常工作,但是当应用程序在客户端计算机上运行时,它会给出以下错误.

So I did that the application works fine on server but when application is run on client machine then it gives below error.

推荐答案

如果没有其他效果.试试这个:

If nothing else works. Try this:

Project > properties > complie > check prefer 32 bit

这为我解决了这个问题.

This solved this for me.

这篇关于System.TypeInitializationException:' Oracle.DataAccess.Client.OracleConnection'的类型初始值设定项引发异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆