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