SQL server authentication error

G

Guest

I continously get "SQL server does not exist or access denied error" when
trying to access SQL server from a web page (aspx) using windows
authentication.
I use the following connection string:

cn = New SqlConnection("integrated security=SSPI;persist security
info=False;data Source=StageServer;initial catalog=StageDatabase;")

I am login in with a admin account that has access to the SQL server as
well. Also checked the service account and that too has the permission to the
database.

If anyone can please help what can be the cause of this problem as the SQL
authentication is working ok.

Thanks
 
M

Marina Levit [MVP]

Integrated security has to do with the process that is running. ASP.NET is
what is trying to connect. So the question is, what is ASP.NET running
under? And it's not as you. It is running as the ASPNET account, or
NetworkService account if you are on 2003. These are the default settings.
You would have to change it so that ASP.NET runs under your account if you
want it to connect as you.

So right now you can do that, or give the ASPNET user (or whatever user it
is running under now) privleges to the SQL Server.

If you search google groups you will find dozens of postings with people
with the same exact problem. You could have saved yourself a post.
 

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,968
Messages
2,570,152
Members
46,698
Latest member
LydiaHalle

Latest Threads

Top