让 MVC3 使用 Oracle 来实现用户角色和成员身份
我在让 MVC3 前端使用 Oracle 11g 数据库保存用户成员资格时遇到问题。
我一直在关注这个 简单教程,但无法让它工作。
到目前为止我已经完成的一些事情:
- 下载并安装了 Oracle Data Provider for .NET (ODAC 11.2 版本 4 (11.2.0.3.0) )
- 针对数据库运行 InstallAllOracleASPNETProviders.sql 开发服务器。
- 通过 SQL Developer 测试连接(使用 TNSNames 文件) 没有任何问题。
- 无法创建与服务器下数据库的连接 资源管理器窗格是 Visual Studio 2010,这似乎是相关的。
检查数据库后,我可以看到“ORA_ASPNET_”表已创建正常。
我很乐意指导我出错的地方,因为这应该很容易。
I'm having problems getting my MVC3 front end to use an Oracle 11g database to hold the user memberships.
I've been following this simple tutorial but can't get it to work.
Some things I've done so far:
- Downloaded and installed the Oracle Data Provider for .NET (ODAC 11.2
Release 4 (11.2.0.3.0) ) - Run the InstallAllOracleASPNETProviders.sql against the database on
the development server. - Tested the connection via SQL developer (using the TNSNames file)
with no issues. - Unable to create a connection to the database under the Server
Explorer pane is Visual Studio 2010 which seems related.
Having checked the database I can see that the "ORA_ASPNET_" tables have been created OK.
I'd appreciate a steer on where I'm going wrong as this SHOULD be easy.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该问题似乎与连接字符串有关。
我一直在使用 TNS 名称文件来获取连接详细信息,但该文件没有被获取。
我修改了连接字符串以包括服务器、端口和服务名称,如下所示:
创建连接的问题是,一旦我在“数据源名称”框中使用相同的详细信息,服务器资源管理器也会自行解决。
The problem appeared to be related to the connection string.
I had been using the TNS names file for the connection details but this wasn't being picked up.
I modified the connection string to include the server, port and service name as follows:
The problem creating the connection is the Server Explorer also resolved itself once I used the same details in the Data source name box.