gpt4 book ai didi

asp.net - OCIEnvCreate 失败错误 - 访问 .aspx 页面时

转载 作者:行者123 更新时间:2023-12-04 20:26:20 24 4
gpt4 key购买 nike

我目前在尝试通过 localhost 访问 .aspx 页面时遇到了 ASP.NET 错误。这是错误:

OCIEnvCreate 失败,返回代码 -1,但错误消息文本不可用。

说明 : 执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其起源于代码的更多信息。

异常详情 : System.Exception: OCIEnvCreate 失败,返回代码为 -1,但错误消息文本不可用。

堆栈跟踪:

[Exception: OCIEnvCreate failed with return code -1 but error message text was not available.]
System.Data.OracleClient.OciHandle..ctor(OciHandle parentHandle, HTYPE handleType, MODE ocimode, HANDLEFLAG handleflags) +363
System.Data.OracleClient.OciEnvironmentHandle..ctor(MODE environmentMode, Boolean unicode) +23
System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName) +122
System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions) +135
System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +36
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +68
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +519
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +104
System.Data.OracleClient.OracleConnection.Open() +37
Wilson.ORMapper.Internals.Connection..ctor(String connectString, CustomProvider customProvider) +287

[ORMapperException: ObjectSpace: Connection String is Invalid - OCIEnvCreate failed with return code -1 but error message text was not available.]
Wilson.ORMapper.Internals.Connection..ctor(String connectString, CustomProvider customProvider) +357
Wilson.ORMapper.Internals.Context.Init(XmlDocument xmlMappings, String connectString, CustomProvider customProvider, Int32 sessionMinutes, Int32 cleanupMinutes) +92
Wilson.ORMapper.Internals.Context..ctor(Stream mappingStream, String connectString, CustomProvider customProvider, Int32 sessionMinutes, Int32 cleanupMinutes) +171
Wilson.ORMapper.ObjectSpace..ctor(Stream mappingStream, String connectString, Provider providerType, Int32 sessionMinutes, Int32 cleanupMinutes) +66
zedi.DataManager.GetDefaultInstance() in C:\projects\FINE Application Interface\Production\On-site Backlog\Source\Code\DataAccess\ORClasses\Data\DataManager.cs:155
zedi.DataManager.get_ObjectSpaceGlobal() in C:\projects\FINE Application Interface\Production\On-site Backlog\Source\Code\DataAccess\ORClasses\Data\DataManager.cs:105
zedi.DataManager.get_ObjectSpace() in C:\projects\FINE Application Interface\Production\On-site Backlog\Source\Code\DataAccess\ORClasses\Data\DataManager.cs:129
zedi.DataObjects.CompanyBase.RetrieveQuery(ObjectQuery query) in C:\projects\FINE Application Interface\Production\On-site Backlog\Source\Code\DataAccess\ORClasses\DataObjects\Base\CompanyBase.cs:279
zedi.DataObjects.CompanyBase.RetrieveAll(String sortClause) in C:\projects\FINE Application Interface\Production\On-site Backlog\Source\Code\DataAccess\ORClasses\DataObjects\Base\CompanyBase.cs:78
maint_inetpub.siteTemplates.updateDeviceTemplate.Page_Load(Object sender, EventArgs e) in c:\projects\FINE Application Interface\Production\On-site Backlog\Source\Code\Websites\maint-inetpub\siteTemplates\updateDeviceTemplate.aspx.cs:47
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

我注意到它说我有一个无效的连接字符串,但我已经对其进行了测试并且可以正常工作。我目前安装了 Oracle 10g Express,在此之前我安装了 Oracle 8i Client。在我安装 10g Express 之前它就可以工作了。

最佳答案

我在 oracle 10g 上遇到了同样的问题,从我读到的这个错误似乎意味着 .Net oracle 驱动程序找不到 oracle 客户端。

有多种建议可以解决此问题,包括检查 PATH 和 ORACLE_HOME 环境变量;如果默认位置 (C:\oracle) 中尚未安装 oracle 客户端,则将其重新安装;或使用 oracle 的 Oracle Data Provider for .NET (ODP.NET) 而不是 Microsoft oracle 驱动程序 (System.Data.OracleClient)。

然而,以上都没有解决我的问题,所以如果有人有更多建议,他们将非常受欢迎!

关于asp.net - OCIEnvCreate 失败错误 - 访问 .aspx 页面时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/285584/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com