In my controller I have a JsonResult
function called by a Javascript that's called by a button in View
. this will save input from textbox to database table. But in it's first line of code (connecting to Oracle), it's alread having an error:
using (var con = new OracleConnection(ConfigurationManager.ConnectionStrings["DBEntities"].ConnectionString))
An exception of type 'System.ArgumentException' occurred in Oracle.DataAccess.dll but was not handled in user code
Additional information: 'metadata' is an invalid connection string attribute
Here's my auto-generated connectionString in web.config:
<add name="DBEntities" connectionString="metadata=res://*/DBModel.csdl|res://*/DBModel.ssdl|res://*/DBModel.msl;provider=Oracle.ManagedDataAccess.Client;provider connection string="DATA SOURCE=DBDEV;PASSWORD=db;PERSIST SECURITY INFO=True;USER ID=db"" providerName="System.Data.EntityClient" />
What seems to be the problem? And how do I fix it?