Sql Server Connection Error On Framework 1.1

  • Thread starter Thread starter Gaurav
  • Start date Start date
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.
 
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.
 
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.
 
Back
Top