ASP.net application SQL Server Access Denied Help!

W

William Urban

Hello all, first time posting here and I am running into a pickle of a
problem. Here is the scenario. I have a Windows 2000 server running
IIS and an ASP.net C# application. The application talks to a MS SQL
server on the same box. I have the connection string:

myConnection = New System.Data.SqlClient.SqlConnection("user
id=sa;password =sa;Initial Catalog=Maintenance;Data Source=WebServer")

This works just fine on the machine and all is well. I have installed
SQL MSDE, and all the other things on a Windows XP box and have changed
the data source name to comply with that system name and everything
works. Now here is where the problem is.

I have yet 2 more systems and when I try to install the same thing and
change the connection string I get "SQL Server does not exist or access
is denied" So to get test the "does not exist" part I wrote a small
VB.net app that opens the database using the same connection string and
this works. So it must be the ASP part. I have added both ASP and
IIUsr to the database user group and given them dbo permissions and full
rights to check that but I still get the same issue. I have sql
auditing enabled but it doesn't seem to give me what account is trying
to log in. I also have it set for mixed authentication. So with all
this info, is there anything glaringly obvious that would be why it
works on 2 but not another 2? Are there any group policies I can check
that limit IISusr or Aspnet user? Thanks in advance,

-Will
 
S

Scott Allen

Hi Will:

There is nothing obviously wrong in your description. Since you are
specifying a user id and password, the ASPNET and IUSER_* account
settings should not have any effect. Have you stepped through the code
in a debugger to make sure the connection string at the time the
connection is opened is what you expect? Can you ping the DataServer
and make sure there is network connectivity?
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top