SQL server didn't exist or access denied

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Johan Johansson (Sweden)

    SQL server didn't exist or access denied

    I can't connect to our database (seperate database server) from within my
    webservice. I cannot understand why.!!!

    * I have configured IIS not to allow anonymous access and to use "windows
    integrated authentication"
    * I have configured the webService to use "windows" authentication and to
    impersonate whomeever uses it.
    * In the client (the one that consumes the webservice) I have specified the
    network credentials (DefaultCredent ials) that the webService is to use.
    * The database is configured to let me (my user) access the database.
    * The connection string specifies integrated security
    - In the webService I get the CurrentUser and check if it is my account: It
    is

    This setup didn't let me access the database nor did it allow me to write
    debug files so I did a explicit impersonation of my user account (uid, pass
    adn domain); result: I can write files whereever I want but I still cannot
    access the database.

    I tried to change the ProcessModel of IIS in machine.config to run as System
    instead (higher privilegies). To no avail...

    What to do.???

    I know that I could login to the database using SQL authentication but that
    is less secure and it doesn't answer this question.
  • yuri

    #2
    Re: SQL server didn't exist or access denied

    Hi Johan,

    Have you had a chance to look at the SQL server log? The log might give
    more information on what is going on.

    Thanks,
    Yuri

    "Johan Johansson (Sweden)" <JohanJohansson Sweden@discussi ons.microsoft.c om>
    wrote in message news:2B1D5ED2-F3FD-4D54-9CAB-A3946F1ECB99@mi crosoft.com...[color=blue]
    >I can't connect to our database (seperate database server) from within my
    > webservice. I cannot understand why.!!!
    >
    > * I have configured IIS not to allow anonymous access and to use "windows
    > integrated authentication"
    > * I have configured the webService to use "windows" authentication and to
    > impersonate whomeever uses it.
    > * In the client (the one that consumes the webservice) I have specified
    > the
    > network credentials (DefaultCredent ials) that the webService is to use.
    > * The database is configured to let me (my user) access the database.
    > * The connection string specifies integrated security
    > - In the webService I get the CurrentUser and check if it is my account:
    > It
    > is
    >
    > This setup didn't let me access the database nor did it allow me to write
    > debug files so I did a explicit impersonation of my user account (uid,
    > pass
    > adn domain); result: I can write files whereever I want but I still cannot
    > access the database.
    >
    > I tried to change the ProcessModel of IIS in machine.config to run as
    > System
    > instead (higher privilegies). To no avail...
    >
    > What to do.???
    >
    > I know that I could login to the database using SQL authentication but
    > that
    > is less secure and it doesn't answer this question.[/color]


    Comment

    • Dan Rogers

      #3
      RE: SQL server didn't exist or access denied

      Hi,

      Without some information on the specific error you are getting, it's hard
      to fathom a guess. Does the connect to SQL step return an error? What
      does it say?

      Regards

      Dan Rogers
      Microsoft Corporation
      --------------------
      Thread-Topic: SQL server didn't exist or access denied
      thread-index: AcTNWgAAq5OnvEe JSkGEecQA0ZhaKQ ==
      X-WBNR-Posting-Host: 139.58.232.1
      From: =?Utf-8?B?Sm9oYW4gSm9 oYW5zc29uIChTd2 VkZW4p?=
      <JohanJohansson Sweden@discussi ons.microsoft.c om>
      Subject: SQL server didn't exist or access denied
      Date: Thu, 18 Nov 2004 02:33:10 -0800
      Lines: 26
      Message-ID: <2B1D5ED2-F3FD-4D54-9CAB-A3946F1ECB99@mi crosoft.com>
      MIME-Version: 1.0
      Content-Type: text/plain;
      charset="Utf-8"
      Content-Transfer-Encoding: 7bit
      X-Newsreader: Microsoft CDO for Windows 2000
      Content-Class: urn:content-classes:message
      Importance: normal
      Priority: normal
      X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
      Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
      NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.1.29
      Path: cpmsftngxa10.ph x.gbl!TK2MSFTNG XA01.phx.gbl!TK 2MSFTNGXA03.phx .gbl
      Xref: cpmsftngxa10.ph x.gbl
      microsoft.publi c.dotnet.framew ork.webservices :7523
      X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices

      I can't connect to our database (seperate database server) from within my
      webservice. I cannot understand why.!!!

      * I have configured IIS not to allow anonymous access and to use "windows
      integrated authentication"
      * I have configured the webService to use "windows" authentication and to
      impersonate whomeever uses it.
      * In the client (the one that consumes the webservice) I have specified
      the
      network credentials (DefaultCredent ials) that the webService is to use.
      * The database is configured to let me (my user) access the database.
      * The connection string specifies integrated security
      - In the webService I get the CurrentUser and check if it is my account:
      It
      is

      This setup didn't let me access the database nor did it allow me to write
      debug files so I did a explicit impersonation of my user account (uid, pass
      adn domain); result: I can write files whereever I want but I still cannot
      access the database.

      I tried to change the ProcessModel of IIS in machine.config to run as
      System
      instead (higher privilegies). To no avail...

      What to do.???

      I know that I could login to the database using SQL authentication but that
      is less secure and it doesn't answer this question.

      Comment

      Working...