Loading SQLserver database with ASPNET user ID

G

Guest

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
 
J

Juan T. Llibre

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/
===================================
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top