Wednesday, March 28, 2012

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

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 ?
Which connection string are you using to connect to the database, I
guess you are using SQL Server authentication which isn=B4t 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
|||Which connection string are you using to connect to the database, I
guess you are using SQL Server authentication which isn=B4t 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
|||Hi
How do you set up your database? A Windows Authenication or Mixed?
<CLarkou@.gmail.com> wrote in message
news:1142862649.046140.21050@.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 ?
>
|||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" />
|||Hi, I set it as "Integrated Security=True"
|||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
|||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
<CLarkou@.gmail.com> wrote in message
news:1142867073.546213.317310@.t31g2000cwb.googlegr oups.com...
> Hi, I set it as "Integrated Security=True"
>
|||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 ?
|||The server authentication is "Windows Authentication Mode".

No comments:

Post a Comment