473,394 Members | 1,840 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,394 software developers and data experts.

Accessing data from remote SQL Server.

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
2 1413
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jaydeep | last post by:
Hello, I am facing a strange problem. Problem accessing remote database from ASP using COM+ server application having VB components (ActiveX DLL) installed. Tier 1 : ASP front End (IIS 5.0) Tire...
2
by: Douglas Harber | last post by:
If I have DB2 8.1 (FP5, I believe, but not relevant to my question...I hope) installed on my desktop, do I have what I need to connect to a remote DB2 server (also running 8.1 FP5) from my desktop...
3
by: prodirect | last post by:
Hi all, I hope someone can help me. I've recently created a database and wanted to put it up on an ftp sight so that multiple people could access the same tables at the same time from different...
2
by: Jon L. Lovesky | last post by:
Hello all, I am attempting to access a remote folder from an asp.net application (all within the same domain). The application is configured for windows authentication in IIS and the asp.net...
2
by: Jeff | last post by:
Hi - I have an ASP.NET web page accessing a SQL database. It works fine on the web, and I'm trying to get it to also work in debug mode in the IDE. The "on the web" page and my SQL database...
3
by: Fredric Ragnar | last post by:
Hi, I am making a prototype system with Remoting in the bottom of the system. An XML Web Service is using the remote object on an IIS to present data. I am using a TcpChannel for communicating...
5
by: Mike | last post by:
I'm having trouble accessing SQL2005 Standard Edition as a second instance of SQL Server where the first instance is SQL 2000 Enterprise Edition. I installed SQL 2005 as a named instance...
4
by: Noy B | last post by:
Hi, I have developed a small application that is using a MSAccess DB. the problem is that it was developed on a machine where the application and the DB are both located. now it needs to be...
8
by: John | last post by:
Hi We had an sbs 2003 with isa 2000 server. We wre able to access a remote sql server (hosted at our web host) just fine. We replaced the server with a new sbs 2003 r2 with isa 2004 server and...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.