database connection

Discussion in 'ASP .Net' started by wei, Apr 7, 2004.

  1. wei

    wei Guest

    Thanks Craig. i think you are right.the connectString is not set properly.
    if i down the ip address, how do i set it?
    string connectionString = "Provider=MSDAORA.1;Data source=server;User
    ID=username;Password=password";

    this is my current setting. i try to replace server with ip+port, it didn't
    work either. how do i set it? thanks.



    "Craig Deelsnyder" <cdeelsny@NO_SPAM_4_MEyahoo.com> wrote in message
    news:...
    > wei wrote:
    >
    > >
    > > ORA-12154: TNS:could not resolve service name
    > > Description: An unhandled exception occurred during the execution of the
    > > current web request. Please review the stack trace for more information
    > > about the error and where it originated in the code.
    > >
    > > Exception Details: System.Data.OleDb.OleDbException: ORA-12154:

    TNS:could
    > > not resolve service name
    > >

    >
    > looks like something in your connectString is not correct. It should
    > not have to be different for web vs win. I'd check to make sure your
    > web app is setup correctly for database access. Also check the tns
    > settings for your oracle connection on that box.
    >
    > Actually, maybe it's because of permissions, you can't read the file
    > where the tns values are stored. If this is a dev box, try temporarily
    > changing your user setup in machine.config to SYSTEM instead of machine
    > (it's in the processModel node/section). Then re-run this. See if it
    > works. (and then of course, as a good developer, change machine.config
    > back :) )
    >
    > If it fails (which I would hope), then you know it's something with
    > permissions for the aspnet account accessing some Oracle settings/files.
    > Maybe have to give the aspnet user access to that directory. I
    > haven't worked with Oracle in awhile, so I'm drawing from vague

    memories...
    >
    > --
    > Craig Deelsnyder
    > Microsoft MVP - ASP/ASP.NET
     
    wei, Apr 7, 2004
    #1
    1. Advertising

  2. You do not have a TNS name for the server. With Oracle, you have to have the
    Oracle client blah blah on your web machine to connect to Oracle. One of the
    items is TNSNames.ora (? - may have spelling wrong). For the server in
    question, you have to have a TNS name to use the oracleClient objects.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ***************************************************************
    Think outside the box!
    ***************************************************************
    "wei" <> wrote in message
    news:...
    > Thanks Craig. i think you are right.the connectString is not set properly.
    > if i down the ip address, how do i set it?
    > string connectionString = "Provider=MSDAORA.1;Data source=server;User
    > ID=username;Password=password";
    >
    > this is my current setting. i try to replace server with ip+port, it

    didn't
    > work either. how do i set it? thanks.
    >
    >
    >
    > "Craig Deelsnyder" <cdeelsny@NO_SPAM_4_MEyahoo.com> wrote in message
    > news:...
    > > wei wrote:
    > >
    > > >
    > > > ORA-12154: TNS:could not resolve service name
    > > > Description: An unhandled exception occurred during the execution of

    the
    > > > current web request. Please review the stack trace for more

    information
    > > > about the error and where it originated in the code.
    > > >
    > > > Exception Details: System.Data.OleDb.OleDbException: ORA-12154:

    > TNS:could
    > > > not resolve service name
    > > >

    > >
    > > looks like something in your connectString is not correct. It should
    > > not have to be different for web vs win. I'd check to make sure your
    > > web app is setup correctly for database access. Also check the tns
    > > settings for your oracle connection on that box.
    > >
    > > Actually, maybe it's because of permissions, you can't read the file
    > > where the tns values are stored. If this is a dev box, try temporarily
    > > changing your user setup in machine.config to SYSTEM instead of machine
    > > (it's in the processModel node/section). Then re-run this. See if it
    > > works. (and then of course, as a good developer, change machine.config
    > > back :) )
    > >
    > > If it fails (which I would hope), then you know it's something with
    > > permissions for the aspnet account accessing some Oracle settings/files.
    > > Maybe have to give the aspnet user access to that directory. I
    > > haven't worked with Oracle in awhile, so I'm drawing from vague

    > memories...
    > >
    > > --
    > > Craig Deelsnyder
    > > Microsoft MVP - ASP/ASP.NET

    >
    >
    >
     
    Cowboy \(Gregory A. Beamer\) [MVP], Apr 8, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mythran
    Replies:
    5
    Views:
    4,953
    Mythran
    Oct 5, 2005
  2. Dave Johnson

    Using Connection Class VS Connection Module

    Dave Johnson, Dec 9, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    635
    Dave Johnson
    Dec 11, 2005
  3. Linus Nikander
    Replies:
    5
    Views:
    546
  4. Replies:
    3
    Views:
    40,294
    Roedy Green
    Nov 16, 2005
  5. R
    Replies:
    1
    Views:
    575
Loading...

Share This Page