By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,118 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

Accessing data from remote SQL Server.

P: n/a
Hi,

My development machine is running Win XP SP2 and IIS. I'm developing an
ASP.NET application on this machine that accesses data from a SQL Server
database on another machine.

That machine that contains the SQL Server runs Win 2003 and is the primary
controller for our domain.

When I connect I receive the error "Login failed for user '(null)'. Reason:
Not associated with a trusted SQL Server connection."

My connection string is ""integrated security=SSPI;data
source=SDI-SERVER01;persist security info=False;initial catalog=Contacts"

In IIS, I have anonymous access checked and Integrated Windows Security set.

In SQL Server, I have included the ASPNET account as a login, and also as a
user within the database I'm accessing.

This problem seems to have been encountered plenty of times, and there are
quite a few solutions (eg impersonation, sql server authentication, etc), but
I'd like to find out why the error is occurring.

Am I right in saying that the problem is happening because the local ASPNET
account credentials are being passed through and they are not seen as being
the same as the credentials for the ASPNET account on the server?

If someone could help my understanding or point me in the direction of some
info, that would be great.

Thanks,
David.
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi David:

By default the ASPNET account password is generated per machine, so
the ASPNET password on your local machine does not match the password
for the ASPNET account on the remote machine. You can explicitly set a
matching ASPNET password on both computers and it should work (don't
forget to set the ASPNET password in the processModel element of
machine.config too).

--
Scott
http://www.OdeToCode.com

On Thu, 9 Sep 2004 23:45:02 -0700, DavidR
<Da****@discussions.microsoft.com> wrote:
Hi,

My development machine is running Win XP SP2 and IIS. I'm developing an
ASP.NET application on this machine that accesses data from a SQL Server
database on another machine.

That machine that contains the SQL Server runs Win 2003 and is the primary
controller for our domain.

When I connect I receive the error "Login failed for user '(null)'. Reason:
Not associated with a trusted SQL Server connection."

My connection string is ""integrated security=SSPI;data
source=SDI-SERVER01;persist security info=False;initial catalog=Contacts"

In IIS, I have anonymous access checked and Integrated Windows Security set.

In SQL Server, I have included the ASPNET account as a login, and also as a
user within the database I'm accessing.

This problem seems to have been encountered plenty of times, and there are
quite a few solutions (eg impersonation, sql server authentication, etc), but
I'd like to find out why the error is occurring.

Am I right in saying that the problem is happening because the local ASPNET
account credentials are being passed through and they are not seen as being
the same as the credentials for the ASPNET account on the server?

If someone could help my understanding or point me in the direction of some
info, that would be great.

Thanks,
David.


Nov 18 '05 #2

P: n/a
Thanks Scott.

"Scott Allen" wrote:
Hi David:

By default the ASPNET account password is generated per machine, so
the ASPNET password on your local machine does not match the password
for the ASPNET account on the remote machine. You can explicitly set a
matching ASPNET password on both computers and it should work (don't
forget to set the ASPNET password in the processModel element of
machine.config too).

--
Scott
http://www.OdeToCode.com

On Thu, 9 Sep 2004 23:45:02 -0700, DavidR
<Da****@discussions.microsoft.com> wrote:
Hi,

My development machine is running Win XP SP2 and IIS. I'm developing an
ASP.NET application on this machine that accesses data from a SQL Server
database on another machine.

That machine that contains the SQL Server runs Win 2003 and is the primary
controller for our domain.

When I connect I receive the error "Login failed for user '(null)'. Reason:
Not associated with a trusted SQL Server connection."

My connection string is ""integrated security=SSPI;data
source=SDI-SERVER01;persist security info=False;initial catalog=Contacts"

In IIS, I have anonymous access checked and Integrated Windows Security set.

In SQL Server, I have included the ASPNET account as a login, and also as a
user within the database I'm accessing.

This problem seems to have been encountered plenty of times, and there are
quite a few solutions (eg impersonation, sql server authentication, etc), but
I'd like to find out why the error is occurring.

Am I right in saying that the problem is happening because the local ASPNET
account credentials are being passed through and they are not seen as being
the same as the credentials for the ASPNET account on the server?

If someone could help my understanding or point me in the direction of some
info, that would be great.

Thanks,
David.


Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.