.NETGURU
MSDE dD: DOT.NET connection works but not ASP connection string!
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-sqlclient' list.


George Pagotelis
-- Copied from [aspngsec] to [ngfx-sqlclient] by Bob Levittan <Click here to reveal e-mail address> --

I'm running MSDE, Server is "(local)" machine name assume "machinename"
and I'm connecting to IBuyStore Portal Database.

This connection works in .NET work
SqlConnection("server=localhost;Trusted_Connection=true;database=Portal"
)

This same string doesn't work in ASP3.0
'cn.Open "server=localhost;Trusted_Connection=true;database=Portal"

But I have to do this (ie. Specify the driver):
cn.Open "Provider=sqloledb;Data Source=localhost;Initial
Catalog=Portal;Integrated Security=SSPI;"

Can somebody tell me what's going on so I finally know what "WinNT
Authentication" actually means! I thought all the above was OLEDB and
should work on both!

Thanks,

GP.

Reply to this message...
 
    
=?iso-8859-1?Q?Jos=E9_Luis_Ch=E1vez_del_Cid?=
This is because on ASP.NET you are using the native support for SQL, and
on ASP3.0 its an OleDB Connection, that's why you have to specify the
Driver/Provider.

WinNT authentication (Trusted_Connection) would detect the user your
using to connect to the database (through IIS it would be ASPNET) so you
wont have to use USR=3Dxxx; PWD=3Dxxx; to create the connection and then =
no
passwords are stored...a little more secure.

Jos=E9 Luis Ch=E1vez del Cid
www.sat.gob.gt
"I am not greatest, I am not smallest, only am"

-----Original Message-----
From: George Pagotelis [mailto:Click here to reveal e-mail address]=20
Sent: Mi=E9rcoles, 26 de Junio de 2002 07:48 p.m.
To: ngfx-sqlclient
Subject: [ngfx-sqlclient] MSDE dD: DOT.NET connection works but not ASP
connection string!

-- Copied from [aspngsec] to [ngfx-sqlclient] by Bob Levittan
<Click here to reveal e-mail address> --

I'm running MSDE, Server is "(local)" machine name assume "machinename"
and I'm connecting to IBuyStore Portal Database.

This connection works in .NET work
SqlConnection("server=3Dlocalhost;Trusted_Connection=3Dtrue;database=3DPo=
rtal"
)

This same string doesn't work in ASP3.0
'cn.Open =
"server=3Dlocalhost;Trusted_Connection=3Dtrue;database=3DPortal"

But I have to do this (ie. Specify the driver):
cn.Open "Provider=3Dsqloledb;Data Source=3Dlocalhost;Initial
Catalog=3DPortal;Integrated Security=3DSSPI;"

Can somebody tell me what's going on so I finally know what "WinNT
Authentication" actually means! I thought all the above was OLEDB and
should work on both!=20

Thanks,

GP.

Reply to this message...
 
 
System.Data.SqlClient.SqlConnection




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification