ASP Connection String for Privileged Account  
Author Message
Inno





PostPosted: Tue Jun 06 06:43:49 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account I don't know if this is a unique problem, or I'm going about it the
wrong way. I currently connect to one of our SQL servers via a
priviliged account (by using RUNAS). Works with no problem. I now
need the ability to connect to the same SQL server using ASP. I have
the following connect string, but I'm not sure how to specify the
domain in the string, or is there some other way?

<%
Set demoConn = Server.CreateObject("ADODB.Connection")
demoPath="DRIVER={SQL Server};" & _
"SERVER=mysqlserver;UID=myusername;" & _
"PWD=mypassword#;DATABASE=qdb"
demoConn.open demoPath
%>

Thanks!

Web Programming331  
 
 
Bob





PostPosted: Tue Jun 06 06:43:49 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account EMail@HideDomain.com wrote:
> I don't know if this is a unique problem, or I'm going about it the
> wrong way. I currently connect to one of our SQL servers via a
> priviliged account (by using RUNAS). Works with no problem. I now
> need the ability to connect to the same SQL server using ASP. I have
> the following connect string, but I'm not sure how to specify the
> domain in the string, or is there some other way?

First, you need to turn off Anonymous access in your website's Directory
Security settings using IIS Manager.

>
> <%
> Set demoConn = Server.CreateObject("ADODB.Connection")
> demoPath="DRIVER={SQL Server};" & _
> "SERVER=mysqlserver;UID=myusername;" & _
> "PWD=mypassword#;DATABASE=qdb"
> demoConn.open demoPath
> %>
>
> Thanks!

http://www.aspfaq.com/show.asp?id=2126

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
 
Egbert





PostPosted: Wed Jun 07 05:44:00 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account
<EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
>I don't know if this is a unique problem, or I'm going about it the
> wrong way. I currently connect to one of our SQL servers via a
> priviliged account (by using RUNAS). Works with no problem. I now
> need the ability to connect to the same SQL server using ASP. I have
> the following connect string, but I'm not sure how to specify the
> domain in the string, or is there some other way?
>
> <%
> Set demoConn = Server.CreateObject("ADODB.Connection")
> demoPath="DRIVER={SQL Server};" & _
> "SERVER=mysqlserver;UID=myusername;" & _
> "PWD=mypassword#;DATABASE=qdb"
> demoConn.open demoPath
> %>

>
This might work perfect. Including the tip Bob gave.

<%
Set demoConn = CreateObject("ADODB.Connection")
demoPath="Provider=SQLOLEDB" & _
"Data Source=mysqlserver;Integrated Security=SSPI;" & _
"Initial Catalog=qdb"
demoConn.open demoPath
%>
--
compatible web farm Session replacement for Asp and Asp.Net
http://www.nieropwebconsult.nl/asp_session_manager.htm

 
 
Bob





PostPosted: Wed Jun 07 11:58:11 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Hopefully one of these search results will help:
http://groups.google.com/groups?as_q=sqloledb+provider+cannot+found&num=10&scoring=r&hl=en&as_epq=&as_oq=&as_eq=&as_ugroup=&as_usubject=&as_uauthors=&lr=&as_qdr=&as_drrb=b&as_mind=1&as_minm=1&as_miny=2006&as_maxd=7&as_maxm=6&as_maxy=2006&safe=off

EMail@HideDomain.com wrote:
> I tried your suggestion but got the following error:
>
> Provider cannot be found. It may not be properly installed.
>
>> This might work perfect. Including the tip Bob gave.
>>
>> <%
>> Set demoConn = CreateObject("ADODB.Connection")
>> demoPath="Provider=SQLOLEDB" & _
>> "Data Source=mysqlserver;Integrated Security=SSPI;" & _
>> "Initial Catalog=qdb"
>> demoConn.open demoPath
>> %>

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
 
Bob





PostPosted: Wed Jun 07 12:02:46 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account More to the point:
http://support.microsoft.com/kb/q278604/
EMail@HideDomain.com wrote:
> I tried your suggestion but got the following error:
>
> Provider cannot be found. It may not be properly installed.
>
>> This might work perfect. Including the tip Bob gave.
>>
>> <%
>> Set demoConn = CreateObject("ADODB.Connection")
>> demoPath="Provider=SQLOLEDB" & _
>> "Data Source=mysqlserver;Integrated Security=SSPI;" & _
>> "Initial Catalog=qdb"
>> demoConn.open demoPath
>> %>

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
 
sucaba





PostPosted: Wed Jun 07 11:41:25 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account I tried your suggestion but got the following error:

Provider cannot be found. It may not be properly installed.

> This might work perfect. Including the tip Bob gave.
>
> <%
> Set demoConn = CreateObject("ADODB.Connection")
> demoPath="Provider=SQLOLEDB" & _
> "Data Source=mysqlserver;Integrated Security=SSPI;" & _
> "Initial Catalog=qdb"
> demoConn.open demoPath
> %>

 
 
sucaba





PostPosted: Wed Jun 07 14:09:32 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Thanks Bob. I thought I had a syntax problem instead of a provider
problem.

Bob Barrows [MVP] wrote:
> More to the point:
> http://support.microsoft.com/kb/q278604/
> EMail@HideDomain.com wrote:
> > I tried your suggestion but got the following error:
> >
> > Provider cannot be found. It may not be properly installed.
> >
> >> This might work perfect. Including the tip Bob gave.
> >>
> >> <%
> >> Set demoConn = CreateObject("ADODB.Connection")
> >> demoPath="Provider=SQLOLEDB" & _
> >> "Data Source=mysqlserver;Integrated Security=SSPI;" & _
> >> "Initial Catalog=qdb"
> >> demoConn.open demoPath
> >> %>
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.

 
 
sucaba





PostPosted: Wed Jun 07 15:17:40 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Okay, I registered the dll, but still getting the same error.

EMail@HideDomain.com wrote:
> Thanks Bob. I thought I had a syntax problem instead of a provider
> problem.
>
> Bob Barrows [MVP] wrote:
> > More to the point:
> > http://support.microsoft.com/kb/q278604/
> > EMail@HideDomain.com wrote:
> > > I tried your suggestion but got the following error:
> > >
> > > Provider cannot be found. It may not be properly installed.
> > >
> > >> This might work perfect. Including the tip Bob gave.
> > >>
> > >> <%
> > >> Set demoConn = CreateObject("ADODB.Connection")
> > >> demoPath="Provider=SQLOLEDB" & _
> > >> "Data Source=mysqlserver;Integrated Security=SSPI;" & _
> > >> "Initial Catalog=qdb"
> > >> demoConn.open demoPath
> > >> %>
> >
> > --
> > Microsoft MVP -- ASP/ASP.NET
> > Please reply to the newsgroup. The email account listed in my From
> > header is my spam trap, so I don't check it very often. You will get a
> > quicker response by posting to the newsgroup.

 
 
sucaba





PostPosted: Wed Jun 07 15:26:38 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Okay, stupid question, but I just realized that I'm not sure I
registered the dll on the right machine. Do I register on the SQL
server or the IIs server that has the ASP scripts?

EMail@HideDomain.com wrote:
> Okay, I registered the dll, but still getting the same error.
>
> EMail@HideDomain.com wrote:
> > Thanks Bob. I thought I had a syntax problem instead of a provider
> > problem.
> >
> > Bob Barrows [MVP] wrote:
> > > More to the point:
> > > http://support.microsoft.com/kb/q278604/
> > > EMail@HideDomain.com wrote:
> > > > I tried your suggestion but got the following error:
> > > >
> > > > Provider cannot be found. It may not be properly installed.
> > > >
> > > >> This might work perfect. Including the tip Bob gave.
> > > >>
> > > >> <%
> > > >> Set demoConn = CreateObject("ADODB.Connection")
> > > >> demoPath="Provider=SQLOLEDB" & _
> > > >> "Data Source=mysqlserver;Integrated Security=SSPI;" & _
> > > >> "Initial Catalog=qdb"
> > > >> demoConn.open demoPath
> > > >> %>
> > >
> > > --
> > > Microsoft MVP -- ASP/ASP.NET
> > > Please reply to the newsgroup. The email account listed in my From
> > > header is my spam trap, so I don't check it very often. You will get a
> > > quicker response by posting to the newsgroup.

 
 
Bob





PostPosted: Wed Jun 07 15:52:25 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account EMail@HideDomain.com wrote:
> I tried your suggestion but got the following error:
>
> Provider cannot be found. It may not be properly installed.
>
>> This might work perfect. Including the tip Bob gave.
>>
>> <%
>> Set demoConn = CreateObject("ADODB.Connection")
>> demoPath="Provider=SQLOLEDB" & _
>> "Data Source=mysqlserver;Integrated Security=SSPI;" & _
>> "Initial Catalog=qdb"
>> demoConn.open demoPath
>> %>
Actually, if you used this code verbatim, there is a syntax error: it's
missing a semicolon after the word "SQLOLEDB"

demoPath="Provider=SQLOLEDB;" & _
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
 
Bob





PostPosted: Wed Jun 07 15:52:57 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account On the IIS server.
But see my previous reply.

EMail@HideDomain.com wrote:
> Okay, stupid question, but I just realized that I'm not sure I
> registered the dll on the right machine. Do I register on the SQL
> server or the IIs server that has the ASP scripts?
>
> EMail@HideDomain.com wrote:
>> Okay, I registered the dll, but still getting the same error.
>>
>> EMail@HideDomain.com wrote:
>>> Thanks Bob. I thought I had a syntax problem instead of a provider
>>> problem.
>>>
>>> Bob Barrows [MVP] wrote:
>>>> More to the point:
>>>> http://support.microsoft.com/kb/q278604/
>>>> EMail@HideDomain.com wrote:
>>>>> I tried your suggestion but got the following error:
>>>>>
>>>>> Provider cannot be found. It may not be properly installed.
>>>>>
>>>>>> This might work perfect. Including the tip Bob gave.
>>>>>>
>>>>>> <%
>>>>>> Set demoConn = CreateObject("ADODB.Connection")
>>>>>> demoPath="Provider=SQLOLEDB" & _
>>>>>> "Data Source=mysqlserver;Integrated Security=SSPI;" & _
>>>>>> "Initial Catalog=qdb"
>>>>>> demoConn.open demoPath
>>>>>> %>
>>>>
>>>> --
>>>> Microsoft MVP -- ASP/ASP.NET
>>>> Please reply to the newsgroup. The email account listed in my From
>>>> header is my spam trap, so I don't check it very often. You will
>>>> get a quicker response by posting to the newsgroup.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
 
sucaba





PostPosted: Wed Jun 07 16:46:12 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account I'm back...Now I'm getting the access denied error again:

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.

Stupid question 2: Where/how are login credentials being taken care of?

 
 
Bob





PostPosted: Wed Jun 07 19:17:56 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account EMail@HideDomain.com wrote:
> I'm back...Now I'm getting the access denied error again:
>
> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
> access denied.
>

http://www.aspfaq.com/show.asp?id=2009 (scroll down almost halfway)

> Stupid question 2: Where/how are login credentials being taken care
> of?
Huh?
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
 
sucaba





PostPosted: Thu Jun 08 09:09:26 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Stupid question...I know. How/where are login info specified?

Bob Barrows [MVP] wrote:
> EMail@HideDomain.com wrote:
> > I'm back...Now I'm getting the access denied error again:
> >
> > [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
> > access denied.
> >
>
> http://www.aspfaq.com/show.asp?id=2009 (scroll down almost halfway)
>
> > Stupid question 2: Where/how are login credentials being taken care
> > of?
> Huh?
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"

 
 
Bob





PostPosted: Thu Jun 08 09:25:31 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Repeating the question does not clear up the confusion. What are you
talking about? Windows security? SQL Server security?

EMail@HideDomain.com wrote:
> Stupid question...I know. How/where are login info specified?
>
> Bob Barrows [MVP] wrote:
>> EMail@HideDomain.com wrote:
>>> I'm back...Now I'm getting the access denied error again:
>>>
>>> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
>>> access denied.
>>>
>>
>> http://www.aspfaq.com/show.asp?id=2009 (scroll down almost halfway)
>>
>>> Stupid question 2: Where/how are login credentials being taken care
>>> of?
>> Huh?
>> --
>> Microsoft MVP - ASP/ASP.NET
>> Please reply to the newsgroup. This email account is my spam trap so
>> I don't check it very often. If you must reply off-line, then remove
>> the "NO SPAM"

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
 
sucaba





PostPosted: Thu Jun 08 10:24:51 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Authentication is set to Windows and SQL Server. Note that when I
connect to Query Analyzer, I connect using RUNAS then specify domain
and username.


Bob Barrows [MVP] wrote:
> Repeating the question does not clear up the confusion. What are you
> talking about? Windows security? SQL Server security?
>
> EMail@HideDomain.com wrote:
> > Stupid question...I know. How/where are login info specified?
> >
> > Bob Barrows [MVP] wrote:
> >> EMail@HideDomain.com wrote:
> >>> I'm back...Now I'm getting the access denied error again:
> >>>
> >>> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
> >>> access denied.
> >>>
> >>
> >> http://www.aspfaq.com/show.asp?id=2009 (scroll down almost halfway)
> >>
> >>> Stupid question 2: Where/how are login credentials being taken care
> >>> of?
> >> Huh?
> >> --
> >> Microsoft MVP - ASP/ASP.NET
> >> Please reply to the newsgroup. This email account is my spam trap so
> >> I don't check it very often. If you must reply off-line, then remove
> >> the "NO SPAM"
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.

 
 
Bob





PostPosted: Thu Jun 08 10:54:54 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Y-e-e-e-s.
I'm sorry, but that does not make your question any clearer to me. What
"login info" are you asking about. SQL logins? Are you asking how to set
up your users in SQL Server? If so, this is more of a SQL Server
question than an ASP general question (there are newsgroupse devoted to
SQL Server questions: they have "sqlserver" in their names). The answer
depends on if you have Enterprise Manager. Do you have SQL Books Online?
if so, look up Security.

EMail@HideDomain.com wrote:
> Authentication is set to Windows and SQL Server. Note that when I
> connect to Query Analyzer, I connect using RUNAS then specify domain
> and username.
>
>
> Bob Barrows [MVP] wrote:
>> Repeating the question does not clear up the confusion. What are you
>> talking about? Windows security? SQL Server security?
>>
>> EMail@HideDomain.com wrote:
>>> Stupid question...I know. How/where are login info specified?
>>>
>>> Bob Barrows [MVP] wrote:
>>>> EMail@HideDomain.com wrote:
>>>>> I'm back...Now I'm getting the access denied error again:
>>>>>
>>>>> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist
>>>>> or access denied.
>>>>>
>>>>
>>>> http://www.aspfaq.com/show.asp?id=2009 (scroll down almost halfway)
>>>>
>>>>> Stupid question 2: Where/how are login credentials being taken
>>>>> care of?
>>>> Huh?
>>>> --
>>>> Microsoft MVP - ASP/ASP.NET
>>>> Please reply to the newsgroup. This email account is my spam trap
>>>> so I don't check it very often. If you must reply off-line, then
>>>> remove the "NO SPAM"
>>
>> --
>> Microsoft MVP -- ASP/ASP.NET
>> Please reply to the newsgroup. The email account listed in my From
>> header is my spam trap, so I don't check it very often. You will get
>> a quicker response by posting to the newsgroup.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
 
sucaba





PostPosted: Thu Jun 08 11:51:44 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Sorry Bob. All I'm trying to do is create a connect string with ASP to
log into the same SQL database I use with Query Analyzer and Enterprise
Manager. My confusion is that the connect string from above doesn't
have username/password in the string and I was wondering why not? Are
they implied? Should I be using a different connect string? Sorry for
the confusion.


Bob Barrows [MVP] wrote:
> Y-e-e-e-s.
> I'm sorry, but that does not make your question any clearer to me. What
> "login info" are you asking about. SQL logins? Are you asking how to set
> up your users in SQL Server? If so, this is more of a SQL Server
> question than an ASP general question (there are newsgroupse devoted to
> SQL Server questions: they have "sqlserver" in their names). The answer
> depends on if you have Enterprise Manager. Do you have SQL Books Online?
> if so, look up Security.
>
> EMail@HideDomain.com wrote:
> > Authentication is set to Windows and SQL Server. Note that when I
> > connect to Query Analyzer, I connect using RUNAS then specify domain
> > and username.
> >
> >
> > Bob Barrows [MVP] wrote:
> >> Repeating the question does not clear up the confusion. What are you
> >> talking about? Windows security? SQL Server security?
> >>
> >> EMail@HideDomain.com wrote:
> >>> Stupid question...I know. How/where are login info specified?
> >>>
> >>> Bob Barrows [MVP] wrote:
> >>>> EMail@HideDomain.com wrote:
> >>>>> I'm back...Now I'm getting the access denied error again:
> >>>>>
> >>>>> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist
> >>>>> or access denied.
> >>>>>
> >>>>
> >>>> http://www.aspfaq.com/show.asp?id=2009 (scroll down almost halfway)
> >>>>
> >>>>> Stupid question 2: Where/how are login credentials being taken
> >>>>> care of?
> >>>> Huh?
> >>>> --
> >>>> Microsoft MVP - ASP/ASP.NET
> >>>> Please reply to the newsgroup. This email account is my spam trap
> >>>> so I don't check it very often. If you must reply off-line, then
> >>>> remove the "NO SPAM"
> >>
> >> --
> >> Microsoft MVP -- ASP/ASP.NET
> >> Please reply to the newsgroup. The email account listed in my From
> >> header is my spam trap, so I don't check it very often. You will get
> >> a quicker response by posting to the newsgroup.
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.

 
 
Bob





PostPosted: Thu Jun 08 12:38:19 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Ahhh! Now the question is clear!
The line "Integrated Security=SSPI" causes the windows credentials of
the current user to be used to log into the server.
In an ASP application, as long as Anonymous access is disabled, the
current user will be the user whose name appears in the "LOGON_USER"
servervariable. Use this to verify that the user's credentials are being
seen:

Response.Write Request.ServerVariables("LOGON_USER")

But that should have nothing to do with your problem. The "server does
not exist..." error you are seeing is happening even before the login
is attempted. You should Response.Write your connection string and make
sure you have no typos.

EMail@HideDomain.com wrote:
> Sorry Bob. All I'm trying to do is create a connect string with ASP
> to log into the same SQL database I use with Query Analyzer and
> Enterprise Manager. My confusion is that the connect string from
> above doesn't have username/password in the string and I was
> wondering why not? Are they implied? Should I be using a different
> connect string? Sorry for the confusion.
>
>
> Bob Barrows [MVP] wrote:
>> Y-e-e-e-s.
>> I'm sorry, but that does not make your question any clearer to me.
>> What "login info" are you asking about. SQL logins? Are you asking
>> how to set up your users in SQL Server? If so, this is more of a SQL
>> Server question than an ASP general question (there are newsgroupse
>> devoted to SQL Server questions: they have "sqlserver" in their
>> names). The answer depends on if you have Enterprise Manager. Do you
>> have SQL Books Online? if so, look up Security.
>>
>> EMail@HideDomain.com wrote:
>>> Authentication is set to Windows and SQL Server. Note that when I
>>> connect to Query Analyzer, I connect using RUNAS then specify domain
>>> and username.
>>>
>>>
>>> Bob Barrows [MVP] wrote:
>>>> Repeating the question does not clear up the confusion. What are
>>>> you talking about? Windows security? SQL Server security?
>>>>
>>>> EMail@HideDomain.com wrote:
>>>>> Stupid question...I know. How/where are login info specified?
>>>>>
>>>>> Bob Barrows [MVP] wrote:
>>>>>> EMail@HideDomain.com wrote:
>>>>>>> I'm back...Now I'm getting the access denied error again:
>>>>>>>
>>>>>>> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist
>>>>>>> or access denied.
>>>>>>>
>>>>>>
>>>>>> http://www.aspfaq.com/show.asp?id=2009 (scroll down almost
>>>>>> halfway)
>>>>>>
>>>>>>> Stupid question 2: Where/how are login credentials being taken
>>>>>>> care of?
>>>>>> Huh?

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
 
sucaba





PostPosted: Thu Jun 08 14:51:58 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Aha! Now I can see the logon credentials. Per your suggestion, I
tried to write.response my connect string, but got the same error.
Here's what I tried:

response.write demopath


Bob Barrows [MVP] wrote:
> Ahhh! Now the question is clear!
> The line "Integrated Security=SSPI" causes the windows credentials of
> the current user to be used to log into the server.
> In an ASP application, as long as Anonymous access is disabled, the
> current user will be the user whose name appears in the "LOGON_USER"
> servervariable. Use this to verify that the user's credentials are being
> seen:
>
> Response.Write Request.ServerVariables("LOGON_USER")
>
> But that should have nothing to do with your problem. The "server does
> not exist..." error you are seeing is happening even before the login
> is attempted. You should Response.Write your connection string and make
> sure you have no typos.
>
> EMail@HideDomain.com wrote:
> > Sorry Bob. All I'm trying to do is create a connect string with ASP
> > to log into the same SQL database I use with Query Analyzer and
> > Enterprise Manager. My confusion is that the connect string from
> > above doesn't have username/password in the string and I was
> > wondering why not? Are they implied? Should I be using a different
> > connect string? Sorry for the confusion.
> >
> >
> > Bob Barrows [MVP] wrote:
> >> Y-e-e-e-s.
> >> I'm sorry, but that does not make your question any clearer to me.
> >> What "login info" are you asking about. SQL logins? Are you asking
> >> how to set up your users in SQL Server? If so, this is more of a SQL
> >> Server question than an ASP general question (there are newsgroupse
> >> devoted to SQL Server questions: they have "sqlserver" in their
> >> names). The answer depends on if you have Enterprise Manager. Do you
> >> have SQL Books Online? if so, look up Security.
> >>
> >> EMail@HideDomain.com wrote:
> >>> Authentication is set to Windows and SQL Server. Note that when I
> >>> connect to Query Analyzer, I connect using RUNAS then specify domain
> >>> and username.
> >>>
> >>>
> >>> Bob Barrows [MVP] wrote:
> >>>> Repeating the question does not clear up the confusion. What are
> >>>> you talking about? Windows security? SQL Server security?
> >>>>
> >>>> EMail@HideDomain.com wrote:
> >>>>> Stupid question...I know. How/where are login info specified?
> >>>>>
> >>>>> Bob Barrows [MVP] wrote:
> >>>>>> EMail@HideDomain.com wrote:
> >>>>>>> I'm back...Now I'm getting the access denied error again:
> >>>>>>>
> >>>>>>> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist
> >>>>>>> or access denied.
> >>>>>>>
> >>>>>>
> >>>>>> http://www.aspfaq.com/show.asp?id=2009 (scroll down almost
> >>>>>> halfway)
> >>>>>>
> >>>>>>> Stupid question 2: Where/how are login credentials being taken
> >>>>>>> care of?
> >>>>>> Huh?
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.

 
 
Bob





PostPosted: Thu Jun 08 15:38:54 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account EMail@HideDomain.com wrote:
> Aha! Now I can see the logon credentials. Per your suggestion, I
> tried to write.response my connect string, but got the same error.
> Here's what I tried:
>
> response.write demopath
>
So what was the result?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
 
sucaba





PostPosted: Fri Jun 09 08:51:26 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account I'm not sure the response.write worked but here's the output:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.

/test3.asp, line 6


Bob Barrows [MVP] wrote:
> EMail@HideDomain.com wrote:
> > Aha! Now I can see the logon credentials. Per your suggestion, I
> > tried to write.response my connect string, but got the same error.
> > Here's what I tried:
> >
> > response.write demopath
> >
> So what was the result?
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.

 
 
Bob





PostPosted: Fri Jun 09 09:44:58 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Assign the connection string to a variable and response.write the contents
of that variable:

dim constr
constr="provider= ..."
response.write constr
response.end
dim cn
etc

EMail@HideDomain.com wrote:
> I'm not sure the response.write worked but here's the output:
>
> Microsoft OLE DB Provider for SQL Server error '80004005'
>
> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
> access denied.
>
> /test3.asp, line 6
>
>
> Bob Barrows [MVP] wrote:
>> EMail@HideDomain.com wrote:
>>> Aha! Now I can see the logon credentials. Per your suggestion, I
>>> tried to write.response my connect string, but got the same error.
>>> Here's what I tried:
>>>
>>> response.write demopath
>>>
>> So what was the result?
>> --
>> Microsoft MVP -- ASP/ASP.NET
>> Please reply to the newsgroup. The email account listed in my From
>> header is my spam trap, so I don't check it very often. You will get
>> a quicker response by posting to the newsgroup.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
 
sucaba





PostPosted: Fri Jun 09 10:25:40 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Obviously I'm doing something wrong. Here's my code:

<%
dim demopath
Set demoConn = CreateObject("ADODB.Connection")
demoPath="Provider=SQLOLEDB;" & _
"Data Source=enpefrqdb01;Integrated Security=SSPI;" & _
"Initial Catalog=qdb"
demoConn.open demoPath
response.write demopath
response.end
%>

BTW, thanks for all the help Bob.


Bob Barrows [MVP] wrote:
> Assign the connection string to a variable and response.write the contents
> of that variable:
>
> dim constr
> constr="provider= ..."
> response.write constr
> response.end
> dim cn
> etc
>
> EMail@HideDomain.com wrote:
> > I'm not sure the response.write worked but here's the output:
> >
> > Microsoft OLE DB Provider for SQL Server error '80004005'
> >
> > [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
> > access denied.
> >
> > /test3.asp, line 6
> >
> >
> > Bob Barrows [MVP] wrote:
> >> EMail@HideDomain.com wrote:
> >>> Aha! Now I can see the logon credentials. Per your suggestion, I
> >>> tried to write.response my connect string, but got the same error.
> >>> Here's what I tried:
> >>>
> >>> response.write demopath
> >>>
> >> So what was the result?
> >> --
> >> Microsoft MVP -- ASP/ASP.NET
> >> Please reply to the newsgroup. The email account listed in my From
> >> header is my spam trap, so I don't check it very often. You will get
> >> a quicker response by posting to the newsgroup.
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"

 
 
Bob





PostPosted: Fri Jun 09 10:30:32 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Move the Open statement to a line that follows the response.end statment
EMail@HideDomain.com wrote:
> Obviously I'm doing something wrong. Here's my code:
>
> <%
> dim demopath
> Set demoConn = CreateObject("ADODB.Connection")
> demoPath="Provider=SQLOLEDB;" & _
> "Data Source=enpefrqdb01;Integrated Security=SSPI;" & _
> "Initial Catalog=qdb"
> demoConn.open demoPath
> response.write demopath
> response.end
> %>
>
> BTW, thanks for all the help Bob.
>
>
> Bob Barrows [MVP] wrote:
>> Assign the connection string to a variable and response.write the
>> contents of that variable:
>>
>> dim constr
>> constr="provider= ..."
>> response.write constr
>> response.end
>> dim cn
>> etc
>>
>> EMail@HideDomain.com wrote:
>>> I'm not sure the response.write worked but here's the output:
>>>
>>> Microsoft OLE DB Provider for SQL Server error '80004005'
>>>
>>> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
>>> access denied.
>>>
>>> /test3.asp, line 6
>>>
>>>
>>> Bob Barrows [MVP] wrote:
>>>> EMail@HideDomain.com wrote:
>>>>> Aha! Now I can see the logon credentials. Per your suggestion, I
>>>>> tried to write.response my connect string, but got the same error.
>>>>> Here's what I tried:
>>>>>
>>>>> response.write demopath
>>>>>
>>>> So what was the result?
>>>> --
>>>> Microsoft MVP -- ASP/ASP.NET
>>>> Please reply to the newsgroup. The email account listed in my From
>>>> header is my spam trap, so I don't check it very often. You will
>>>> get
>>>> a quicker response by posting to the newsgroup.
>>
>> --
>> Microsoft MVP - ASP/ASP.NET
>> Please reply to the newsgroup. This email account is my spam trap so
>> I don't check it very often. If you must reply off-line, then remove
>> the "NO SPAM"

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
 
Bob





PostPosted: Fri Jun 09 10:32:21 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account EMail@HideDomain.com wrote:
> Obviously I'm doing something wrong. Here's my code:
>
> <%
> dim demopath
> Set demoConn = CreateObject("ADODB.Connection")
> demoPath="Provider=SQLOLEDB;" & _
> "Data Source=enpefrqdb01;Integrated Security=SSPI;" & _
> "Initial Catalog=qdb"
> demoConn.open demoPath
> response.write demopath
> response.end
> %>
>
> BTW, thanks for all the help Bob.
>
>

Ask yourself:
Which line of code is raising the error?
Then
Which line of code do I want to prevent from being executed by using
response.end?

The solution should be obvious ... :-)


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
 
sucaba





PostPosted: Fri Jun 09 10:53:13 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Doh! Sorry 'bout that. Here's the output:

Provider=SQLOLEDB;Data Source=xxxx01;Integrated Security=SSPI;Initial
Catalog=qdb

Bob Barrows [MVP] wrote:
> Move the Open statement to a line that follows the response.end statment
> EMail@HideDomain.com wrote:
> > Obviously I'm doing something wrong. Here's my code:
> >
> > <%
> > dim demopath
> > Set demoConn = CreateObject("ADODB.Connection")
> > demoPath="Provider=SQLOLEDB;" & _
> > "Data Source=enpefrqdb01;Integrated Security=SSPI;" & _
> > "Initial Catalog=qdb"
> > demoConn.open demoPath
> > response.write demopath
> > response.end
> > %>
> >
> > BTW, thanks for all the help Bob.
> >
> >
> > Bob Barrows [MVP] wrote:
> >> Assign the connection string to a variable and response.write the
> >> contents of that variable:
> >>
> >> dim constr
> >> constr="provider= ..."
> >> response.write constr
> >> response.end
> >> dim cn
> >> etc
> >>
> >> EMail@HideDomain.com wrote:
> >>> I'm not sure the response.write worked but here's the output:
> >>>
> >>> Microsoft OLE DB Provider for SQL Server error '80004005'
> >>>
> >>> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
> >>> access denied.
> >>>
> >>> /test3.asp, line 6
> >>>
> >>>
> >>> Bob Barrows [MVP] wrote:
> >>>> EMail@HideDomain.com wrote:
> >>>>> Aha! Now I can see the logon credentials. Per your suggestion, I
> >>>>> tried to write.response my connect string, but got the same error.
> >>>>> Here's what I tried:
> >>>>>
> >>>>> response.write demopath
> >>>>>
> >>>> So what was the result?
> >>>> --
> >>>> Microsoft MVP -- ASP/ASP.NET
> >>>> Please reply to the newsgroup. The email account listed in my From
> >>>> header is my spam trap, so I don't check it very often. You will
> >>>> get
> >>>> a quicker response by posting to the newsgroup.
> >>
> >> --
> >> Microsoft MVP - ASP/ASP.NET
> >> Please reply to the newsgroup. This email account is my spam trap so
> >> I don't check it very often. If you must reply off-line, then remove
> >> the "NO SPAM"
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"

 
 
Bob





PostPosted: Fri Jun 09 11:01:03 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Well, there's something wrong here. Your line of code is:

"Data Source=enpefrqdb01;Integrated Security=SSPI;" & _

But the result of Response.Write is:

Data Source=xxxx01;Integrated Security=SSPI


I doubt your server is really called "xxxx01" is it?



EMail@HideDomain.com wrote:
> Doh! Sorry 'bout that. Here's the output:
>
> Provider=SQLOLEDB;Data Source=xxxx01;Integrated Security=SSPI;Initial
> Catalog=qdb
>
> Bob Barrows [MVP] wrote:
>> Move the Open statement to a line that follows the response.end
>> statment EMail@HideDomain.com wrote:
>>> Obviously I'm doing something wrong. Here's my code:
>>>
>>> <%
>>> dim demopath
>>> Set demoConn = CreateObject("ADODB.Connection")
>>> demoPath="Provider=SQLOLEDB;" & _
>>> "Data Source=enpefrqdb01;Integrated Security=SSPI;" & _
>>> "Initial Catalog=qdb"
>>> demoConn.open demoPath
>>> response.write demopath
>>> response.end
>>> %>
>>>
>>> BTW, thanks for all the help Bob.
>>>
>>>
>>> Bob Barrows [MVP] wrote:
>>>> Assign the connection string to a variable and response.write the
>>>> contents of that variable:
>>>>
>>>> dim constr
>>>> constr="provider= ..."
>>>> response.write constr
>>>> response.end
>>>> dim cn
>>>> etc
>>>>
>>>> EMail@HideDomain.com wrote:
>>>>> I'm not sure the response.write worked but here's the output:
>>>>>
>>>>> Microsoft OLE DB Provider for SQL Server error '80004005'
>>>>>
>>>>> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist
>>>>> or access denied.
>>>>>
>>>>> /test3.asp, line 6
>>>>>
>>>>>
>>>>> Bob Barrows [MVP] wrote:
>>>>>> EMail@HideDomain.com wrote:
>>>>>>> Aha! Now I can see the logon credentials. Per your
>>>>>>> suggestion, I tried to write.response my connect string, but
>>>>>>> got the same error. Here's what I tried:
>>>>>>>
>>>>>>> response.write demopath
>>>>>>>
>>>>>> So what was the result?
>>>>>> --
>>>>>> Microsoft MVP -- ASP/ASP.NET
>>>>>> Please reply to the newsgroup. The email account listed in my
>>>>>> From header is my spam trap, so I don't check it very often. You
>>>>>> will get
>>>>>> a quicker response by posting to the newsgroup.
>>>>
>>>> --
>>>> Microsoft MVP - ASP/ASP.NET
>>>> Please reply to the newsgroup. This email account is my spam trap
>>>> so I don't check it very often. If you must reply off-line, then
>>>> remove the "NO SPAM"
>>
>> --
>> Microsoft MVP - ASP/ASP.NET
>> Please reply to the newsgroup. This email account is my spam trap so
>> I don't check it very often. If you must reply off-line, then remove
>> the "NO SPAM"

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
 
sucaba





PostPosted: Fri Jun 09 11:42:23 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account Well I moved response.end after democonn.open, but still getting the
error. Obvious? Not to me...obviously! :-)


Bob Barrows [MVP] wrote:
> EMail@HideDomain.com wrote:
> > Obviously I'm doing something wrong. Here's my code:
> >
> > <%
> > dim demopath
> > Set demoConn = CreateObject("ADODB.Connection")
> > demoPath="Provider=SQLOLEDB;" & _
> > "Data Source=enpefrqdb01;Integrated Security=SSPI;" & _
> > "Initial Catalog=qdb"
> > demoConn.open demoPath
> > response.write demopath
> > response.end
> > %>
> >
> > BTW, thanks for all the help Bob.
> >
> >
>
> Ask yourself:
> Which line of code is raising the error?
> Then
> Which line of code do I want to prevent from being executed by using
> response.end?
>
> The solution should be obvious ... :-)
>
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"

 
 
Bob





PostPosted: Fri Jun 09 11:52:41 CDT 2006 Top

ASP/Active Server Pages >> ASP Connection String for Privileged Account This was in response to your previous post about not getting the
response.write to work ...
Nothing to do with your ADO error

EMail@HideDomain.com wrote:
> Well I moved response.end after democonn.open, but still getting the
> error. Obvious? Not to me...obviously! :-)
>
>
> Bob Barrows [MVP] wrote:
>> EMail@HideDomain.com wrote:
>>> Obviously I'm doing something wrong. Here's my code:
>>>
>>> <%
>>> dim demopath
>>> Set demoConn = CreateObject("ADODB.Connection")
>>> demoPath="Provider=SQLOLEDB;" & _
>>> "Data Source=enpefrqdb01;Integrated Security=SSPI;" & _
>>> "Initial Catalog=qdb"
>>> demoConn.open demoPath
>>> response.write demopath
>>> response.end
>>> %>
>>>
>>> BTW, thanks for all the help Bob.
>>>
>>>
>>
>> Ask yourself:
>> Which line of code is raising the error?
>> Then
>> Which line of code do I want to prevent from being executed by using
>> response.end?
>>
>> The solution should be obvious ... :-)
>>
>>
>> --
>> Microsoft MVP - ASP/ASP.NET
>> Please reply to the newsgroup. This email account is my spam trap so
>> I don't check it very often. If you must reply off-line, then remove
>> the "NO SPAM"

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"