473,804 Members | 2,111 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
su******@gmail. 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.
Jun 8 '06 #21
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:
su******@gmail. 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.


Jun 9 '06 #22
Assign the connection string to a variable and response.write the contents
of that variable:

dim constr
constr="provide r= ..."
response.write constr
response.end
dim cn
etc

su******@gmail. 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:
su******@gmail. 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"
Jun 9 '06 #23
Obviously I'm doing something wrong. Here's my code:

<%
dim demopath
Set demoConn = CreateObject("A DODB.Connection ")
demoPath="Provi der=SQLOLEDB;" & _
"Data Source=enpefrqd b01;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="provide r= ..."
response.write constr
response.end
dim cn
etc

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


Jun 9 '06 #24
Move the Open statement to a line that follows the response.end statment
su******@gmail. com wrote:
Obviously I'm doing something wrong. Here's my code:

<%
dim demopath
Set demoConn = CreateObject("A DODB.Connection ")
demoPath="Provi der=SQLOLEDB;" & _
"Data Source=enpefrqd b01;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="provide r= ..."
response.write constr
response.end
dim cn
etc

su******@gmail. 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:
su******@gmail. 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"
Jun 9 '06 #25
su******@gmail. com wrote:
Obviously I'm doing something wrong. Here's my code:

<%
dim demopath
Set demoConn = CreateObject("A DODB.Connection ")
demoPath="Provi der=SQLOLEDB;" & _
"Data Source=enpefrqd b01;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"
Jun 9 '06 #26
Doh! Sorry 'bout that. Here's the output:

Provider=SQLOLE DB;Data Source=xxxx01;I ntegrated Security=SSPI;I nitial
Catalog=qdb

Bob Barrows [MVP] wrote:
Move the Open statement to a line that follows the response.end statment
su******@gmail. com wrote:
Obviously I'm doing something wrong. Here's my code:

<%
dim demopath
Set demoConn = CreateObject("A DODB.Connection ")
demoPath="Provi der=SQLOLEDB;" & _
"Data Source=enpefrqd b01;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="provide r= ..."
response.write constr
response.end
dim cn
etc

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


Jun 9 '06 #27
Well, there's something wrong here. Your line of code is:

"Data Source=enpefrqd b01;Integrated Security=SSPI;" & _

But the result of Response.Write is:

Data Source=xxxx01;I ntegrated Security=SSPI
I doubt your server is really called "xxxx01" is it?

su******@gmail. com wrote:
Doh! Sorry 'bout that. Here's the output:

Provider=SQLOLE DB;Data Source=xxxx01;I ntegrated Security=SSPI;I nitial
Catalog=qdb

Bob Barrows [MVP] wrote:
Move the Open statement to a line that follows the response.end
statment su******@gmail. com wrote:
Obviously I'm doing something wrong. Here's my code:

<%
dim demopath
Set demoConn = CreateObject("A DODB.Connection ")
demoPath="Provi der=SQLOLEDB;" & _
"Data Source=enpefrqd b01;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="provide r= ..."
response.write constr
response.end
dim cn
etc

su******@gmail. 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:
>> su******@gmail. 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"
Jun 9 '06 #28
No, I just x'd out the server name.

Bob Barrows [MVP] wrote:
Well, there's something wrong here. Your line of code is:

"Data Source=enpefrqd b01;Integrated Security=SSPI;" & _

But the result of Response.Write is:

Data Source=xxxx01;I ntegrated Security=SSPI
I doubt your server is really called "xxxx01" is it?

su******@gmail. com wrote:
Doh! Sorry 'bout that. Here's the output:

Provider=SQLOLE DB;Data Source=xxxx01;I ntegrated Security=SSPI;I nitial
Catalog=qdb

Bob Barrows [MVP] wrote:
Move the Open statement to a line that follows the response.end
statment su******@gmail. com wrote:
Obviously I'm doing something wrong. Here's my code:

<%
dim demopath
Set demoConn = CreateObject("A DODB.Connection ")
demoPath="Provi der=SQLOLEDB;" & _
"Data Source=enpefrqd b01;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="provide r= ..."
> response.write constr
> response.end
> dim cn
> etc
>
> su******@gmail. 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:
>>> su******@gmail. 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"


Jun 9 '06 #29
In that case, the information in the aspfaq article I cited earlier is
relevant. Make sure to read the KB articles it links to.

Let us know how you make out.

su******@gmail. com wrote:
No, I just x'd out the server name.

Bob Barrows [MVP] wrote:
Well, there's something wrong here. Your line of code is:

"Data Source=enpefrqd b01;Integrated Security=SSPI;" & _

But the result of Response.Write is:

Data Source=xxxx01;I ntegrated Security=SSPI
I doubt your server is really called "xxxx01" is it?

su******@gmail. com wrote:
Doh! Sorry 'bout that. Here's the output:

Provider=SQLOLE DB;Data Source=xxxx01;I ntegrated
Security=SSPI;I nitial Catalog=qdb

Bob Barrows [MVP] wrote:
Move the Open statement to a line that follows the response.end
statment su******@gmail. com wrote:
> Obviously I'm doing something wrong. Here's my code:
>
> <%
> dim demopath
> Set demoConn = CreateObject("A DODB.Connection ")
> demoPath="Provi der=SQLOLEDB;" & _
> "Data Source=enpefrqd b01;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="provide r= ..."
>> response.write constr
>> response.end
>> dim cn
>> etc
>>
>> su******@gmail. 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:
>>>> su******@gmail. 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
>>>>>

--
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 9 '06 #30

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...
0
10352
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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
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
5535
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3835
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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.