Connection between Asp.Net and Oracle 10g Express Edition
- by l3gion
Hello,
I'm struggling to find a way to connect my Asp .Net + C# application with my Oracle 10g Express Edition.
Here's my scenario, I'm at Mac OS and I have 2 Virtual machines, one for Win 7 (VS 2010 app) and another with a Parallels Virtual Appliance with Oracle 10g Express Edition 1.1.
Which provider (Oledb, ODP.NET, etc..) should I use? How to make the connection to the server in C#?
Right now I have this:
<appSettings>
<add key="conn" value="Data Source=10.211.55.11;Persist Security Info=True;User ID=l3gion;Password=l3gion;" />
</appSettings>
And at the .cs file:
SqlCommand cmd = new SqlCommand("insert_thing", new SqlConnection(ConfigurationManager.AppSettings["conn"]));
cmd.CommandType = CommandType.StoredProcedure;
*insert_thing is a stored procedure
Using this I got this error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
I've searched for some possible solutions. Tried some, including: firewall disabled, allow remote connection at oracle express edition using this cmd line ("EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);")..
The error persists.
Can anyone guide me into the right direction? I'm a newbie with this type of things.
Thank you for your patience.
regards