473,770 Members | 1,787 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="tr ue"
3. The connectionstrin g 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.publi c.inetserver.as p.db to this newsgroup


Nov 19 '05 #1
2 1571
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******@optus net.com.au> wrote in message
news:OH******** ********@TK2MSF TNGP12.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="tr ue"
3. The connectionstrin g 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.publi c.inetserver.as p.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
4754
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 and is defined in an assembly common to the client and server components. The custom class merely defines three (3) constructors -- the null constructor; one with a string parameter; and one with a string and innner exception parameter -- that...
12
2577
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 problem is that even when it is configured to run under a certain identity through Web.config, the impersonation is not carried through to COM library. Consequently, the code in COM object runs under a local account and any code that needs to access...
5
3068
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 explorer would do in this case. The headers I am getting are: Headers {Content-Disposition: attachment; filename="dynamic_file.mdb" Connection: close Cache-Control: private Content-Type: application/octet-stream
6
2749
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 emulate a network remote boot client? Any ideas at all would be appreciated. Thanks.
1
1495
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 control / use MS Word to create letters using data extracted from an Access database which resides on a webserver. The problem I am having is that I cannot connect to the access database on the web server.
3
1370
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 remote database. For several reasons I cannot upgrade AIX system to 8.2, but I would like to move the database from HP-UX running 7.2 to another AIX system running UDB 8.2. If I move the database to AIX running 8.2 and re-define the database on...
10
2028
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 those mails which don't give any desktop alert when new mail arrievs . i will login to my e-mail and then activate the javascript . it will periodically retrieve the text contents of my inbox and refresh the page , store it in a
1
2535
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 in msvsmon.exe on the remote machine, however, the client box with visual studio displays error: "Unable to connect to the mricosoft visual studio remtoe debugging monitor named 'the box name' the micorosft visual studio remote debugging monitor...
3
2810
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 version MF Cobol on this. My question is: Can DB2 8.2 client talk to DB2 server 9.5? Please let me know asap.
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10257
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10099
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8931
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.