473,325 Members | 2,771 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,325 software developers and data experts.

client cannot access remote DB

Hi,

I'm completely stumped with an issue of authentication.

I have an ASP.net application which is supposed to retrieve data from a
remote database. It is supposed to access the database using the domain
credential of the user that is accessing the page.

When I access the aspx page from a client, it generates an error: "An error
has occured: Login failed for user '(null)'. Reason: Not associated with a
trusted SQL Server connection." When I access the aspx page on the IIS
server itself, the data is rendered correctly. The weird part is, after
opening the page on the IIS server, the client will be able to open the page
correctly for some time. I presume this has to do with application pooling
on the connection. After that, it goes back to the same old error until I
'open a channel' via the server again.

Tests have confirmed that local data access (putting a SQL server onto the
IIS server and retrieving data from there using the same settings as below)
poses absolutely no problem from either a client or the IIS server.

I have been testing with a domain user, whom is administrator on both the
client and the IIS server. I have no access to a domain admin account to do
esting.

Configuration:
IIS server: WS2003 SP1, IIS 6
DB server: SQL 2000 SP3
Client: XP SP2, IE 6 SP2

My current settings are:
1. Security on the virtual directory is set to Windows Integrated Security
only
2. web.config of the site has authentication mode="Windows" and indentity
impersonate="true"
3. The connectionstring in the aspx page uses integrated security=SSPI
4. The virtual directory has been set as an application, and the application
pool is set to DefaultAppPool
5. The identity of the DefaultAppPool is Network Service
6. machine.config processmodel user="SYSTEM"

Any help or insights is really appreciated.

Regards,
Roger.
question moved from microsoft.public.inetserver.asp.db to this newsgroup


Nov 19 '05 #1
2 1549
It is called the "double hop" issue with NTLM security.
Browser and IIS on the same computer, SQL on another = 1 hop, no problem.
Browser on one computer, IIS and SQL on the second = 1 hop, no problem.
Browser on one, IIS on second and SQL on third = 2 hops.
Test it with Basic Authentication rather than Windows Integrated and it
should work.
Do a Google on "double hop" +ASP.
"Roger" <rw******@optusnet.com.au> wrote in message
news:OH****************@TK2MSFTNGP12.phx.gbl...
Hi,

I'm completely stumped with an issue of authentication.

I have an ASP.net application which is supposed to retrieve data from a
remote database. It is supposed to access the database using the domain
credential of the user that is accessing the page.

When I access the aspx page from a client, it generates an error: "An
error has occured: Login failed for user '(null)'. Reason: Not associated
with a trusted SQL Server connection." When I access the aspx page on the
IIS server itself, the data is rendered correctly. The weird part is,
after opening the page on the IIS server, the client will be able to open
the page correctly for some time. I presume this has to do with
application pooling on the connection. After that, it goes back to the
same old error until I 'open a channel' via the server again.

Tests have confirmed that local data access (putting a SQL server onto the
IIS server and retrieving data from there using the same settings as
below) poses absolutely no problem from either a client or the IIS server.

I have been testing with a domain user, whom is administrator on both the
client and the IIS server. I have no access to a domain admin account to
do esting.

Configuration:
IIS server: WS2003 SP1, IIS 6
DB server: SQL 2000 SP3
Client: XP SP2, IE 6 SP2

My current settings are:
1. Security on the virtual directory is set to Windows Integrated Security
only
2. web.config of the site has authentication mode="Windows" and indentity
impersonate="true"
3. The connectionstring in the aspx page uses integrated security=SSPI
4. The virtual directory has been set as an application, and the
application pool is set to DefaultAppPool
5. The identity of the DefaultAppPool is Network Service
6. machine.config processmodel user="SYSTEM"

Any help or insights is really appreciated.

Regards,
Roger.
question moved from microsoft.public.inetserver.asp.db to this newsgroup



Nov 19 '05 #2
Roger wrote:
Hi,

I'm completely stumped with an issue of authentication.

I have an ASP.net application which is supposed to retrieve data from a
remote database. It is supposed to access the database using the domain
credential of the user that is accessing the page.

Hi Roger,

Does this article help?:

http://www.msdn.microsoft.com/msdnma...s/default.aspx

(Apologies if this doesn't display right - you may need to reassmeble
the link)

Damien

Nov 19 '05 #3

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

Similar topics

7
by: Ken Allen | last post by:
I have a .net client/server application using remoting, and I cannot get the custom exception class to pass from the server to the client. The custom exception is derived from ApplicationException...
12
by: Anil Krishnamurthy | last post by:
We have an ASP.NET application that uses COM objects through Interop. The web application requires access to network and database resources and hence, needs to impersonate a domain account. The...
5
by: Daniel Corbett | last post by:
I am trying to save a file dynamically created in a webpage. I get the following headers, but cannot figure out how to save the attachment. I am basically trying to replicate what internet...
6
by: Sarah | last post by:
I have an old Lantastic 8.0 DOS based server and clients are able to login to this system through network booting (i.e. they are disk-less PC's). Is it possible to create a VB.Net program that can...
1
by: Roger Hembury | last post by:
Hi All, Hope you can help / point me in the right direction with a little problem. I have a VB6 created active X dll which is downloaded to the client using <object> </object> so that I can...
3
by: Hemant Shah | last post by:
Folks, I have an AIX system running DB2 7.2 ESE (or EE or what ever it was called at that time) and and HP-UX running UDB 7.2 also. The database resides on HP-UX system and on AIX it is setup as...
10
by: subhadip | last post by:
Hi, I want to generate New mail alert for any mail client at client side . I want to check if any new mail has arrived in my inbox or not . the mail client be anything . I want to do this for...
1
by: DR | last post by:
What ports do i need to unblock on client and server (running msvsmon.exe) to debug remotely from my client box with visual studio 2005 pro? When I attach to remote process a connection shows up...
3
by: Prakash | last post by:
Hello All, We have installed UDB 9.5 on HP-UX IA64 machine. We would like to install DB2 8.2 client on HP-UX PA-RISC V11.11. We want to install only on HPUX V 11.11 since we have licensed...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.