Config SSPI

G

Guest

Hi,

I have problems connecting to SQL server using SSPI. I have a connection
string like
SqlConnection("server=[servername];database=pubs;Integrated Security=SSPI")

I get this error msg: Login failed for [servername\ASPNET].
Is ASPNET a user?, and where do I define it ? I have tried Config .Net
framwork but i do not really understand the logical connection between ASPNET
user, the framework and the general security policy at the server.. Could
anybody give me an example or something..
 
G

Guest

Marius;

What are you using to connect with SQL Server? Sound like you are using a
..NET application or web page. computername\ASPNET is an account that is set
up when you install the framework to allow the aspnet_wp worker process to
access your computer. When you run a .NET app, the app (by default) accesses
the computer as computername\ASPNET. By design, this acocunt is a member of
"Users" and has hardly any privileges.

So, you need to narrow things down:

1) Try to connect with the SQL SERVER instance using query manager and the
exact same connection parameters. If you fail, you have a much more limited
set of things to look into.

2) Try "server=(local)...", if indeed it is on the local machine.

No sense in looking further until you can do one of the above.

If you have a .NET app, then you may want to turn impersonation on, which
will tell the framework to use the current user's credentials instead of the
aspnet_wp's default credentials: "computername\ASPNET."

David
 

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