特权帐户的ASP连接字符串 [英] ASP Connection String for Privileged Account

查看:78
本文介绍了特权帐户的ASP连接字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道这是否是一个独特的问题,或者我正在以错误的方式解决这个问题。我目前通过

特权账户(使用RUNAS)连接到我们的一个SQL服务器。没有问题。我现在

需要能够使用ASP连接到同一个SQL服务器。我有以下连接字符串

,但我不知道如何在字符串中指定

域,还是有其他方法?


<%

设置demoConn = Server.CreateObject(" ADODB.Connection")

demoPath =" DRIVER = {SQL Server };" &安培; _

" SERVER = mysqlserver; UID = myusername;" &安培; _

" PWD = mypassword#; DATABASE = qdb"

demoConn.open demoPath

%>

谢谢!

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!

推荐答案

su ****** @ gmail.com 写道:
我不知道这是一个独特的问题,还是我要去做的<错误的方式。我目前通过
特权帐户(使用RUNAS)连接到我们的一个SQL服务器。没有问题。我现在需要能够使用ASP连接到同一个SQL服务器。我有以下连接字符串,但我不知道如何在字符串中指定
域,还是有其他方法?


首先,您需要在您网站的目录中关闭匿名访问

使用IIS管理器进行安全设置。

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

谢谢!
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

请回复新闻组。这个电子邮件帐户是我的垃圾邮件陷阱所以我

不经常检查它。如果您必须离线回复,请删除

没有垃圾邮件



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"




< su ******@gmail.com>在消息中写道

news:11 ********************** @ c74g2000cwc.googlegr oups.com ...

<su******@gmail.com> wrote in message
news:11**********************@c74g2000cwc.googlegr oups.com...
我不知道这是一个独特的问题,还是我正在以错误的方式解决这个问题。我目前通过
特权帐户(使用RUNAS)连接到我们的一个SQL服务器。没有问题。我现在需要能够使用ASP连接到同一个SQL服务器。我有以下连接字符串,但我不知道如何在字符串中指定
域,还是有其他方法?

<%
设置demoConn = Server.CreateObject(" ADODB.Connection")
demoPath =" DRIVER = {SQL Server};" &安培; _
" SERVER = mysqlserver; UID = myusername;" &安培; _
" PWD = mypassword#; DATABASE = qdb"
demoConn.open demoPath
%>
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
%>



这可能是完美的。包括Bob给出的提示。


<%

设置demoConn = CreateObject(" ADODB.Connection")

demoPath = QUOT;提供商= SQLOLEDB" &安培; _

数据源= mysqlserver;集成安全性= SSPI; &安培; _

" Initial Catalog = qdb"

demoConn.open demoPath

%>

-

兼容的Web场Asp和Asp.Net的会话替换
http://www.nieropwebconsult.nl/asp_session_manager.htm


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


希望其中一个搜索结果有用:
http://groups.google.com/groups?as_q...=2006&safe=off

< a href =mailto:su ****** @ gmail.com> su ****** @ gmail.com 写道:
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.
这可能是完美的。包括Bob给出的提示。

<%
设置demoConn = CreateObject(" ADODB.Connection")
demoPath =" Provider = SQLOLEDB" &安培; _
" Data Source = mysqlserver; Integrated Security = SSPI;" &安培; _
"初始目录= 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
%>




-

Microsoft MVP - ASP / ASP.NET

请回复新闻组。我的From

标题中列出的电子邮件帐户是我的垃圾邮件陷阱,因此我不经常检查它。通过发布到新闻组,您将获得更快的回复。



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


这篇关于特权帐户的ASP连接字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆