Google Answers Logo
View Question
 
Q: ASP.Net ( No Answer,   1 Comment )
Question  
Subject: ASP.Net
Category: Computers > Programming
Asked by: gums-ga
List Price: $5.00
Posted: 15 Jun 2004 14:56 PDT
Expires: 15 Jul 2004 14:56 PDT
Question ID: 361569
I am trying to access a remote sql server from an ASP.Net application
using ADO.Net. I want to use trusted connection and so set the
connection string as

Dim strConn As String = Network
Library=DBMSSOCN;server=ServerName;database=DatabaseName;Trusted_Connection=true

Also in the web.config file I set 
<authentication mode="Windows" /> 
and <identity impersonate="true" />
settings.

In the IIS I set it to use Integrated Windows Authentication.

If I login to the machine that has the IIS and run the application of
the browser, I am able to access the sql server. How ever If I access
the page from a remote machine. I am getting this error.
System.Data.SqlClient.SqlException: Login failed for user '(null)'.
Reason: Not associated with a trusted SQL Server connection.

Hope this explanation is good enough for u guys to understand the
problem. Thanks in advance.

Request for Question Clarification by mathtalk-ga on 15 Jun 2004 15:47 PDT
Integrated Windows authentication means "use the Windows login" as the
basis for determining SQL Server permissions.  It appears that IIS is
correctly reporting that the connection is refused because there's no
login session in effect to provide this basis.

Are you asking for some suggested workarounds to this problem?

regards, mathtalk-ga

Clarification of Question by gums-ga on 16 Jun 2004 06:27 PDT
IIS is set to use integrated windows authentication. but the ASP.Net
part is not sending the login across to sql server. It is sending null
instead of domain\username across to sql server. If i login to the
computer in which IIS is running nad run the app from there, it is
working. Apparently it is some kind of security issue with ASP.Net. I
could not figure out what is it that i have to configure to get this
right. Hope this clarifies my quefstion more.
Answer  
There is no answer at this time.

Comments  
Subject: Re: ASP.Net
From: robfoulk-ga on 23 Jun 2004 19:17 PDT
 
What you're look at is a double hop issue. NTLM credentials can't be
passed from machine to machine. In this case from remote browser to
webserver and from webserver to SQL server. Unfortunately, there is no
perfect solution. You will have to either switch to basic
authentication thereby eliminating the NTLM credential going from
browser to IIS, OR switch from NTLM to kerberos authentication thus
allowing the the credential to be delegated from machine to machine. 
Good luck.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy