问题
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.
- you need a provider for Oracle
- 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