This content has been marked as final. Show 2 replies
As a followup to this - I deleted everything off the server and republished. Then, watching the video, I followed along step by step. Everything appeared to work fine for my test page.
I am a little bit lost however, trying to implement this in the rest of my application. The documentation doesn't have an example (that I can see, anyway) for how to reference the managed client in the <connectionStrings> section of my web.config file.
I am also not too clear, if I need to have the tnsnames.ora file in my /bin/debug folder, if I have defined a connection string like this.
<add name="MYNAME" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MYHOST)(PORT=MYPORT))(CONNECT_DATA=(SERVICE_NAME=MYSERVICENAME)));User Id=USERID;Password=PASSWORD;Persist Security Info=False" providerName="Oracle.ManagedDataAccess.Client" />
(actual values in the above tag removed to protect the innocent...)
Is Oracle.ManagedDataAccess.Client the preferred providerName for this tag?
Currently, I am getting the following error:
Unable to find the requested .Net Framework Data Provider. It may not be installed
I ended up adding this to the <configuration> section in web.config:
<remove invariant="Oracle.ManagedDataAccess" />
<add name="Oracle Managed Data Provider for .NET" invariant="Oracle.ManagedDataAccess" description="Oracle Managed Data Provider for .NET" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=126.96.36.199, Culture=neutral, PublicKeyToken=89b483f429c47342" />
The connection string ended up looking like this:
<add name="ConnectionName" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx.xxx.xxx.xxx)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=xxxx)));User Id=xxxx;Password=xxxx;Persist Security Info=False" providerName="Oracle.ManagedDataAccess" />
If you reference the provider in an asp:SqlDataSource tag, be sure to reference it as:
Hopefully this helps someone else out!