My server configuration are
. SQL Server in Marchine1 - is setting in Mix Mode(SQL Server and Windows Authentication)
. IIS Server in Marchine2 - is setting as following
Directory Security - > Authentication and access control
.Unchecked "Enable anonymous access"
.Checked "Intergrated Windows authentication"
.Checked "Disest authentication for Windos domain servers"
.Checked "Basic authentication(password is sent in clear text)"

Both of these server is in DOMAIN controler.


I use the configuration setting as bettow in my ASP pages
xConn.Open "Provider=SQLOLEDB; Data Source=XSERVER;Initial Catalog=INTRANET;User Id=admin_intranet; Password=xxx;"

I got the following error:
Microsoft OLE DB Provider for SQL Server error '80004005'
Login failed for user 'admin_intranet'. Reason: Not associated with a trusted SQL Server connection.

and when I used
xConn.Open "Provider=SQLOLEDB; Data Source=XSERVER;Initial Catalog=INTRANET;User Id=admin_intranet; Password=xxx;Trusted_Connection=yes"

I got the error:
Microsoft OLE DB Provider for SQL Server error '80004005'
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.


Previously, the connection is running well, mean no error as describe above. It just happen yesterday and now no connection from ASP page to SQL Server can establish from any client who access to ASP page(have SQL Connection as above) on that IIS Server but if I run that ASP page(have SQL Connection as describe) on IIS Server it self, there is no error, connection can be established.

Through ASP.NET, in same IIS Server, the connection to that SQL Server with connection string <add key="CONSTR" value ="Data Source=SQL-SERVER;Initial Catalog=INTRANET;User ID=admin_intranet;Password=xxx"/> can established with no error.


I don't know how to solve this problem or how to track where the problem occur?.

Best regards,

Veasna

My server configuration are
. SQL Server in Marchine1 - is setting in Mix Mode(SQL Server and Windows Authentication)
. IIS Server in Marchine2 - is setting as following
Directory Security - > Authentication and access control
.Unchecked "Enable anonymous access"
.Checked "Intergrated Windows authentication"
.Checked "Disest authentication for Windos domain servers"
.Checked "Basic authentication(password is sent in clear text)"

Both of these server is in DOMAIN controler.


I use the configuration setting as bettow in my ASP pages
xConn.Open "Provider=SQLOLEDB; Data Source=XSERVER;Initial Catalog=INTRANET;User Id=admin_intranet; Password=xxx;"

I got the following error:
Microsoft OLE DB Provider for SQL Server error '80004005'
Login failed for user 'admin_intranet'. Reason: Not associated with a trusted SQL Server connection.

and when I used
xConn.Open "Provider=SQLOLEDB; Data Source=XSERVER;Initial Catalog=INTRANET;User Id=admin_intranet; Password=xxx;Trusted_Connection=yes"

I got the error:
Microsoft OLE DB Provider for SQL Server error '80004005'
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.


Previously, the connection is running well, mean no error as describe above. It just happen yesterday and now no connection from ASP page to SQL Server can establish from any client who access to ASP page(have SQL Connection as above) on that IIS Server but if I run that ASP page(have SQL Connection as describe) on IIS Server it self, there is no error, connection can be established.

Through ASP.NET, in same IIS Server, the connection to that SQL Server with connection string <add key="CONSTR" value ="Data Source=SQL-SERVER;Initial Catalog=INTRANET;User ID=admin_intranet;Password=xxx"/> can established with no error.


I don't know how to solve this problem or how to track where the problem occur?.

Best regards,

Veasna

First of all, the IIS settings are irrelevant, since you are not trying to connect to IIS but to SQL Server.

If you try to connect with SQL Server login name and password:

xConn.Open "Provider=SQLOLEDB; Data Source=XSERVER;Initial Catalog=INTRANET;User Id=admin_intranet; Password=xxx;"

you only have to make sure that the login name and password are correct.
notice that admin_intranet should be the Login name, not the database user name.

Regarding trusted connection - In that case you don't have to mention the user name and password at all. what you do have to do in that case is to define the current IIS user (usually its name begins with UISR_) to have a login in the SQL server machine.

This article has been dead for over six months. Start a new discussion instead.