Sql Server Connection Error On Framework 1.1

G

Gaurav

i m using SqlClient Name space for sql server connection.
We intialize a sql server connection object for
connecting sql server 2000

after run the page Error occured

"Login Failed On PRINCE/ASPNET,unauthorize error"

Where PRINCE is my machine name.
i m using
<------------------------------->
Dim ConString As String = "Integrated
Security=SSPI;Persist Security Info=False;User
ID=sa;Initial Catalog=pubs;Data Source=PRINCE"
Dim MyConnection As SqlConnection = New SqlConnection
(ConString)
<-------------------------------->
This code generate error
<-------------------------------->
Login failed for user 'PRINCE\ASPNET'
<-------------------------------->
please give me sugesstion for this help.
 
M

MikeP

Integrated Security=SSPI
User ID=sa

These two items are mutually exclusive. You are either using Integerated
security or an SQL login. Try dropping the Integrated Security and adding
"password=<sa password>" to the command line.
 
M

Miha Markic

Hi,

In addition to MikeP's comment.
You should really use sql security within aspnet app.
Either that or run the aspnet app under some user account.
 

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