473,804 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.CreateOb ject("ADODB.Con nection")
demoPath="DRIVE R={SQL Server};" & _
"SERVER=mysqlse rver;UID=myuser name;" & _
"PWD=mypassword #;DATABASE=qdb"
demoConn.open demoPath
%>

Thanks!

Jun 5 '06
39 2909
On the IIS server.
But see my previous reply.

su******@gmail. 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?

su******@gmail. com wrote:
Okay, I registered the dll, but still getting the same error.

su******@gmail. 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/
su******@gmail. 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("A DODB.Connection ")
>> demoPath="Provi der=SQLOLEDB" & _
>> "Data Source=mysqlser ver;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.
Jun 7 '06 #11
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?

Jun 7 '06 #12
su******@gmail. 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"
Jun 8 '06 #13
Stupid question...I know. How/where are login info specified?

Bob Barrows [MVP] wrote:
su******@gmail. 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"


Jun 8 '06 #14
Repeating the question does not clear up the confusion. What are you
talking about? Windows security? SQL Server security?

su******@gmail. com wrote:
Stupid question...I know. How/where are login info specified?

Bob Barrows [MVP] wrote:
su******@gmail. 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.
Jun 8 '06 #15
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?

su******@gmail. com wrote:
Stupid question...I know. How/where are login info specified?

Bob Barrows [MVP] wrote:
su******@gmail. 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.


Jun 8 '06 #16
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.

su******@gmail. 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?

su******@gmail. com wrote:
Stupid question...I know. How/where are login info specified?

Bob Barrows [MVP] wrote:
su******@gmail. 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.
Jun 8 '06 #17
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.

su******@gmail. 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?

su******@gmail. com wrote:
Stupid question...I know. How/where are login info specified?

Bob Barrows [MVP] wrote:
> su******@gmail. 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.


Jun 8 '06 #18
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.ServerV ariables("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.

su******@gmail. 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.

su******@gmail. 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?

su******@gmail. com wrote:
> Stupid question...I know. How/where are login info specified?
>
> Bob Barrows [MVP] wrote:
>> su******@gmail. 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.
Jun 8 '06 #19
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.ServerV ariables("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.

su******@gmail. 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.

su******@gmail. 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?
>
> su******@gmail. com wrote:
>> Stupid question...I know. How/where are login info specified?
>>
>> Bob Barrows [MVP] wrote:
>>> su******@gmail. 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.


Jun 8 '06 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
6817
by: Amar | last post by:
I am trying to connect to my college LDAP directory using ASP.NET. This LDap does not have security as it returns only user demographic information. i do not need to bind with a username or credentials. What i am trying to do is, i am trying to look up all the information for the user with user id 'testuser'. The following is the Vb.net code for my aspx page: Dim oRoot As DirectoryEntry = New...
0
9715
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10354
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10097
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9175
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7642
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6867
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.