PDA

Click to See Complete Forum and Search --> : ASP.NET, Sql Server and different accounts


Mike Hildner
Jan 13th, 2005, 05:27 PM
I've got a couple ASP.NET apps that access a Sql Server DB. On my development machine, named MIKELAP, I use Windows authentication and the name of the user is MIKELAP\ASPNET. That makes sense to me.

I move this app to a different machine, named ADCWEBSERVER, which is a member or the ADC domain. Now to the DB, the user appears as ADC\ADCWEBSERVER$. That I don't understand.

Another app, this one a web service. On my machine it's MIKELAP\ASPNET. Running still on my machine, just pointing to a different DB, the user appears as null.

I'm determining the account that the DB wants to see by looking at the error page, which says Login failed for user... - pretty much the SqlException.Message property.

Anyone know why an ASP.NET application assumes different user names?

Thanks,
Mike

Mike Hildner
Jan 14th, 2005, 08:48 AM
According to this (http://dotnetjunkies.com/WebLog/alexchang/archive/2004/04/15/11495.aspx) article, you have to use impersonation. A comment to the article mentions application pools. Anyone run into this when web server and DB server are on different machines?