Greetings all. I am developing an Intranet web application which uses Windows Integrated Security (i.e. no forms authentication, no SQL Server logins). The application itself works just fine (database connections using Windows security) until I try to use Personalization/Profiles, at which point things fall apart ... but only kind of. On my development workstation running WinXP SP2, everything works, but on the "live" server running Win2K3 I get the infamous "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." error. That tells me the .NET call to "Me.GetPropertyValue", for example, on the server is using a different process than what I would find on the workstation, and the process doesn't "get" integrated security. But I can't track the dirty little so-and-so down.
As a simplified example, try to adapt one of the Microsoft ASP .NET Web SIte templates which uses personalization (Personal Design or eCommerce) to work with SQL Server instead of SQL Express. Assumes you've run aspnet_regsql.exe for the SQL Server and changed web.config something like as follows:
<
configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"><appSettings />
<connectionStrings>
<add name="NorthwindConnectionString" connectionString="Data Source=myServer;Integrated Security=SSPI;Initial Catalog=NorthWind;" providerName="System.Data.SqlClient"/>
<add name="AspNetDB" connectionString="Data Source=myServer;Integrated Security=SSPI;Initial Catalog=aspnetdb;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<
system.web><compilation debug="true"/>
<authentication mode="Windows"/>
<anonymousIdentification enabled="false" />
<authorization>
<deny users=" "/>
</authorization>
<!-- Do not use the ASP.NET account -->
<identity impersonate="true"/>
<
profile enabled="true"><providers>
<remove name="AspNetSqlProfileProvider"/>
<add name="AspNetSqlProfileProvider" connectionStringName="AspNetDB" applicationName="My Application" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
<properties>
<!-- From eCommerce -->
<add name="ShoppingCart" type="ShoppingCart" allowAnonymous="false" serializeAs="Binary" />
</properties>
</profile>
</system.web>
</configuration>
I've tried several things - changing process identities, local policy settings, registry hacks, all to no avail. So I throw it out to the masses - any suggestions Thx
Bill Knight
MCSD, MCDBA, MCSE+I, MCP+SB

Personalization & Integrated Security
Undying
Just the obvious:
Cola
The error usually indicates that the user attempting to connect to SQL Server, via a trusted connection, does not exist.
If your web app is configured for Integrated Windows security we would need to know first, whether impersonation is enabled and second, whether the SQL Server you are attempting to access is on the same machine as the web server or on a different machine in the network domain.
fred99
Billy Hollis