• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Intriguing OleDB problem

suityou01

Potty-trained
Thanks received
222
Using the oledb provider from ODAC 10.2 to connect to an Oracle database.

In a web service (myFile.asmx) it won't connect. It just hangs on the Connection.Open(); line until it times out the web service.

However, lift the exact same code into a simple console app and it works like a charm from the same box.

Clearly something to do with the fact it is running in the context of a web service in IIS 7, but what? :confused:

:ohwell
 
what user is assigned to the service in IIS?
is this windows authentication?

Security was something that occured. I would assume IIS is running I_USER or I_WAM or some such and aspnet.

That said I just tried a cheeky web.config file to get the web service to impersonate the logged in user. This was based on the assumption that if the OleDB connection works in a simple console app, the console app would be running in the context of the currently logged in user.

It didn't make any difference :ohwell
 
Security was something that occured. I would assume IIS is running I_USER or I_WAM or some such and aspnet.

That said I just tried a cheeky web.config file to get the web service to impersonate the logged in user. This was based on the assumption that if the OleDB connection works in a simple console app, the console app would be running in the context of the currently logged in user.

It didn't make any difference :ohwell


Being that its oracle have you checked that the appropriate IUSR / anonymous user has permissions to the oracle home directory and its children.

Oracle creates an entire world of pain by putting its files in places where file permissions need to be set manually.

To emphasis the joy you are about to experience you may need to reboot before it decides to work.
 
Being that its oracle have you checked that the appropriate IUSR / anonymous user has permissions to the oracle home directory and its children.

Oracle creates an entire world of pain by putting its files in places where file permissions need to be set manually.

To emphasis the joy you are about to experience you may need to reboot before it decides to work.

But I am specifying a user name and password in the connection string. :confused:
The same connection string that works just fine from a console app. :ohwell

Going to give ODP a whirl. :cool:
 
But I am specifying a user name and password in the connection string. :confused:
The same connection string that works just fine from a console app. :ohwell

Going to give ODP a whirl. :cool:

But that is the oracle database account details. The problem is that the IUSR windows account does not have permission to access the oracle home directory on the server, so can't read the tnsnames.ora file and locate / identify the database its supposed to be talking to.

You need to fix the basics first.
 
But that is the oracle database account details. The problem is that the IUSR windows account does not have permission to access the oracle home directory on the server, so can't read the tnsnames.ora file and locate / identify the database its supposed to be talking to.

You need to fix the basics first.

And if I set the web service to impersonate the logged in user, the one that is running the console app quite happily and connecting to the database? And also if I am using a TNSless connection string? I believe all the basics have been checked. :smile
 
And if I set the web service to impersonate the logged in user, the one that is running the console app quite happily and connecting to the database? And also if I am using a TNSless connection string? I believe all the basics have been checked. :smile

:suicide:
 

Advertisers

Back
Top