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


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?



Relevant Pages

  • FW: Microsoft Security Advisory MS 03-007
    ... am trying to find a vulnerability tester/script and I could test it out ... Department of the Army server that had been compromised and that this ... announcement covers IIS 5.1 but not IIS 6, ... How a Hacker Uses SQL Injection to Steal Your SQL Data! ...
    (Focus-Microsoft)
  • RE: Confusion on standard security methodologies.
    ... Application will talk to a back-end SQL ... By "back-end," I assume you mean on a different box from IIS? ... If SQL is on a separate box, you won't be able to use NT authentication ... impersonations (meaning that once passed to the IIS server, ...
    (microsoft.public.inetserver.iis.security)
  • RE: MS patch-scanner for Win-NT, 2K, IIS, SQL
    ... MS patch-scanner for Win-NT, 2K, IIS, SQL ... XML file from the following location - mssecure.xml Possible ... and on a NT 4 Server, but the scanner works fine on a W2K Server ...
    (Focus-Microsoft)
  • Re: SQL CE Synching Problems
    ... install location of SQL CE instead of under Inetpub like I had done before. ... > so the issue has to be between the server tools and the publisher. ... >>I ran the wizard again to check all the permissions and this is what it ... >> A request to send data to the computer running IIS has failed. ...
    (microsoft.public.sqlserver.ce)
  • Re: General Network Error - MS Stumped
    ... > environment between our ASP.NET application and SQL Server 2000. ... > to be related to queries that return "large" amounts of data from SQL. ... > MS had us perform 3 data captures initially: MPSRPT_MDAC on the IIS ... > at System.Data.SqlClient.TdsParser.ReadByteArray(Bytebuff, Int32 ...
    (microsoft.public.sqlserver.connect)