Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 5th, 2004, 10:15 PM
Registered User
 
Join Date: Nov 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Impersonate impossible on remote SQL Server?

Hi

Lots of discussion on this site re use of <identity impersonate="true"/> in web.config and machine.config.

My question is - is it possible to have impersonation flow through to a remote SQL Server?

Scenario - We have IIS set up on Windows 2003 which has web apps that access SQL server on a separate machine in the same domain.
a. Anonymous access is turned off and integrated security is turned on in IIS
b. <identity impersonate="true"/> is included in each apps web.config file. Note we do NOT want to add a username and password (what's the point? might as well include in the connection string otherwise).

Whenever try to access the web app, we are greeted with "Login Failed for user NT AUTHORITY\ANONYMOUS LOGIN".

IIS log shows that the user is authenticated correctly on the web server. The error message implies (and SQL Servers log confirms) that the impersonation does NOT flow from the web server to the machine housing SQL Server.

My feeling is that it is mission impossible - literature on the web is confusing and conflicting. My guess is that it only works when SQL Server is on the SAME machine as the web server.

Has anyone had experience with this?

Cheers
Brian

 
Old December 5th, 2004, 10:53 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

I would say this post would fit under a .Net forum here. You should be able to find help from a .Net forum on this site.

Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old December 10th, 2004, 06:15 AM
Registered User
 
Join Date: Nov 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It is possible, but it's not very easy to find by.

You need to setup the user on both servers (web & sql) with exactly the same usernames / passwords.

You can ONLY use Basic Authentication. (Sorry But No Windows Authentication)

You'll need to change the Local Security Policy on both servers:
http://support.microsoft.com/?id=840219

In the web.config file you need to set:
 <authentication mode="Windows" />
<identity impersonate="true"/>

Best regards,
Gregory Liénard

@iPower
Toekomstlaan 16i
B-2900 Schoten

Web: http://www.ipower.be

_______________________________________________
    MORE VISITORS WITH A PERMANENT
   TOPPOSITION AT THE SEARCH ENGINES

        http://www.Hit-Magnet.com
_______________________________________________





Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Connection to SQL Server asharkashif Visual Studio 2005 1 November 24th, 2007 12:11 PM
How to connect to a remote SQL Server? mizimizi SQL Server 2000 3 July 4th, 2006 01:47 PM
VB Express and SQL server on remote server questio HoosierDaddy61 Visual Basic 2005 Basics 0 February 22nd, 2006 11:27 AM
Linking Remote Sql Server with Web server yeetesh Pro VB Databases 1 May 26th, 2005 04:13 AM
Impersonation impossible to remote SQL server ?? greamb SQL Server ASP 1 December 5th, 2004 10:51 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.