I built a small Service that connects to our on Premise Oracle Database, gets some data vie EF and return this data via REST/JSON.
All works fine when run locally or in our test-Environment (which is in our local network), but published on Azure the DBServer is not found although we got the local Network and the azure network connected.
The ConnectionString so far is quite usual:
Code: Select all
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (!optionsBuilder.IsConfigured)
{
if (!optionsBuilder.Options.Extensions.OfType<RelationalOptionsExtension>().Any(ext => !string.IsNullOrEmpty(ext.ConnectionString) || ext.Connection != null))
optionsBuilder.UseOracle(@"User Id=MYDBUSER;Password=MYPASSWORD;Server=MYDBSERVER;Direct=True;Sid=MYDBSERVER;Persist Security Info=True;License Key=QuiteLongUnreadableString");
}
CustomizeConfiguration(ref optionsBuilder);
base.OnConfiguring(optionsBuilder);
}
So MYDBSERVER is not found, I guess. Do I need a tsnames.ora?
Regards,
Christoph