Sql Server login from a web application only works from browser where iis runs.

Discussion in 'ASP .Net' started by dyczr@bizerba.com, Jan 23, 2006.

  1. Guest

    Hello All,

    configuration:

    computer_1:
    IIS + Asp .Net Web App
    Web.config: <authentication mode="Windows" /> <identity
    impersonate="true"/>

    computer_2:
    SQL Server

    Both machines are in a domain.

    problem description:
    When I access the WebApp from the same computer where the WebApp runs
    averything works fine. I can access the webpage and sql queries works.

    When I access the WebApp from other computer ass the IIS I can access
    the WebApp but I get from SQL Server: "..login failed for user
    '(null)'. Reason: Not associated with a trusted SQL Server
    connection.."

    What is the problem?

    Thanks for every hint! :)
    radix
     
    , Jan 23, 2006
    #1
    1. Advertising

  2. Damien Guest

    wrote:
    > Hello All,
    >
    > configuration:
    >
    > computer_1:
    > IIS + Asp .Net Web App
    > Web.config: <authentication mode="Windows" /> <identity
    > impersonate="true"/>
    >
    > computer_2:
    > SQL Server
    >
    > Both machines are in a domain.
    >
    > problem description:
    > When I access the WebApp from the same computer where the WebApp runs
    > averything works fine. I can access the webpage and sql queries works.
    >
    > When I access the WebApp from other computer ass the IIS I can access
    > the WebApp but I get from SQL Server: "..login failed for user
    > '(null)'. Reason: Not associated with a trusted SQL Server
    > connection.."
    >
    > What is the problem?
    >
    > Thanks for every hint! :)
    > radix


    Hi,

    This is a pretty common problem. Unfortunately, there's no
    one-size-fits-all solution. The September MSDN Magazine had an article
    which covered a lot of the issues:
    http://msdn.microsoft.com/msdnmag/issues/05/09/SecurityBriefs/

    Hopefully you can work through that and decide what you can do.

    Damien
     
    Damien, Jan 23, 2006
    #2
    1. Advertising

  3. Guest

    Thanks Damien,

    I see this is a very painful issue :(

    I will switch to sql auth..

    Cheers
     
    , Jan 23, 2006
    #3
  4. If there are on the same domain what you can do is use or create
    an ASPNET acct on the domain.
    And use that acct to access the DB.
    I have ran into such issue so many times and doing that trick solved my
    problem.
    Patrick

    <> wrote in message
    news:...
    > Thanks Damien,
    >
    > I see this is a very painful issue :(
    >
    > I will switch to sql auth..
    >
    > Cheers
    >
     
    Patrick.O.Ige, Jan 23, 2006
    #4
    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. Matthew Louden
    Replies:
    3
    Views:
    6,005
    Sherif ElMetainy
    Nov 7, 2003
  2. Mindy Myers
    Replies:
    4
    Views:
    297
    Richard Loupatty
    Jan 29, 2004
  3. dave
    Replies:
    2
    Views:
    1,979
    daveh551
    Dec 4, 2008
  4. John Kennedy
    Replies:
    5
    Views:
    265
    Carl Prothman [MVP]
    Aug 14, 2003
  5. John Kennedy
    Replies:
    5
    Views:
    473
    Carl Prothman [MVP]
    Aug 14, 2003
Loading...

Share This Page