Use an Oracle database with forms authentication in an MVC3 application

爷,独闯天下 提交于 2019-12-22 08:44:41

问题


I've written a simple MVC3 application and followed a tutorial on how to set up authenticated users. The tutorial used a SQL server Express database.

Is it possible to use an Oracle database instead of SQL server?

Is it just a case of changing the connection string in the web.config to point at the Oracle database... or is it a bit more in-depth than that?

<connectionStrings>
        <add name="ApplicationServices" 
             connectionString="data source=.\SQLEXPRESS;Integrated     Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
             providerName="System.Data.SqlClient" />
</connectionStrings>

回答1:


It's much more in-depth than changing the connection string in the web.config.

  1. you need a provider for Oracle
  2. sqlServer supports Integrirty Authentication which is harder to accomplish with Oracle



回答2:


Here's a tutorial you may checkout. It uses the ODP.NET driver.



来源:https://stackoverflow.com/questions/8562734/use-an-oracle-database-with-forms-authentication-in-an-mvc3-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!