469,646 Members | 1,322 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,646 developers. It's quick & easy.

Loading SQLserver database with ASPNET user ID

How to configure the IIS, ASPNET userID, Windows or SQL Authentiation, std or
integrated security for SQLserver database?

The VS.net 2002 web server and SQL Server client are at the same PC, while
the SQL Server database is at another PC. The dataset and DataGrid were
created successfully. However, when trying to run a Web Form with a table, a
server error msg: Login failed for user '(null)'. Reason: Not associated
with a trusted SQL Server connection, popped up.

I tried to create a login/user, computername/ASPNET, for the database and
table. An error msg popped up: Error 15401: Windows NT user or group
'ComputerName\ASPNET' not found.

How do I solve this ASPNET userID and SQLserver Security problem?

TIA,
Jeffrey
Mar 29 '07 #1
2 3614
re:
How do I solve this ASPNET userID and SQLserver Security problem?
Use mixed authentication in SQL Server ( both SQL Server *and* Windows ).
That will allow you to bypass Windows authentication.

What you will need to do is create a SQL Server user
for your database, which is not a windows account.

Then, use a connection string like this one :

Data Source=111.111.111.111;Initial Catalog=Yourdb;User Id=yourUser;Password=pwd;

This assumes you're not using SQL Server 2005,
but are using SQL 7, 2000 or MSDE.

If you're using SQL Server 2005 or Express, see the connections strings at:
http://www.connectionstrings.com/?carrier=sqlserver2005


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Jeffrey" <cj*******@gmail.comwrote in message
news:F7**********************************@microsof t.com...
How to configure the IIS, ASPNET userID, Windows or SQL Authentiation, std or
integrated security for SQLserver database?

The VS.net 2002 web server and SQL Server client are at the same PC, while
the SQL Server database is at another PC. The dataset and DataGrid were
created successfully. However, when trying to run a Web Form with a table, a
server error msg: Login failed for user '(null)'. Reason: Not associated
with a trusted SQL Server connection, popped up.

I tried to create a login/user, computername/ASPNET, for the database and
table. An error msg popped up: Error 15401: Windows NT user or group
'ComputerName\ASPNET' not found.

How do I solve this ASPNET userID and SQLserver Security problem?

TIA,
Jeffrey


Mar 29 '07 #2
Thanks. I have tried to do what you have suggestted. However, after clicked
a 'new connection' from the SqlDataAdapter properties, I failed to create the
std connection string. On the Data Link Properties desktop, after typed the
userID and pwd, I clicked the database arrow and immediately the error msg
popped up.

I think I have to code the connection string by opening the code editor.
Any suggestion on how to change the Integrated connection string to std
connection string? Will try again tommorrow.

TIA,
Jeffrey

"Juan T. Llibre" wrote:
re:
How do I solve this ASPNET userID and SQLserver Security problem?

Use mixed authentication in SQL Server ( both SQL Server *and* Windows ).
That will allow you to bypass Windows authentication.

What you will need to do is create a SQL Server user
for your database, which is not a windows account.

Then, use a connection string like this one :

Data Source=111.111.111.111;Initial Catalog=Yourdb;User Id=yourUser;Password=pwd;

This assumes you're not using SQL Server 2005,
but are using SQL 7, 2000 or MSDE.

If you're using SQL Server 2005 or Express, see the connections strings at:
http://www.connectionstrings.com/?carrier=sqlserver2005


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Jeffrey" <cj*******@gmail.comwrote in message
news:F7**********************************@microsof t.com...
How to configure the IIS, ASPNET userID, Windows or SQL Authentiation, std or
integrated security for SQLserver database?

The VS.net 2002 web server and SQL Server client are at the same PC, while
the SQL Server database is at another PC. The dataset and DataGrid were
created successfully. However, when trying to run a Web Form with a table, a
server error msg: Login failed for user '(null)'. Reason: Not associated
with a trusted SQL Server connection, popped up.

I tried to create a login/user, computername/ASPNET, for the database and
table. An error msg popped up: Error 15401: Windows NT user or group
'ComputerName\ASPNET' not found.

How do I solve this ASPNET userID and SQLserver Security problem?

TIA,
Jeffrey

Mar 29 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Garyrek | last post: by
6 posts views Thread by A | last post: by
11 posts views Thread by Patrick | last post: by
reply views Thread by =?Utf-8?B?SmVmZnJleQ==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.