Web Services and Oracle Data Access

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Oriol Tomàs

    #1

    Web Services and Oracle Data Access

    Hi,

    I want to publish a Web Service who returns a dataset with some data from an
    Oracle Database.

    In the view designer I can preview data from my OracleDataAdapt er1. It
    returns 3 rows.

    When I start the solution and test the web service it returns this error:
    System.Data.Ora cleClient.Oracl eException: ORA-12154: TNS:no se ha podido
    resolver el nombre de servicio

    I suppose that it can't open the connection for security reasons.

    Somebody knows the solution?

    Thanks!

    Oriol Tomàs




    System.Data.Ora cleClient.Oracl eException: ORA-12154: TNS:no se ha podido
    resolver el nombre de servicio

    at System.Data.Ora cleClient.DBObj ectPool.GetObje ct(Object owningObject,
    Boolean& isInTransaction )
    at
    System.Data.Ora cleClient.Oracl eConnectionPool Manager.GetPool edConnection(St ring
    encryptedConnec tionString, OracleConnectio nString options, OracleConnectio n
    owningObject, Boolean& isInTransaction )
    at
    System.Data.Ora cleClient.Oracl eConnection.Ope nInternal(Oracl eConnectionStri ng
    parsedConnectio nString, Object transact)
    at System.Data.Ora cleClient.Oracl eConnection.Ope n()
    at System.Data.Com mon.DbDataAdapt er.QuietOpen(ID bConnection connection,
    ConnectionState & originalState)
    at System.Data.Com mon.DbDataAdapt er.FillFromComm and(Object data, Int32
    startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
    CommandBehavior behavior)
    at System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet, Int32
    startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
    CommandBehavior behavior)
    at System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet)
    at WebService4.Ser vice1.HelloWorl d() in
    c:\inetpub\wwwr oot\WebService4 \Service1.asmx. vb:line 169


  • Mike

    #2
    RE: Web Services and Oracle Data Access

    it can't find your database. Verify that the TNS name is correct and it does
    exist

    "Oriol Tomàs" wrote:
    [color=blue]
    > Hi,
    >
    > I want to publish a Web Service who returns a dataset with some data from an
    > Oracle Database.
    >
    > In the view designer I can preview data from my OracleDataAdapt er1. It
    > returns 3 rows.
    >
    > When I start the solution and test the web service it returns this error:
    > System.Data.Ora cleClient.Oracl eException: ORA-12154: TNS:no se ha podido
    > resolver el nombre de servicio
    >
    > I suppose that it can't open the connection for security reasons.
    >
    > Somebody knows the solution?
    >
    > Thanks!
    >
    > Oriol Tomàs
    >
    >
    >
    >
    > System.Data.Ora cleClient.Oracl eException: ORA-12154: TNS:no se ha podido
    > resolver el nombre de servicio
    >
    > at System.Data.Ora cleClient.DBObj ectPool.GetObje ct(Object owningObject,
    > Boolean& isInTransaction )
    > at
    > System.Data.Ora cleClient.Oracl eConnectionPool Manager.GetPool edConnection(St ring
    > encryptedConnec tionString, OracleConnectio nString options, OracleConnectio n
    > owningObject, Boolean& isInTransaction )
    > at
    > System.Data.Ora cleClient.Oracl eConnection.Ope nInternal(Oracl eConnectionStri ng
    > parsedConnectio nString, Object transact)
    > at System.Data.Ora cleClient.Oracl eConnection.Ope n()
    > at System.Data.Com mon.DbDataAdapt er.QuietOpen(ID bConnection connection,
    > ConnectionState & originalState)
    > at System.Data.Com mon.DbDataAdapt er.FillFromComm and(Object data, Int32
    > startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
    > CommandBehavior behavior)
    > at System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet, Int32
    > startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
    > CommandBehavior behavior)
    > at System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet)
    > at WebService4.Ser vice1.HelloWorl d() in
    > c:\inetpub\wwwr oot\WebService4 \Service1.asmx. vb:line 169
    >
    >
    >[/color]

    Comment

    • Dino Chiesa [Microsoft]

      #3
      Re: Web Services and Oracle Data Access

      sounds like a security issue. the webservice runs as user "ASPNET" and
      probably visual studio runs under your own identity. this is the likely
      source of the problem.

      you need to set the oracle config for the aspnet user.


      "Oriol Tomàs" <adhoc@ad-hoc.net> wrote in message
      news:ep3LC5AuEH A.3916@TK2MSFTN GP10.phx.gbl...[color=blue]
      > Hi,
      >
      > I want to publish a Web Service who returns a dataset with some data from
      > an Oracle Database.
      >
      > In the view designer I can preview data from my OracleDataAdapt er1. It
      > returns 3 rows.
      >
      > When I start the solution and test the web service it returns this error:
      > System.Data.Ora cleClient.Oracl eException: ORA-12154: TNS:no se ha podido
      > resolver el nombre de servicio
      >
      > I suppose that it can't open the connection for security reasons.
      >
      > Somebody knows the solution?
      >
      > Thanks!
      >
      > Oriol Tomàs
      >
      >
      >
      >
      > System.Data.Ora cleClient.Oracl eException: ORA-12154: TNS:no se ha podido
      > resolver el nombre de servicio
      >
      > at System.Data.Ora cleClient.DBObj ectPool.GetObje ct(Object owningObject,
      > Boolean& isInTransaction )
      > at
      > System.Data.Ora cleClient.Oracl eConnectionPool Manager.GetPool edConnection(St ring
      > encryptedConnec tionString, OracleConnectio nString options,
      > OracleConnectio n owningObject, Boolean& isInTransaction )
      > at
      > System.Data.Ora cleClient.Oracl eConnection.Ope nInternal(Oracl eConnectionStri ng
      > parsedConnectio nString, Object transact)
      > at System.Data.Ora cleClient.Oracl eConnection.Ope n()
      > at System.Data.Com mon.DbDataAdapt er.QuietOpen(ID bConnection connection,
      > ConnectionState & originalState)
      > at System.Data.Com mon.DbDataAdapt er.FillFromComm and(Object data, Int32
      > startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
      > CommandBehavior behavior)
      > at System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet, Int32
      > startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
      > CommandBehavior behavior)
      > at System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet)
      > at WebService4.Ser vice1.HelloWorl d() in
      > c:\inetpub\wwwr oot\WebService4 \Service1.asmx. vb:line 169
      >
      >[/color]


      Comment

      Working...