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 |
|
kwilliams
194 Posts |
Posted - 2003-11-03 : 17:54:32
|
| Hi,We just moved 2 databases from a server that used SQL Server 7 to a new server that uses SQL Server 2000, and we're having a problem with some ASP intranet pages (DB1=Old server running v.7; DB2=New server running v.2k). The intranet pages are secure pages that pull the network user's login using NT's "LOGON_USER" (see details below), and compares it to a database table I created that has access rights for each user.I made a complete copy of the intranet site from DB1, and pasted all of the files into DB2. It was working fine on the DB1, but it's not been pulling in the network login ever since I copied the site over.I've included the code that I use to pull the login, and compare it to the DB table below. If you see an obvious mistake, please let me know. Thanks.KWilliamsASP Login Page's Code:<%@LANGUAGE="JAVASCRIPT"%> <!--#include file="Connections/strConn.asp" --><%var rs_Login__varLoggedIn = "()";if(String(Session("Login")) != "undefined") { rs_Login__varLoggedIn = String(Request("LOGON_USER"));}%><%var rs_Login = Server.CreateObject("ADODB.Recordset");rs_Login.ActiveConnection = MM_strConn_STRING;rs_Login.Source = "SELECT * FROM dbo.Registered_Users WHERE User_Name = '"+ rs_Login__varLoggedIn.replace(/'/g, "''") + "' AND Password = 'Member'";rs_Login.CursorType = 0;rs_Login.CursorLocation = 2;rs_Login.LockType = 3;rs_Login.Open();var rs_Login_numRows = 0;%><%if(rs_Login.EOF)Response.Redirect("http://dgitsrv1/Releases/noaccess.asp");%><html><head><title>Douglas County, Kansas</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body bgcolor="#FFFFFF" text="#000000"><!--#include virtual="/topborder.asp" --><table width="75%" border="0" align="left"> <tr> <td valign="top" height="27"> <h1><b>Welcome <%=(rs_Login.Fields.Item("Name").Value)%>!</b></h1> </td> </tr></table></body></html> |
|
|
Sitka
Aged Yak Warrior
571 Posts |
Posted - 2003-11-03 : 22:15:02
|
| Post the include file script as well |
 |
|
|
kwilliams
194 Posts |
Posted - 2003-11-04 : 09:12:29
|
Sorry about that...here you go:<%// FileName="Connection_ado_conn_string.htm"// Type="ADO"// HTTP="false"// Catalog=""// Schema=""var MM_strConn_STRING = "Provider=SQLOLEDB;Server=NEWSERVERNAME;Database=DBNAME;UID=testreq;PWD=testreq"%> I replaced our server name & database name with NEWSERVERNAME & DBNAME for security reasons. But I think that you can get the jest of what it says. When I copied the intranet site from DB1 to DB2, I made sure to make that change in the connection string above also. Thanks.KWilliams |
 |
|
|
kwilliams
194 Posts |
Posted - 2003-11-04 : 12:44:03
|
| Hi,I solved this issue by going into the IIS Configuration, unchecking the "Anonymous Access" box, and checking the "Integrated Windows authentification" box. When we did this for the entire directory, everything worked fine. Thanks for all of your help.KWilliams |
 |
|
|
|
|
|
|
|