Re: IIS and SQL Server on different machines: how to connect with windows security
From: Gary X (SQLGuy_at_EarthLink.Net)
Date: 06/28/03
- Next message: Conor: "Unable to access documents"
- Previous message: Gary X: "Re: How do I change a user name"
- In reply to: Paolo C.: "IIS and SQL Server on different machines: how to connect with windows security"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 27 Jun 2003 17:06:26 -0700
Two points:
1. If everyone from your IIS uses same sql account, you can do it by
having IIS running under a domain account and give this account proper
access to your SQL database. In your ASP page, you simply use trusted
connection. Local NT logins (such as IUSR_SERVER2 ) won't work. Basically
this method is similar to have a generic SQL account that every IIS user
uses to connect to SQL
2. If you have an intranet, you want to give users individual/different
access to SQL (and control privileges in SQL), you need to host IIS and SQL
in one server. Just like linked servers, trusted connections from a third
box (say your workstation) through a SQL server (the server you first
connect to) to a linked SQL server has to be manually mapped.
No other ways.
Gary
"Paolo C." <noemail@ok.ok> wrote in message
news:035201c33c95$0a9f46b0$a001280a@phx.gbl...
> Hi!
> I have a web server (Windows 2000 server) with IIS5
> and .NET Framework (SERVER1) and another server (Windows
> 2000 Server) with SQL Server 2000 (SERVER2).
> I would like to connect to a db on SERVER2 from ASP and
> ASPX pages on SERVER1 using the Windows Authentication.
> I would like, to be precise, that IUSR_SERVER2 and ASPNET
> users of SERVER2 can connect to db on SERVER1.
>
> when I try to create the logins for this 2 users:
>
> exec sp_grantlogin 'Server2\IUSR_Server1'
> exec sp_grantlogin 'Server2\ASPNET'
>
> I get this error:
>
> Windows NT user or group 'Server2\IUSR_Server1' not found.
> Check the name again.
> Windows NT user or group 'Server2\ASPNET' not found. Check
> the name again.
>
> Anyone can help me?
- Next message: Conor: "Unable to access documents"
- Previous message: Gary X: "Re: How do I change a user name"
- In reply to: Paolo C.: "IIS and SQL Server on different machines: how to connect with windows security"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|