|
#1
|
|||
|
|||
|
I have made a small ASP.NET application accessing Northwind database in SQL Server on a DIFFERENT computer than the one where IIS is. During development of this application, i gave the valid username and password in process of defining SQLConnection datacontrol, i even tested the connection which was perfect. When i run my application, it says invalid "login failed for user username". what should i do? for sure, username and password are perfectly right for the database.
|
|
#2
|
|||
|
|||
|
If you use windows login this is how the connection string should be
"server=localhost;database=Northwind;Integrated Security = SSPI" If you use SQL Server login "server=localhost;database=Northwind;uid=sa;password=sa" Since your sql server is on a different machine , where both the machines are on the same domain, and you are using windows authentication, your windows user account should be added to the sql servers users with adequate permissions, Also while defining the SQLConnection if you specified a user name try specifying domain\username in case of windows
__________________
Sri |
|
#3
|
||||
|
||||
|
What level of authentication is your ASP.NET application using? Are you attempting to use a trusted connection with SQL Server?
__________________
Paul ~~~~ Microsoft MVP (Visual Basic) |
|
#4
|
|||
|
|||
|
Quote:
|
|
#5
|
||||
|
||||
|
You can set up your web application (using Internet Services Manager) for different levels of authentication, such as Anonymous, Basic, Integrated NT, etc). I'm trying to figure out which level your ASP.NET is configured for.
Also, since you're specifying a user ID and password in your connection string it doesn't appear as if you're using a trusted connection (which essentially involves automatically using the identity of the Windows authenticated user).
__________________
Paul ~~~~ Microsoft MVP (Visual Basic) |
|
#6
|
|||
|
|||
|
it worked now. the problem was in connectionstring property, password was not there. infact, i mentioned user name and password both during setting up my dataadapter. but afterwards, in properties box, i saw it was missing!!
can u suggest me some resources to study on different levels of authentication in detail? |
|
#7
|
||||
|
||||
|
The following should help:
IIS 5.0: http://www.microsoft.com/technet/pro...tion_modes.asp IIS 6.0: http://www.microsoft.com/technet/pro...c7caf61ad.mspx
__________________
Paul ~~~~ Microsoft MVP (Visual Basic) |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Movingfrom Ms Access 97 to MS SQL Server 97 | omar | Database | 1 | 03-13-2002 10:40 AM |
| Help converting ACCESS sql to SQL Server | Ted Young | Database | 4 | 08-07-2001 10:48 AM |
| SQL Server Agent wont auto start | David Hay | Database | 2 | 04-02-2001 07:11 PM |
| Problems after converting Access DB to SQL Server DB | Marie | Database | 0 | 11-20-2000 05:37 AM |
| Remove exchange from a site | andriano | Enterprise | 1 | 10-02-2000 03:54 PM |