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

  • Thread starter Thread starter dyczr
  • Start date Start date
D

dyczr

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
 
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
 
Thanks Damien,

I see this is a very painful issue :(

I will switch to sql auth..

Cheers
 
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top