Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Connection Problems


Message #1 by "Grant Williams" <gwilliams@c...> on Tue, 26 Feb 2002 15:54:52 +0800
This is a multi-part message in MIME format.



------_=_NextPart_001_01C1BE9A.DF7F6926

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable



Hi folks,

I've got problems. (btw, still using ASP, not ASPX.. sorry)

When I start my app, my global.asa file opens a (global) connection to 

an SQL db (dsn-less). (Code is shown at bottom)

Default.asp then checks to see if the user has registered etc....



The problem:

When I preview the application using my local web server, no problems 

when connecting to db

When I preview the application using the intranet web server, I get the 

following error connecting to the db.



    Microsoft OLE DB Provider for SQL Server error '80040e4d'





    Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.





    /HelpDeskIT/global.asa, line 19



The IIS security settings for my webserver vs intranet web server are 

identical.  (ie, I'm using Windows NT Challenge/Response only.)



I've also set up all security in the SQL Server db to use Windows NT 

security and added appropriate users/logins etc.



Does anyone have any idea why the intranet server spits it when trying 

to open a connection in global.asa??



Code follows for :



Globa.asa   



<OBJECT

 SCOPE=3DSession

 RUNAT=3Dserver

 PROGID=3D"ADODB.Connection"

 ID=3DobjConn>

</OBJECT>

<SCRIPT LANGUAGE=3DVBScript RUNAT=3DServer>



Sub Session_OnStart

 Session("Authenticated") =3D false

 Session("user") =3D ""



 objConn.Provider =3D "SQLOLEDB"

 objConn.Properties("Data Source").Value =3D "PANTRY"

 objConn.Properties("Initial Catalog").Value =3D "IT Help Desk"

 objConn.Properties("Integrated Security").Value =3D "SSPI"

 objConn.Open



End Sub



Sub Session_OnEnd

 ' close db connection

 objConn.Close

 Set objConn =3D Nothing

 Session("Authenticated") =3D false

End Sub



</SCRIPT>



Grant Williams

Database Administrator/Applications Developer

IT - Corporate Services

Cockburn City Council



T:   (08) 9411 3473

F:   (08) 9411 3416

M:  0409 110581

E:   gwilliams@c...

W:  www.cockburn.wa.gov.au









  Return to Index