[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

Unable to connect to oracle in ASP.NET web service

Stacey Tarr

1/24/2003 8:28:00 PM

I'm unable to connect to Oracle database from ASP.NET
using either OleDb.OLEDbConnection or
OracleClient.OracleConnection. I'm using Oracle Client
9.2.

I am, however, able to connect using either type of
connection when attempting from .NET windows form
application.

Any help would be greatly appreciated.

Thanks,

Stacey Tarr
2 Answers

Stacey Tarr

1/24/2003 9:03:00 PM

0

Here's the error info I should have included in my initial
posting:

System.Exception: Could not create an environment:
OCIEnvCreate returned -1.
at System.Data.OracleClient.DBObjectPool.GetObject
(Boolean& isInTransaction)
at
System.Data.OracleClient.OracleConnectionPoolManager.GetPoo
ledConnection(String encryptedConnectionString,
OracleConnectionString options, Boolean& isInTransaction)
at
System.Data.OracleClient.OracleConnection.OpenInternal
(OracleConnectionString parsedConnectionString, Object
transact)
at System.Data.OracleClient.OracleConnection.Open()
>-----Original Message-----
>I'm unable to connect to Oracle database from ASP.NET
>using either OleDb.OLEDbConnection or
>OracleClient.OracleConnection. I'm using Oracle Client
>9.2.
>
>I am, however, able to connect using either type of
>connection when attempting from .NET windows form
>application.
>
>Any help would be greatly appreciated.
>
>Thanks,
>
>Stacey Tarr
>.
>

Yasser Shohoud [MS]

1/24/2003 11:31:00 PM

0

Stacey,

This is a little bit of a stab in the dark but from your description that
you can connect from a Windows Form and not from ASP.Net I suspect that this
might be a permissions problem.

ASP.Net runs under a special account defined in machine.config. You might
need to give that account permissions to access your Oracle database. Or
you could have ASP.Net do some kind of impersonation.

Look at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/v...
/vxconApplicationIdentity.asp.

If that doesn't work Oracle can probably produce some kind of log output
that might give you a better understanding of why it refuses the connection.

Hope that helps.

Michael Clark
Microsoft

--
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Stacey Tarr" <tarrsnospam@netsolve.net> wrote in message
news:087801c2c3e3$aec56600$cef82ecf@TK2MSFTNGXA08...
> Here's the error info I should have included in my initial
> posting:
>
> System.Exception: Could not create an environment:
> OCIEnvCreate returned -1.
> at System.Data.OracleClient.DBObjectPool.GetObject
> (Boolean& isInTransaction)
> at
> System.Data.OracleClient.OracleConnectionPoolManager.GetPoo
> ledConnection(String encryptedConnectionString,
> OracleConnectionString options, Boolean& isInTransaction)
> at
> System.Data.OracleClient.OracleConnection.OpenInternal
> (OracleConnectionString parsedConnectionString, Object
> transact)
> at System.Data.OracleClient.OracleConnection.Open()
> >-----Original Message-----
> >I'm unable to connect to Oracle database from ASP.NET
> >using either OleDb.OLEDbConnection or
> >OracleClient.OracleConnection. I'm using Oracle Client
> >9.2.
> >
> >I am, however, able to connect using either type of
> >connection when attempting from .NET windows form
> >application.
> >
> >Any help would be greatly appreciated.
> >
> >Thanks,
> >
> >Stacey Tarr
> >.
> >