Re: ASP access to SQL Database
- From: "Ken-T" <KenT@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 22 Feb 2006 03:20:30 -0800
Steve,
am still working on this, is difficult to find time to really follow through
at the moment.
Our SBS however was installed before my time here, and I know that some
"fiddling" was done, have already done a lot of work getting things back to
norm and properly functional.
I saw in MS article 306518 a reference to configuring SQL server to use
Standard Security. Ours is showing set to "Windows Only" rather than "SQL
Server and Windows".
Is this normal default for SBS? Would it perhaps make sense to change to
SQL Svr and Windows security?
"Steve Foster [SBS MVP]" wrote:
Ken-T wrote:.
Hi,
on SBS premium....
taking some first steps with a test DB in SQL and some ASP pages .
Just need to get one or two things working so can get a better idea if a
project involving a major DB with lookups from Domain users via ASP on IIS
is
worth the effort.
(Yes, I will buy a book and study it properly when I start.... anyone has
and ideas for a really good book for database access via ASP would
appreciate
it).
For first step, an ASP page on IIS with contzent shown below fails with
"no trusted SQL connection.... error with login of user sa" etc.
<%
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=SQLOLEDB; Initial Catalog = Northwind; User Id = sa;
Password="
If conn.errors.count = 0 Then
Response.Write "Connected OK"
End If
%>
Am sure it is due to the users set for DB acess on SQL.
In Enterprise, I see only dbo and dbadmin.
IIS is running as default (I think) with IUSR_Sysname as user for
"anonymous"
Would appreciate any help/tips for setup of a correct, read only access
method to db's
The default condition for SQL on SBS is that it is configured for Windows
Authentication only. Since SA is a SQL Login, this fails.
If the plan is to make use of domain user accounts, this is fine, but you
need to configure IIS to impersonate the domain users (ie not use IUSR_*)
*and* to add the domain users to SQL (SQL starts out with only
<domain>\Administrators having access). You need to change the Connection
String to request a Trusted Connection to SQL Server as well.
To configure IIS to impersonate users, either:
a) disable anonymous access in the website/virtual directory properties, or
b) use NTFS security on the underlying files and folders so that the
IUSR_* account doesn't have privileges.
To configure SQL Access for domain accounts, use Enterprise Manager to add
them as Logins, and then specify the database rights for the logins. I
would recommend you create domain groups that mirror the security levels
you wish to create, grant the groups SQL logins, and then place user
accounts in the relevant groups.
--
Steve Foster [SBS MVP]
---------------------------------------
MVPs do not work for Microsoft. Please reply only to the newsgroups.
- Follow-Ups:
- Re: ASP access to SQL Database
- From: Steve Foster [SBS MVP]
- Re: ASP access to SQL Database
- References:
- Re: ASP access to SQL Database
- From: Steve Foster [SBS MVP]
- Re: ASP access to SQL Database
- Prev by Date: Re: My Documents redirection error "%s's Documents"
- Next by Date: Re: cant view 2003 server
- Previous by thread: Re: ASP access to SQL Database
- Next by thread: Re: ASP access to SQL Database
- Index(es):
Relevant Pages
|
|