data portal exception. ASP.NET account security issue?

data portal exception. ASP.NET account security issue?

Old forum URL: forums.lhotka.net/forums/t/3266.aspx


CMoreno posted on Wednesday, July 25, 2007

Hello,

 

Currently we are trying to set up our web portal. We already have created our windows application which is working great on csla. However we are experiencing some issues with the web portal. After the attempt of login in, the data portal throws this exception:

 

DataPortal.Fetch failed (System.Data.SqlClient.SqlException: Login failed for user ''. The user is not associated with a trusted SQL Server connection.

 

Line: result = proxy.Fetch(objectType, criteria, dpContext);

 

 

It seems that there is a problem with the connection with the database even though we are using the same connection string that we use for the windows application and the windows application does not have any problem connecting to the database. The connection string is as follows:

 

connectionString="Data Source=192.168.0.5;Initial Catalog=XE700-Development;Integrated Security=SSPI;" name="XE700" providerName="System.Data.SqlClient"

 

It is a local dataportal; however sql server is hosted on a Windows server 2003.

We are using custom membership  with an identity and principal.

In addition we are using asp’s forms authentication.

Does this have anything to do with the ASP.NET account? But as far as I know to log into the database it is using windows integrated security.

I will appreciate any sugestion.

Thank you,

 

XE Corp.

 

JoeFallon1 replied on Thursday, July 26, 2007

Isn't this an example of the "double hop" issue?

When you use Windows security the Identity is passed to the We server, but the Web server won't pass it to the SQL Server as that would be a second hop.

Integrated Security=SSPI;

You can use Google for more info and potential solutions.

One idea is to use a single UID for the DB (a general Application user) and then encrypt the connection string.

This has lots of benefits (like solving your problem) and using thread pooling.

Joe

 

 

Copyright (c) Marimer LLC