473,396 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Login failed for user ''. The user is not associated with a trusted SQL Server connection.

My machine has Win XP and IIS 5.1.

I installed Visual Studio 2005 without SQL Express 2005. SQL Server
2005 is installed on another machine with Win 2003.

I created a Web Site in .NET VB. I created a connection with my SQL
server database, I can retrieve/ change data in SERVER EXPLORER. When I
try to create a gridview with data fron one table and to run the web
page in Internet Explorer I receive the following error.

Login failed for user ''. The user is not associated with a trusted SQL
Server connection.

Can you please help me ?

Mar 20 '06 #1
14 26286
Which connection string are you using to connect to the database, I
guess you are using SQL Server authentication which isn´t setup
properly on your computer.

So switch to mixed authentication, or use a Windows account to connect
to the database-

HTH, Jens Suessmeyer.

---
http://www.sqlserver2005.de
---

Mar 20 '06 #2
Which connection string are you using to connect to the database, I
guess you are using SQL Server authentication which isn´t setup
properly on your computer.

So switch to mixed authentication, or use a Windows account to connect
to the database-

HTH, Jens Suessmeyer.

---
http://www.sqlserver2005.de
---

Mar 20 '06 #3
Hi
How do you set up your database? A Windows Authenication or Mixed?

<CL*****@gmail.com> wrote in message
news:11*********************@z34g2000cwc.googlegro ups.com...
My machine has Win XP and IIS 5.1.

I installed Visual Studio 2005 without SQL Express 2005. SQL Server
2005 is installed on another machine with Win 2003.

I created a Web Site in .NET VB. I created a connection with my SQL
server database, I can retrieve/ change data in SERVER EXPLORER. When I
try to create a gridview with data fron one table and to run the web
page in Internet Explorer I receive the following error.

Login failed for user ''. The user is not associated with a trusted SQL
Server connection.

Can you please help me ?

Mar 20 '06 #4
I am using the following:

<remove name="LocalSqlServer" />
<add name="SubDispConnectionString1" connectionString="Data
Source=CYNICSQL1;Initial Catalog=SubDisp;Integrated Security=True"
providerName="System.Data.SqlClient" />

Mar 20 '06 #5
Hi, I set it as "Integrated Security=True"

Mar 20 '06 #6
No, this is just the connection string, not themode SQL Server is set
to. The one (COnnectionString) is the client, the authentication mode
(mixed) is the server side.
HTH, Jens Suessmeyer.
---
http://www.sqlserver2005.de
---

Mar 20 '06 #7
The reason people keep asking about authentication modes is that this error
message usually means you are trying to connect with a SQL Server login to a
SQL Server instance that only supports Windows authentication. It sounds
like this is not your issue because you are connecting with Integrated
Security and not supplying a user name or password. The other possible
cause is that the Windows user has no right to authenticate a Windows
connection on the server where SQL Server is running. This can be a "double
hop" error if you are using Windows authentication on the Web site. It
could also be a case that ASPUSER has no rights to connect to the SQL Server
machine.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

<CL*****@gmail.com> wrote in message
news:11**********************@t31g2000cwb.googlegr oups.com...
Hi, I set it as "Integrated Security=True"

Mar 20 '06 #8
I tried creating a website with FILE SYSTEM, not HTTP, and I was able
to open the web page in IE with SQL server data. ASPUSER is used for
connecting to the SQL SERVER machine with FILE SYSTEM web site ?

Mar 21 '06 #9
The server authentication is "Windows Authentication Mode".

Mar 21 '06 #10
Keep in mind that if the SQL Server is NOT on the same box as the IIS,
you have to setup delegation of the security accounts that this works.
Otherwise the SQL Server can´t check if your User is *really* the
original one.

HTH, Jens Suessmeyer.

Mar 21 '06 #11
Apologies for my questions/answers.The security accounts should be set
on SQL SErver machine or on IIS ?

Mar 21 '06 #12
I assume when you used filesystem, you had IE running on the same box as the
web server so there was just a single hop for authentication and thus
delegation was not needed. I also assume filesystem runs with your
credentials - not ASPUSER but I'm not an expert on ASP.Net. Your problem
could be either ASPUSER not having permissions or delegation. The easiest
solution for either one is to setup a SQL Server authenticated login and try
connecting by putting the user name and password in the connection string.
If that works you at least know what the problem is and can try to address
it.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

<CL*****@gmail.com> wrote in message
news:11*********************@e56g2000cwe.googlegro ups.com...
I tried creating a website with FILE SYSTEM, not HTTP, and I was able
to open the web page in IE with SQL server data. ASPUSER is used for
connecting to the SQL SERVER machine with FILE SYSTEM web site ?

Mar 21 '06 #13
I get this problem starting up the App.
It isn't even carrying out the connection the SQL.
I have had a go at tracking the problem, and if I remove the lines below in
my WEB.CONFIG then it starts up OK

<appSettings>
<add key="ConnectionString1"
value="server=myserver;uid=myuserid;pwd=mypassword ;database=mydb"/>
</appSettings>

The cause is if you put these lines in the wrong place.
Ensure that <appsettings> is not inside another block.
cheers
Simon

"CL*****@gmail.com" wrote:
My machine has Win XP and IIS 5.1.

I installed Visual Studio 2005 without SQL Express 2005. SQL Server
2005 is installed on another machine with Win 2003.

I created a Web Site in .NET VB. I created a connection with my SQL
server database, I can retrieve/ change data in SERVER EXPLORER. When I
try to create a gridview with data fron one table and to run the web
page in Internet Explorer I receive the following error.

Login failed for user ''. The user is not associated with a trusted SQL
Server connection.
Can you please help me ?


Mar 31 '06 #14
You're supplying a user name and password which makes this a SQL Server user
login. The error you're getting says you are trying to log in with a SQL
login to a SQL Server that only support Windows authentication.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"SimonW" <Si****@discussions.microsoft.com> wrote in message
news:DE**********************************@microsof t.com...
I get this problem starting up the App.
It isn't even carrying out the connection the SQL.
I have had a go at tracking the problem, and if I remove the lines below
in
my WEB.CONFIG then it starts up OK

<appSettings>
<add key="ConnectionString1"
value="server=myserver;uid=myuserid;pwd=mypassword ;database=mydb"/>
</appSettings>

The cause is if you put these lines in the wrong place.
Ensure that <appsettings> is not inside another block.
cheers
Simon

"CL*****@gmail.com" wrote:
My machine has Win XP and IIS 5.1.

I installed Visual Studio 2005 without SQL Express 2005. SQL Server
2005 is installed on another machine with Win 2003.

I created a Web Site in .NET VB. I created a connection with my SQL
server database, I can retrieve/ change data in SERVER EXPLORER. When I
try to create a gridview with data fron one table and to run the web
page in Internet Explorer I receive the following error.

Login failed for user ''. The user is not associated with a trusted SQL
Server connection.
Can you please help me ?

Mar 31 '06 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: TBone | last post by:
Anyone, I have a user "john" whose machine is part of the "job" domain. He is trying to establish an odbc connection to an MS SQL 2000 server on the "school" domain. He uses Windows...
1
by: Mark | last post by:
We are using impersonation so that a user on our domain will login into our SQL Server using their own domain login and/or associated domain groups. To do this, we've added: <authentication...
2
by: Frederik | last post by:
Hi, First sorry for my english I'm french. I developped a web app that work good under XPDEVSERVER machine (iis5) and SqlServerDevelopper Edition. I get problem when I moved this app to an...
4
by: rrober07 | last post by:
Hello, My Setup is I have a Web Server machine(Devweb01), Database SQL Machine(Devsql01), a Client Machine(local machine) I have configured the SQL machine as follows: 1) Added local Aspnet...
3
by: Maellic | last post by:
Hi, The website I am working on is built with ASP.NET and connects to a SQL Server 2000 database. The web server and database are on the same machine. I have recently tried to modify the timeout...
1
by: jerminator | last post by:
Ok I need some help. Up until Tuesday my application was working fine. It is an asp.net application written in VB. It is very data heavy and makes multiple calls to a database. The application...
0
by: Dennis | last post by:
I am working on an ASP.NET 2.0 site. It runs fine on my local PC. When I deploy it to the server I get this error: Login failed for user ''. The user is not associated with a trusted SQL Server...
5
by: CFTK | last post by:
we´re having problems to put our Website at IIS: We have achieved it all works using the connectionString with user and password of the superuser (sa), but with IntegratedSecurity we get the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.