Sql connection problem in ASP.NET in Windows 2003

  • Thread starter Thread starter Shawn Zheng
  • Start date Start date
S

Shawn Zheng

I have not resolved a problem about connecting to SQL 2000 database in
Windows 2003. Here is what happened and connection string is
1. Connection strings that I have tried are "Initial Catalog=<database
naem>;Data Source=(local); Integrated Security=SSPI;user id=sa;" and
"Initial Catalog=<database naem>;Data Source=(local); " the first one works
in Winodws XP. Both are not work in Winodws 2003.
2. I have added ASPNET login name to the SQL Security.
3. I have added ASPNET user account to the database that I works.
4. Grand permistions to ASPNET account.
When run the ASP.NET Web application, the connection is rejected.
It works for windows form.

What can solve it?

Shawn
 
Hi Shawn,

Since you have ASP.net as a user in SQL and it looks as if you are using the
local server you can try:

"Data Source=(local);Initial Catalog=<database name goes here - e.g.
pubs>;Integrated Security=SSPI;"

in the string below you are trying to use integrated Security with a
username (sa). If this does not help reply to this post with some sample
code.

I hope this helps.
-------------------------------
 

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

Back
Top