Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
xx75vulcan
Starting Member
4 Posts |
Posted - 2007-06-19 : 11:57:36
|
I have two seperate production machines that I'm trying to get to playnicely together.This setup has worked for years before - until recently bothermachines were reformatted, and reinstalled fresh. I know I'm missing asimple setting here somewhere...I have a Win 2003 IIS 6.0 box running as web server, and a Win 2003IIS 6.0 box running as a web server with SQL 2000 Server installed.I can write ASP scripts to access the SQL Server but they only workfrom the box running the SQL Server.If I write ASP scripts to run from the first Win 2003 Web server,trying to connect to the second box actually running the SQL Server itgives an error:Microsoft OLE DB Provider for ODBC Drivers error '80004005'[Microsoft][ODBC SQL Server Driver][Named Pipes]SQL Server does notexist or access denied.If I open up the ODBC Admin on the first Web Server box (attempting to hit the SQL box), and create aSystem DSN, and supply it with a SQL Login (the SQL Server is set tomixed authentication mode and not strictly windows authentication)the login and test say they complete successfully. However, whenever Irun the ASP script, it errors out.Example of Connection String that works on box running SQL but not onfirst box that is trying to connect to SQL: 'Create and Open Connection Object Set objConnection = Server.CreateObject("ADODB.Connection") objConnection.ConnectionString ="dsn=**********;uid=*********;pwd=********;" I noticed an event on the server (hosting SQL) event log whenattempting to connect from the first box.Error:An anonymous session connected from <NameofboxrunningSQL> has attempted to open anLSA policy handle on this machine. The attempt was rejected withSTATUS_ACCESS_DENIED to prevent leaking security sensitive informationto the anonymous caller.Upon further investigation, lead me to this MS KB: http://support.microsoft.com/kb/839569Stating "Instead of allowing the anonymous connections to yourinstance of SQL Server, you can grant the required access to aspecific SQL Server account and pass the logon credentials for the SQLServer account in the connection string in the ASP.NET page. Using SQLServer authentication avoids the anonymous connection attempts to theinstance of SQL Server and is more secure."I'm passing the SQL login credentials in my connecton string, and theODBC manager specifies a SQL account -- why does it tell me it'sattempting an annonymous connection?!?!?! |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-06-19 : 13:13:11
|
Tried with tcp/ip netlib instead of named pipes? |
 |
|
xx75vulcan
Starting Member
4 Posts |
Posted - 2007-06-19 : 13:27:57
|
Yeah, Gives the exact same error:[Microsoft][ODBC SQL Server Driver][Named Pipes]SQL Server does not exist or access denied.vs[Microsoft][ODBC SQL Server Driver][TCP/IP]SQL Server does not exist or access denied. |
 |
|
xx75vulcan
Starting Member
4 Posts |
Posted - 2007-06-19 : 13:41:28
|
Do I need to have anything fancy installed on the web server (like SQL tools) or anything to be able to connect to the second web server that hosts SQL database? I don't believe so. Just checking |
 |
|
xx75vulcan
Starting Member
4 Posts |
Posted - 2007-06-19 : 15:06:42
|
ANSWER:I figured it out, but wanted to post for anyone else experiencing this issue.While this was a very very odd solution for me, it might just work for you.On the second box - that hosts SQL Server, IIS was running, and the default.htm page - - for whatever reason, included a redirect to the homepage on the primary server.I can only assume the connection string (pointing to the sql box) was being redirected to the primary server - where there was no sql server.chris |
 |
|
|
|
|
|
|