473,796 Members | 2,520 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 #1
39 2906
su******@gmail. 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.CreateOb ject("ADODB.Con nection")
demoPath="DRIVE R={SQL Server};" & _
"SERVER=mysqlse rver;UID=myuser name;" & _
"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"
Jun 7 '06 #2

<su******@gmail .com> wrote in message
news:11******** **************@ c74g2000cwc.goo glegroups.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.CreateOb ject("ADODB.Con nection")
demoPath="DRIVE R={SQL Server};" & _
"SERVER=mysqlse rver;UID=myuser name;" & _
"PWD=mypassword #;DATABASE=qdb"
demoConn.open demoPath
%>

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
%>
--
compatible web farm Session replacement for Asp and Asp.Net
http://www.nieropwebconsult.nl/asp_session_manager.htm

Jun 7 '06 #3
Hopefully one of these search results will help:
http://groups.google.com/groups?as_q...=2006&safe=off

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.
Jun 7 '06 #4
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.
Jun 7 '06 #5
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
%>


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


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


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


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

Actually, if you used this code verbatim, there is a syntax error: it's
missing a semicolon after the word "SQLOLEDB"

demoPath="Provi der=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.
Jun 7 '06 #10

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

Similar topics

7
6816
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
9528
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10456
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10174
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
10012
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...
1
7548
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
5442
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
5575
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4118
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
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.