• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • 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

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Intriguing OleDB problem

    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?

    Knock first as I might be balancing my chakras.

    #2
    what user is assigned to the service in IIS?
    is this windows authentication?

    Comment


      #3
      Originally posted by GeorgeB View Post
      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
      Knock first as I might be balancing my chakras.

      Comment


        #4
        Originally posted by suityou01 View Post
        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

        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.
        merely at clientco for the entertainment

        Comment


          #5
          Originally posted by eek View Post
          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.
          The same connection string that works just fine from a console app.

          Going to give ODP a whirl.
          Knock first as I might be balancing my chakras.

          Comment


            #6
            Originally posted by suityou01 View Post
            But I am specifying a user name and password in the connection string.
            The same connection string that works just fine from a console app.

            Going to give ODP a whirl.
            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.
            merely at clientco for the entertainment

            Comment


              #7
              Originally posted by eek View Post
              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.
              Knock first as I might be balancing my chakras.

              Comment


                #8
                Originally posted by suityou01 View Post
                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.
                merely at clientco for the entertainment

                Comment


                  #9
                  Originally posted by eek View Post
                  Careful, you might make a muppet out of yourself. Re-read my last post.
                  Knock first as I might be balancing my chakras.

                  Comment


                    #10
                    I think eek is right.
                    +50 Xeno Geek Points
                    Come back Toolpusher, scotspine, Voodooflux. Pogle
                    As for the rest of you - DILLIGAF

                    Purveyor of fine quality smut since 2005

                    CUK Olympic University Challenge Champions 2010/2012

                    Comment

                    Working...
                    X