473,804 Members | 2,201 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
Well I moved response.end after democonn.open, but still getting the
error. Obvious? Not to me...obviously! :-)
Bob Barrows [MVP] wrote:
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 #31
This was in response to your previous post about not getting the
response.write to work ...
Nothing to do with your ADO error

su******@gmail. com wrote:
Well I moved response.end after democonn.open, but still getting the
error. Obvious? Not to me...obviously! :-)
Bob Barrows [MVP] wrote:
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"


--
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 #32
So the KB article you're referring to is: Q247931?

Bob Barrows [MVP] wrote:
This was in response to your previous post about not getting the
response.write to work ...
Nothing to do with your ADO error

su******@gmail. com wrote:
Well I moved response.end after democonn.open, but still getting the
error. Obvious? Not to me...obviously! :-)
Bob Barrows [MVP] wrote:
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"


--
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 #33
I don't know, there are a few KB articles cited in that article as I
remember it. Any one of them could be relevant to your problem. I cannot
tell which one because I am not sitting at the keyboard of your server
looking at its configuration settings. IOW, you are going to have to sort
this out yourself using the information I've provided.

Oh wait, one last thing. Is your web server W2003? Are you using SQL 2000?
Is it up-to-date with its service packs? SQL 2000 SP4 fixed a problem with
connections from W2003 servers.

That's it. There is nothing more I can offer.

su******@gmail. com wrote:
So the KB article you're referring to is: Q247931?

--
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 #34
Thanks for all the help Bob. I do appreciate it.

Bob Barrows [MVP] wrote:
I don't know, there are a few KB articles cited in that article as I
remember it. Any one of them could be relevant to your problem. I cannot
tell which one because I am not sitting at the keyboard of your server
looking at its configuration settings. IOW, you are going to have to sort
this out yourself using the information I've provided.

Oh wait, one last thing. Is your web server W2003? Are you using SQL 2000?
Is it up-to-date with its service packs? SQL 2000 SP4 fixed a problem with
connections from W2003 servers.

That's it. There is nothing more I can offer.

su******@gmail. com wrote:
So the KB article you're referring to is: Q247931?

--
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 #35
One more question. Is there a relationship between the ODBC System DSN
login on the IIs server, and the SQL server I'm trying to connect to?
In other words, are the login credentials on the IIs server being used,
or the SQL server? Or both?

Jun 9 '06 #36
su******@gmail. com wrote:
One more question. Is there a relationship between the ODBC System
DSN login on the IIs server, and the SQL server I'm trying to connect
to? In other words, are the login credentials on the IIs server being
used, or the SQL server? Or both?


You are using SQLOLEDB, which is the OLE DB Provider for SQL Server, not
ODBC. Totally different and separate technology.
--
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 10 '06 #37
Okay, so the System DSN login information (on the IIs server) is not
being used?

Bob Barrows [MVP] wrote:

You are using SQLOLEDB, which is the OLE DB Provider for SQL Server, not
ODBC. Totally different and separate technology.


Jun 12 '06 #38
:-)
I think that's what I said, but yes, that is correct.

Again ... you are not having a login problem (which would result in an error
containing the words "login failed".). You are having a "SQL Server does not
exist or access denied" problem, which is a completely different thing.

There are two stages in establishing a connection to a database server:
1. Finding it on the network and verifying that you can communicate with it
2. Providing login credentials

Step 1 is the one that is failing for you. As to why you are having this
problem, I could not say without going through the troubleshooting steps
described in the KB articles linked to from the aspfaq article.

http://support.microsoft.com/default.aspx/kb/328306

su******@gmail. com wrote:
Okay, so the System DSN login information (on the IIs server) is not
being used?

Bob Barrows [MVP] wrote:

You are using SQLOLEDB, which is the OLE DB Provider for SQL Server,
not ODBC. Totally different and separate technology.


--
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 12 '06 #39
Got it. Just thought the "access denied" part of the error might be
pointing to a credential problem. I'll stop...for real. :-)

Bob Barrows [MVP] wrote:
:-)
I think that's what I said, but yes, that is correct.

Again ... you are not having a login problem (which would result in an error
containing the words "login failed".). You are having a "SQL Server does not
exist or access denied" problem, which is a completely different thing.

There are two stages in establishing a connection to a database server:
1. Finding it on the network and verifying that you can communicate with it
2. Providing login credentials

Step 1 is the one that is failing for you. As to why you are having this
problem, I could not say without going through the troubleshooting steps
described in the KB articles linked to from the aspfaq article.

http://support.microsoft.com/default.aspx/kb/328306

su******@gmail. com wrote:
Okay, so the System DSN login information (on the IIs server) is not
being used?

Bob Barrows [MVP] wrote:

You are using SQLOLEDB, which is the OLE DB Provider for SQL Server,
not ODBC. Totally different and separate technology.


--
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 12 '06 #40

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...
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
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?
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

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.